Example 3

In three dimensions it is not as easy to visualize streamlines, but it can be done. Here the vector field is {3x^2, -y, z^3}.

In[13]:=

  Clear[x,y,z]

In[14]:=

  p5=PlotVectorField3D[{3 x^2,-y,z^3},{x,-5,5},{y,-5,5},{z,-5,5},Axes->True];

In[15]:=

  Show[p5,ViewPoint->{0,1,0}];

In[16]:=

  Clear[x,y,z]
  DSolve[{x'[t]/(3 x[t]^2)==y'[t]/-y[t],x[0]==2,y[0]==1},x,t];
  x=Evaluate[x[t]/.Flatten[%][[1]]]/.{y[t]->y,y[0]->1}

Out[16]=

       1
  ------------
  1
  - + 3 Log[y]
  2

In[17]:=

  Clear[y,z]
  DSolve[{y'[t]/-y[t]==z'[t]/z[t]^3,y[0]==1,z[0]==6},z,t];
  z=Evaluate[z[t]/.Flatten[%][[1]]]/.{y[t]->y,y[0]->1}

Out[17]=

             1
  -(-------------------)
         1
    Sqrt[-- + 2 Log[y]]
         36

In[18]:=

  p6=ParametricPlot3D[{x,y,z,RGBColor[1,0,0]},{y,-10,10}];

In[19]:=

  Show[p5,p6];

In[20]:=

  Show[p5,p6,ViewPoint->{0,1,0}];

Up to Streamlines