Examples for how to plot a vector field in Maple. Its straightforward and a useful way to visualize
these.
Example 1: F(x,y)=<-y,x>. In the first plot (default), the vectors are scaled in a relative way (note that
the vector at (1,0) is <0,1> which has length 1).
See the help file (look for "fieldstrength"). In the second plot, we scale all vectors the same:
> with(plots):
> fieldplot([-y,x],x=-1..1,y=-1..1);
> fieldplot([-y,x],x=-1..1,y=-1..1,fieldstrength=fixed); > fieldplot3d([x,-y,-x],x=-1..1,y=-1..1,z=-1..1); Plot level curves of f together with its gradient vector field.
(Here, f(x,y)=cos(x)-2sin(y))
> F:=cos(x)-2*sin(y);
(1)
> A:=fieldplot([diff(F,x), diff(F,y)],x=-7..7,y=-7..7);
(2)
> B:=contourplot(F,x=-7..7,y=-7..7);
(3)
> display(A,B);