Level Sets and Functions

a=Plot3D[y^2-x^3,{x,-2,2},{y,-1,1},
Mesh->None,PlotStyle->{Blue,Opacity[0.8]},
AxesLabel->{"x","y",""},BoxRatios->{1,1,1}];

b=Plot3D[0,{x,-2,2},{y,-1,1},PlotRange->{{-2,2},{-1,1}},Mesh->None,PlotStyle->Red];

Let f: R^2 ---> R be given by f(x,y)=y^2-x^3.

Slicing the graph of f at height 0 gives the level set f=0:

Show[a,b]

<<"VectorFieldPlots`"

vf=VectorFieldPlot[{-3x^2,2y},{x,-2,2},{y,-2,2},PlotRange->1,ScaleFactor->0.5,PlotPoints->30];

curve=ParametricPlot[{t^2,t^3},{t,-1,1},PlotRange->1,PlotStyle->Thick];

The cuspidal cubic, y^2=x^3 is the level set f=0. The vector field grad f is perpendicular to it.

Show[curve,vf]

arrows1=Graphics[Table[Arrow[{{t^2,t^3},{t^2-3t^4,t^3+2t^3}}],{t,0.3,1,0.1}]];

arrows2=Graphics[Table[Arrow[{{t^2,t^3},{t^2-3t^4,t^3+2t^3}}],{t,-0.3,-1,-0.1}]];

curve2=ParametricPlot[{t^2,t^3},{t,-1,1},PlotRange->3,PlotStyle->Thick];

The gradient vanishes at the singularity.

Show[curve2,arrows1,arrows2]

vf2=VectorFieldPlot[{-2x-3x^2,2y},{x,-2,2},{y,-2,2},PlotRange->1,PlotPoints->30];

curve3=ParametricPlot[{t^2-1,t(t^2-1)},{t,-1.5,1.5},PlotRange->1,PlotStyle->Thick];

The nodal cubic, y^2=x^3+x^2.

Show[vf2,curve3]