Vector Fields

 

To plot a plane vector field  f(x,y) i  + g(x,y)  j ,  one uses the Maple command

> with(plots):
> fieldplot([f(x,y),g(x,y)],x=a..b,y=c..d);

The command  fieldplot may contain various options.  The possible styles of arrows in the plot are  line, thin, slim, thick,  with  thin being the default.  One may also specify the thickness of the arrows. For example,

> fieldplot([y,-x], x=-1..1,y=-1..1,arrows=slim,thickness=2);

To plot a plane curve and a plane vector field in the same plot window,  one first names both plots and then uses the command  display to display them together.  Here is an example:

> fp:=fieldplot([y,-x],x=-2..2,y=-2..2):
> cp:=plot([cos(t),sin(t),t=0..2*Pi]):
> display(fp,cp,scaling=constrained);

The command  gradplot plots the gradient field of a given function of two variables. To plot vector fields in 3-dimensional space, one uses  fieldplot3d and  gradplot3d.