1. Vectorfields: This animation uses the vector field given by a separable differential equation as the background. Starting with the point (p,q), selected by the user, it graphs the solution. As usual, a and b give the domain, c and d give the range, and n gives the number of frames. The functions f and g represent the two parts of the separable differential equation dy/dx = f(x) g(y).

    For this animation it is not only safe, but necessary to include the "restart" command. If the functions are changed the solver always finds the old solution until the kernel is reset.
    restart: with(plots):
    a := -Pi/2: b := 3*Pi/2:        # domain
    c := -Pi/2: d := 3*Pi/2:        # range
    p := 1.: q := .7: n := 12:      # initial x&y, frames
    f := x -> sin(x): g := y -> y:  # x&y vectors
    s := dsolve({diff(yy(t),t)-f(t)*g(yy(t)),yy(p)=q},{yy(t)}):
         assign(s): eval(yy(t),s):
         m := unapply(%,t):         # solve diff.eq.
    an1 := fieldplot([1,f(x)*g(y)],x=a..b,y=c..d,color=blue):
    an2 := animate([p+(a-p)*k*(1-t)+(b-p)*k*t,
    display(an1, an2);
  2. Orthogonal Trajectories: This animation shows two families of curves, one in red and the other in blue. The red curves are defined implicitly by the equation f(x,y) = k. The blue curves are said to have orthogonal trajectories to the red curves, that is, they meet at right angles. Each of the lines of code beginning with the character "#" are ignored by MAPLE; they are there in case the curves having orthogonal trajectories are not defined by a single function. In this case, the "#" characters may be removed, and two solutions will be shown. It might be wise to try it both ways for each function f(x,y) you try to animate.
  3. restart: with(plots):
    a := -1: b := 1:           # x domain
    c := -1: d := 1: n := 15:  # y domain, frames
    f := (x,y) -> x*y:         # graph: f(x,y)=c
    p := -1: q := 1:           # range (k values for f)
    pp := -1: qq := 1:         # range (k values for orth. func.)
    s := dsolve({diff(y(x),x)=subs(z=y(x),
         assign(s[1]): eval(y(x),s[1]): m1 := unapply(%,x,_C1):
       # assign(s[2]): eval(y(x),s[2]): m2 := unapply(%,x,_C1):
    for k from 0 to n do
       an1[k] := implicitplot(f(x,y)=p*k/n+q*(1-k/n),
       an2[k] := plot(m1(x,pp*k/n+qq*(1-k/n)),x=a..b,
     # an3[k] := plot(m2(x,pp*k/n+qq*(1-k/n)),x=a..b,
               # view=c..d,color=BLUE):
     # an2[k] := display(an2[k],an3[k]):
    end do:
    an4 := display(an1[0]):
    for k from 1 to n do
      an4 := display(an4, an1[k]):
    end do:
    an5 := plots[display]([seq(an2[k],k=0..n)],insequence=true):