Page 819 - Advanced_Engineering_Mathematics o'neil
P. 819

APPENDIX A A MAPLE Primer     799




                            A.6         Special Functions

                                        In MAPLE, J n (x) is called BesselJ(n,x), and the Bessel function of the second kind, Y n (x),
                                        is denoted BesselY(n,x). To evaluate, for example, J 3 (1.21),use

                                                                evalf(BesselJ(3,1.21));
                                           In similar fashion, there are BesselI and BesselK commands for modified Bessel
                                        functions of the first and second kinds, respectively.
                                           For integrals involving Bessel functions, use the int command. For example,
                                                                                        ∗
                                                                                 ∗
                                                                  ∗
                                                     evalf(int(x BesselJ(1,x) cos(3 x),x=0..1));
                                                                     1
                                        will give a decimal evaluation of  xJ 1 (x)cos(x)dx.
                                                                   0
                                           We can find (approximately) the kth (in order of increasing magnitude) positive zero of
                                        J n (x) by using
                                                               evalf(BesselJZeros(n,k));
                                           For example,
                                                               evalf(BesselJZeros(3,7));
                                        returns the seventh positive zero of J 3 (x).
                                           The nth Legendre polynomial P n (x) is denoted LegendreP(n,x) in MAPLE. Since
                                        Legendre’s differential equation is second order, there is a second, linearly independent solu-
                                        tion, often denoted Q n (x). In MAPLE, this function is LegendreQ(n,x). To obtain P n (x)
                                        explicitly, use
                                                               simplify(LegendreP(n,x));
                                           Integrals involving Legendre polynomials can be done using the int command. For example,
                                                                        ∗
                                                     evalf(int(sin(x) LegendreP(5,x),x=-1..1));
                                                                     1
                                        will give a decimal evaluation of  sin(x)P 5 (x)dx.
                                                                   −1
                                           Legendre polynomials form a special case of a class of special functions called orthogonal
                                        polynomials, which include Laguerre polynomials, Hermite polynomials and many others. The
                                        command
                                                                     with(orthopoly);
                                        will call up MAPLE’s subroutines of orthogonal polynomials.



                            A.7         Complex Functions


                                        MAPLE will do complex arithmetic with the imaginary unit i denoted I.
                                        For the residue of a function at a point, use the command
                                                                        Res( f, z 0 );
                                        For example, if f (z) = cos(z)/z, entered by

                                                                     f:=z → cos(z)/z;
                                        then the residue at zero can be computed as
                                                                   residue(f(z),z=0);




                      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-799        27410_24_appA_p789-800
   814   815   816   817   818   819   820   821   822   823   824