The old Google Groups will be going away soon, but your browser is incompatible with the new version.
This is a Usenet group - learn more
Message from discussion Getting only 1 of 3 curves of intersection
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful

From:
To:
Cc:
Followup To:
 Add Cc | Add Followup-to | Edit Subject
Subject:
 Validation: For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon.

More options Apr 30 2012, 4:44 am
Newsgroups: comp.soft-sys.math.mathematica
From: Bob Hanlon <hanlonr...@gmail.com>
Date: Mon, 30 Apr 2012 08:44:45 +0000 (UTC)
Local: Mon, Apr 30 2012 4:44 am
Subject: Re: Getting only 1 of 3 curves of intersection
g1 = Plot3D[Sin[x*y], {x, 0, Pi}, {y, 0, Pi},
PlotStyle -> None,
MeshStyle -> Red,
Axes -> True,
AxesLabel -> {"x", "y", "z"}];

g2 = Plot3D[Cos[x*y], {x, 0, Pi}, {y, 0, Pi},
Mesh -> None,
PlotStyle -> {Cyan, Opacity[.8]}];

rSol = Reduce[{z - Sin[x y] == 0, z - Cos[x y] == 0,
0 <= x <= \[Pi], 0 <= y <= \[Pi]}, {y, z}]

(((2*Pi - 2*ArcTan[1 + Sqrt[2]])/Pi <= x <=
Pi && y == (2*Pi - 2*ArcTan[1 + Sqrt[2]])/
x) || (-((2*ArcTan[1 - Sqrt[2]])/Pi) <=
x <= Pi && y == -((2*ArcTan[1 - Sqrt[2]])/
x)) || ((2*Pi - 2*ArcTan[1 - Sqrt[2]])/
Pi <= x <= Pi &&
y == (2*Pi - 2*ArcTan[1 - Sqrt[2]])/x)) &&
z == Sin[x*y]

rSol // FullSimplify

x <= Pi && (((9*Pi)/x == 4*y && 4*x >= 9) ||
(4*x*y == Pi && 4*x >= 1) ||
((5*Pi)/x == 4*y && 4*x >= 5)) &&
z == Sin[x*y]

param = Cases[rSol,
(y == f_) :> {x, f, Sin[x*f]}, Infinity] //
FullSimplify

{{x, (5*Pi)/(4*x), -(1/Sqrt[2])},
{x, Pi/(4*x), 1/Sqrt[2]}, {x, (9*Pi)/(4*x),
1/Sqrt[2]}}

g3 = ParametricPlot3D[param, {x, 0, Pi},
PlotStyle -> {{Magenta, Thickness[.007]}}];

Show[g1, g2, g3,
Background -> LightYellow,
ImageSize -> 500]

Bob Hanlon

On Sun, Apr 29, 2012 at 2:09 AM, Bill <WDWNORW...@aol.com> wrote:
> Hi:

> Consider the following plot:

> g1=Plot3D[Sin[x*y],{x,0,Pi},{y,0,Pi},PlotStyle->None,MeshStyle->Red,Axes->T rue,AxesLabel->{"x","y","z"}];
> g2=Plot3D[Cos[x*y],{x,0,Pi},{y,0,Pi},Mesh->None,PlotStyle->{Cyan,Opacity[.8 ]}];
> nsSol=NSolve[{z-Sin[x*y],z-Cos[x*y]},{y,z}];//Quiet
> g3=ParametricPlot3D[{x,y,z}/.nsSol[[2]],{x,0,Pi},PlotStyle->{Magenta,Thickn ess[.007]}];
> Show[g1,g2,g3,Background->LightYellow,ImageSize->500]

> Using the above Mathematica 8.0.4 code, I can plot one curve of intersection shown in magenta.
> Within the plotted area, I can see 2 more places where intersection curves should be.
> I've tried using Reduce in place of NSolve, but can't get it to work.

> Question: If this can be done, can someone please give me the code?

> Thanks,

> Bill

You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.