Page 815 - Advanced_Engineering_Mathematics o'neil
P. 815

APPENDIX A A MAPLE Primer     795


                                        use
                                                                                ∗
                                                                                  ∗
                                                          F:= VectorField(<x y z,x - y,yz>);
                                           Take the divergence of F as the dot product of del with F.
                                                                  DotProduct(Nabla,F);

                                           or
                                                                   DotProduct(Del,F);
                                           For the curl, take the cross product of the del operator with the vector field:

                                                                 CrossProduct(Nabla,F);
                                           or
                                                                  CrossProduct(Del,F);

                                           The output from this command will have the appearance
                                                                    0e x + xye y + (1 − xz)e z .
                                        In MAPLE, unit vectors along the coordinate axes are denoted e α where α denotes the coordinate.
                                        In rectangular coordinates, e x =i, e y =j, and e z =k. In spherical coordinates, these vectors would
                                        be denoted e ρ , e θ , and e ϕ .
                                           We can also carry out vector operations in other curvilinear coordinate systems. We will
                                        illustrate these for cylindrical and spherical coordinates.
                                           To work in cylindrical coordinates, begin with
                                                     SetCoordinates(‘cylindrical’ [r,theta,z]);
                                           As an example, define a vector field G(r,θ, z) by

                                                                                                   ∗
                                                                                      ∗
                                                                                    ∗
                                                                     ∗
                                            G:=VectorField(<(r∧2) cos(theta),r z cos(theta) sin(theta),
                                                                         (z∧2)>);
                                           This will produce the output
                                                                                             2
                                                                  2
                                                            G :=r cos(θ)e r +rz cos(θ)sin(θ)e θ + z e z .
                                           For the divergence, enter
                                                                      Divergence(G);
                                        resulting in the output

                                                                               2
                                                                                         2
                                                               2
                                                             3r cos(θ) −rz sin(θ) +rz cos(θ) + 2rz
                                                                                               .
                                                                             r
                                        Of course, we can divide out the r in the denominator. For the curl of G, enter
                                                                         Curl(G);
                                        to obtain
                                                                                           2
                                                                          2rz cos(θ)sin(θ) +r sin(θ)
                                                         −r cos(θ)sin(θ)e r +                    e z .
                                                                                     r
                                        We would divide out the r in the e z component. MAPLE does not automatically simplify all
                                        output.




                      Copyright 2010 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
                      Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.

                                   October 14, 2010  15:43  THM/NEIL   Page-795        27410_24_appA_p789-800
   810   811   812   813   814   815   816   817   818   819   820