Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

For example, I am trying to plot the single level curve of

f(x,y)=xsin[y/x]+ysin[2x] 

that goes through the point (3pi,3pi). Can anyone show me how to do this?

share|improve this question

2 Answers 2

Just for illustrative purposes:

f[x_, y_] := x Sin[y/x] + y Sin[2 x]
pt = f[3 Pi, 3 Pi];
plot = Plot3D[f[x, y], {x, -4 Pi, 4 Pi}, {y, -4 Pi, 4 Pi}, 
   MeshFunctions -> (#3 &), Mesh -> {{pt}}, MeshStyle -> {Thick, Red},
    PlotPoints -> 100, ColorFunctionScaling -> False];
Show[plot, 
 Graphics3D[{Yellow, PointSize[0.03], Point[{{3 Pi, 3 Pi, pt}}]}]]

visualizes the level curve (and point in yellow): enter image description here

Contour plot can visualize the level curve:

    ContourPlot[f[x, y], {x, -4 Pi, 4 Pi}, {y, -4 Pi, 4 Pi}, 
 Contours -> {pt}, ContourShading -> None, 
 Epilog -> {Red, PointSize[0.02], Point[{3 Pi, 3 Pi}]}]

enter image description here

You can improve quality with plot points.

share|improve this answer

Define the function you want to plot f[x,y] and the value(s) you want to plot and then use the ContourPlot command. You get somewhat different pictures by choosing different regions of x,y to plot over.

f[x_, y_] := x Sin[y/x] + y Sin[2 x]; 
ContourPlot[f[x, y] == f[3 Pi, 3 Pi], {x, 0, 25}, {y, 0, 25}]

enter image description here

share|improve this answer
    
Awesome, thanks bill s! –  Logan Nov 10 '13 at 5:32
    
@ ubpdqn very sexy! –  Logan Nov 11 '13 at 21:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.