ME 401 Legendre Polynomials

ME 401 Legendre Polynomials

ME 401 Legendre Polynomials ‡ 1. Introduction This notebook has three objectives: (1) to summarize some useful information about Legendre polynomi- als, (2) to show how to use Mathematica in calculations with Legendre polynomials, and (3) to present some examples of the use of Legendre polynomials in the solution of Laplace's equation in spherical coordinates. In our course, the Legendre polynomials arose from separation of variables for the Laplace equation in spherical coordi- nates, so we begin there. The basic spherical coordinate system is shown below. The location of a point P is specified by the distance r of the point from the origin, the angle f between the position vector and the z-axis, and the angle q from the x-axis to the projection of the position vector onto the xy plane. The Laplace equation for a function F(r, f, q) is given by 1 ∂ ∂F 1 ∂ ∂F 1 ∂2 F “2 F = ÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ r2 ÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅ sinf ÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ = 0 . (1) r2 ∂r ∂r r2 sinf ∂f ∂f r2 sin2 f ∂q2 J N J N 2 legendre.nb In this notebook, we will consider only axisymmetric solutions of (1) -- that is, solutions which depend on r and f but not on q. Then equation (1) reduces to 1 ∂ ∂F 1 ∂ ∂F ÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ r2 ÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅ sinf ÅÅÅÅÅÅÅÅÅÅÅ = 0 . (2) r2 ∂r ∂r r2 sinf ∂f ∂f As we showed in class by a rather lengthy analysis, equation (2) has separated solutions of the form J N J N n - n+1 r Pn cosf and r Pn cosf , (3) where n is a non-negative integer and Pn is the nth Legendre polynomial. These solutions can be used to solve H L axisymmetric problems inside a sphere, exterior to a sphere, or in the region between concentric spheres. We include one exampleH L of each type ofH problemL later in this notebook. Now we look in more detail at Legendre's equation and the Legendre polynomials. ‡ 2. Legendre Polynomials ü 2.1 Differential Equation The first result in the search for separated solutions of equation (2), which ultimately leads to the formulas (3), is the pair of differential equations (4) for the r-dependent part F(r), and the f-dependent part P(f) of the separated solutions. d2 F dF d dP r2 ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + 2 r ÅÅÅÅÅÅÅÅÅÅ - lF = 0 , and ÅÅÅÅÅÅÅÅÅ sinf ÅÅÅÅÅÅÅÅÅÅ + lsinf P = 0 , (4) dr2 dr df df where l is the separation constant. The r-equation is equidimensional and thus has solutions, easily found, which are powers of r. The f-equation is Legendre's equation.J WeN begin by transforming it to a somewhat simpler form by a change of independent variable, namely h = cosf . (5) Then equation (4) becomes d dP ÅÅÅÅÅÅÅÅÅ 1 - h2 ÅÅÅÅÅÅÅÅÅÅ + l P = 0 , -1 < h < 1 . (6) dh dh The equation (6) has regular singular points at the endpoints h = ± 1. This equation plus the condition that the solutions be well-behavedAH L atE the endpoints constitute a singular Sturm-Liouville system. Those special values of l for which there are such well-behaved solutions are the eigenvalues of the problem. As we showed in class, we may find solutions of (6) in the form of power series about h = 0: P(h) = ¶ n n=0 an h . By substitution of this into equation (6), we find the recurrence relation for the coefficients an : n n + 1 - l a = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ a . (7) ⁄ n+2 n + 1 n + 2 n Because of the index increment of 2 in (7), the solutions fall naturally into even and odd functions of h, with the H L coefficient sequences of the two not mixing. For very large n, we may approximate the relation (7) by ignoring l H L H L compared with n(n + 1). The result is (n + 2)an+2 > nan -- that is, an > constant/n. From that result it is possible to show that any such solution is logarithmically singular at one or both endpoints. This result is suggested by (but not proved by) the two series legendre.nb 3 ¶ ¶ hn -1 n+1 hn ln 1 - h = - ÅÅÅÅÅÅÅÅÅ , and ln 1 + h = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ . (8) n n n=1 n=1 The only way to avoid such singularities in the solution is forH theL series to terminate. We see immediately from H L ‚ H L „ the recurrence relation (7) that termination occurs if and only if l = k(k + 1) for k a non-negative integer. The terminating solution in that case is a polynomial of degree k. If k is even, the polynomial has only even powers and is then an even function of h. If k is odd, only odd powers appear and the function is odd. Such solutions are called Legendre polynomials. The kth one is denoted by Pk (h), with the convention that the arbitrary multiplica- tive constant is fixed by the condition Pk 1 = 1 . (9) Any of the polynomials can be constructed directly from the recurrence formula (7) and the normalization (9), although this is not necessarily the most efficient way to carry out the construction. There is a well-known formula, calledH L Rodrigues' formula, which gives the Legendre polynomials. Although it is not usually used to compute the polynomials, it is still of interest: k 1 d 2 k Pk h = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅÅÅÅ h - 1 . 2k k! dhk The Legendre polynomials are built into Mathematica. Mathematica's notation for Pk (h) is Legendre- P[k,Hh].L We use MathemaH ticaL to obtain the formulas for the first 11 of these polynomials. We put them in a table. TableForm Table i, i * i + 1 , LegendreP i, h , i, 0, 10 , TableHeadings Ø None, "k", "lk ", "Pk h " k l P h k@ @8k H L @ D< 8 <D 0 0 18 8 H L <<D 1 2 h 1 H L 2 2 6 ÅÅ2Å -1 + 3 h 1 3 3 12 ÅÅ2Å -3 h + 5 h 4 20 ÅÅ1Å 3 - 30 h2 + 35 h4 8 H L 5 30 ÅÅ1Å 15 h - 70 h3 + 63 h5 8 H L 6 42 ÅÅÅÅ1 Å -5 + 105 h2 - 315 h4 + 231 h6 16 H L 7 56 ÅÅÅÅ1 Å -35 h + 315 h3 - 693 h5 + 429 h7 16 H L 8 72 ÅÅÅÅ1ÅÅÅ 35 - 1260 h2 + 6930 h4 - 12012 h6 + 6435 h8 128 H L 9 90 ÅÅÅÅ1ÅÅÅ 315 h - 4620 h3 + 18018 h5 - 25740 h7 + 12155 h9 128 H L 10 110 ÅÅÅÅ1ÅÅÅ -63 + 3465 h2 - 30030 h4 + 90090 h6 - 109395 h8 + 46189 h10 256 H L H L ü 2.2 Some Useful Formulas and GraphsH L To get some idea of what these polynomials look like, we construct graphs of the first 11. According to the general result about the zeros of solutions of Sturm-Liouville systems, the kth polynomial should have exactly k zeros in the interval (-1,1). We first define a function legraph[k] that produces a graph of the kth polynomial, and then we use a Do loop to construct the first 11 graphs. 4 legendre.nb legraph k_ := Plot LegendreP k, h , h, -1, 1 , AxesLabel Ø "h", "Pk h " , PlotRange Ø -1.1, 1.1 , -1.1, 1.1 , PlotLabel Ø SequenceForm@ D " k =", PaddedForm k, 3 @ @ D 8 < 8 H L < Do legraph i ,88 i, 0, 10 < 8 << @ @ DDD Pk h k = 0 @ @ D 8 <D 1 H L 0.5 h -1 -0.5 0.5 1 -0.5 -1 Pk h k = 1 1 H L 0.5 h -1 -0.5 0.5 1 -0.5 -1 legendre.nb 5 Pk h k = 2 1 H L 0.5 h -1 -0.5 0.5 1 -0.5 -1 Pk h k = 3 1 H L 0.5 h -1 -0.5 0.5 1 -0.5 -1 Pk h k = 4 1 H L 0.5 h -1 -0.5 0.5 1 -0.5 -1 6 legendre.nb Pk h k = 5 1 H L 0.5 h -1 -0.5 0.5 1 -0.5 -1 Pk h k = 6 1 H L 0.5 h -1 -0.5 0.5 1 -0.5 -1 Pk h k = 7 1 H L 0.5 h -1 -0.5 0.5 1 -0.5 -1 legendre.nb 7 Pk h k = 8 1 H L 0.5 h -1 -0.5 0.5 1 -0.5 -1 Pk h k = 9 1 H L 0.5 h -1 -0.5 0.5 1 -0.5 -1 Pk h k = 10 1 H L 0.5 h -1 -0.5 0.5 1 -0.5 -1 We see the expected alternation between even and odd functions, and the expected number of zeros in each case. There are a large number of formulas involving Legendre polynomials. We consider here only a few of the most useful. The following is a recursion formula that relates three consecutive Legendre polynomials: 8 legendre.nb n + 1 Pn+1 h - 2 n + 1 hPn h + nPn-1 h = 0 . (10) Although Pn-1 is not defined when n = 0, you can easily check that the formula (10) remains true in that case if we define P to be anything bounded. An interesting application of (10) is to compute P h , starting with the known -1H L H L H L H L H L n functions P0 h = 1 and P1 h = h. Then we get 2 n + 1 h Pn h - n Pn-1 h H L P h = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ nH+1L H L n + 1 2 3 h P1 h - P0 h 3 h - 1 so P2 h =H ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅL ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅH L ÅÅÅÅÅÅÅÅÅÅ = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅH L ÅÅÅÅÅÅÅÅÅÅ , H L 2 2 (11) 2 5 h P2 h - 2 P1 h 5 3 h - 1 2 5 3 3 and P3 h = ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅH L ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅHÅÅÅÅÅÅÅÅL ÅÅÅÅÅÅÅ = ÅÅÅÅÅ h ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ - ÅÅÅÅÅ h = ÅÅÅÅÅ h - ÅÅÅÅÅ h .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    25 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us