Math 252 HW#07 sec. 4.4 #6 Maple Work

We start by loading the "linalg" package:

  with(linalg):

Part (a):

  F:=vector([6*x-2*exp(2*x)*y^2,-2*y*exp(2*x),cos(z)]);
               [                  2                       ]
          F := [6 x - 2 exp(2 x) y , -2 y exp(2 x), cos(z)]
  curl(F,[x,y,z]);
                              [0, 0, 0]
Therefore the vector field is conservative.


Part (b):

In Part (b), we found a potential for the conservative vector field, and used this in order to evaluate the line-integral. The answer obtained was "8". Let's now use Maple to calculate the line-integral the long way, without using a potential.

  x:=t;y:=(t-1)*(t-2);z:=Pi/2*t^3;
                                x := t


                         y := (t - 1) (t - 2)


                                         3
                            z := 1/2 Pi t

  R:=vector([x,y,z]);
                      [                            3]
                 R := [t, (t - 1) (t - 2), 1/2 Pi t ]
  dR:=map(diff,R,t);
                          [                    2]
                    dR := [1, 2 t - 3, 3/2 Pi t ]
  intgr1:=dotprod(F,dR);
                            4                3                2
  intgr1 := 6 t - 2 exp(2 x) t  + 12 exp(2 x) t  - 26 exp(2 x) t

     + 24 exp(2 x) t - 8 exp(2 x)

                                                             2
     - 2 (t - 1) (t - 2) exp(2 x) (2 t - 3) + 3/2 cos(z) Pi t
  intgr1:=simplify(intgr1);
                            4               3               2
  intgr1 := 6 t - 2 exp(2 t) t  + 8 exp(2 t) t  - 8 exp(2 t) t

                                                   3      2
     - 2 exp(2 t) t + 4 exp(2 t) + 3/2 cos(1/2 Pi t ) Pi t
  int(intgr1,t=0..1);
                                  8
This confirms the answer obtained by using the potential. Obviously the potential method is much easier than trying to evaluate the above integral by hand!


SFU / Math & Stats / ~hebron / math252 / assignments / sol07 / maple / 4.4.6.html

Revised 22 March 1999 by John Hebron.