<<

Solutions to Differential Equations: Special Functions

1 Visualizing a few special functions 2 Lecture-26.nb

Bessel's equation

‡ Bessel's equation is a second-order ODE having the following form, with the parameter n being real and nonnegative.

In[155]:= 1 BesselODE = x2 y'' x + x y' x + x2 - n2 y x ã 0

@ D @ D H L @ D Lecture-26.nb 3

Out[155]=

x2 - n2 y x + x y¢ x + x2 y¢¢ x ä 0

Bessel'sI equationM @ arisesD in@ problemsD @in Dheat conduction and mass diffusion for prob- lems with cylindrical symmetry (and many other situations). It's solution is a linear combination of two special functions called Bessel functions of the first kind, BesselJ in Mathematica, and Bessel functions of the second kind, BesselY in Mathematica. 4 Lecture-26.nb

In[156]:= 2 DSolve BesselODE, y x , x Out[156]=

@ y x Æ BesselJ@ D n,D x C 1 + BesselY n, x C 2

88 @ D @ D @ D @ D @ D<< Lecture-26.nb 5

‡ The functions BesselJ and BesselY can be evaluated numerically and of course Mathematica has this capability built-in.

In[157]:= MyPlotStyle HowMany_Integer := 3 Table Hue 0.66* i HowMany , Thickness 0.01 , i, 0, HowMany In[158]:= @ D 4 Plot BesselJ 0, x , BesselY 0, x , x, 0, 20 , PlotStyle Ø MyPlotStyle 2 @8 @ ê D @ D< 8

@8 @ 1D @ D< 8 < @ DD

0.5

5 10 15 20

-0.5

-1 6 Lecture-26.nb

1

0.5

5 10 15 20

-0.5

-1 1

0.5 Lecture-26.nb 7

5 10 15 20

-0.5

-1 1

0.5

5 10 15 20

8 -0.5 Lecture-26.nb

-1

Out[158]=

Ö Graphics Ö

In[159]:= 5 Plot BesselJ 5, x , BesselY 5, x , x, 0, 20 , PlotStyle Ø MyPlotStyle 2

@8 @ D @ D< 8 < @ DD 5 10 15 20

-1

-2

-3

-4

-5 Lecture-26.nb 9

5 10 15 20

-1

-2

-3

-4

-5 5 10 15 20

-1

10 Lecture-26.nb -2

-3

-4

-5 5 10 15 20

-1

-2

-3

-4 Lecture-26.nb 11

-5

Out[159]=

Ö Graphics Ö

In[160]:= 6 Plot BesselJ 1 2, x , BesselY 1 2, x , x, 0, 20 , PlotStyle Ø MyPlotStyle 2

@8 @ ê D @ ê D< 8 < @ DD 0.5

0.25

5 10 15 20 -0.25

-0.5

-0.75

-1 12 Lecture-26.nb

0.5

0.25

5 10 15 20 -0.25

-0.5

-0.75

-1 0.5

0.25 Lecture-26.nb 13

5 10 15 20 -0.25

-0.5

-0.75

-1 0.5

0.25

5 10 15 20 -0.25

-0.5

14 Lecture-26.nb -0.75

-1

Out[160]=

Ö Graphics Ö

As an example of an application where the Bessel functions arise, consider radially-sym- metric heat flow in an infinitely long cylinder of radius a that has an initial temperature -ka2 t profile T =T(r) and a surface temperature T(r = a) = Tr , and substitute T = ‰ t into ∂T the heat equation ÅÅÅÅÅÅÅÅÅÅ = k “2 T in cylindrical coordinates. The t must ∂t d2 t 1 dt obey ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ + a2 t = 0, which has the form of Bessel's equation of order n = ∂r2 r dr -ka2 t zero. The solution will have the form T = A J0 ar ‰ where A is a constant and J0 ar is the of order zero of the first kind. The parameter a must, from boundary conditions, be a solution to the equation J(aa) = 0. The initial temperature distribution, f(r), can be expanded as a Hof BesselL functions of zero order, analo- gousH toL what we did with Fourier series. The general solution to the heat-flow problem will then be an infinite series of Bessel functions, each modified by an exponentially ¶ 2 -kan t decaying amplitude, taking the form T = An J0 an r ‰ . For a more thorough n=1 discussion, see H.S. Carslaw and J.C. Jaeger, Conduction of Heat in Solids, Oxford University Press, Second Edition, pp. 194–196‚ (1959).H L Lecture-26.nb 15 As an example of an application where the Bessel functions arise, consider radially-sym- metric heat flow in an infinitely long cylinder of radius a that has an initial temperature -ka2 t profile T =T(r) and a surface temperature T(r = a) = Tr , and substitute T = ‰ t into ∂T the heat equation ÅÅÅÅÅÅÅÅÅÅ = k “2 T in cylindrical coordinates. The function t must ∂t d2 t 1 dt obey ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ + a2 t = 0, which has the form of Bessel's equation of order n = ∂r2 r dr -ka2 t zero. The solution will have the form T = A J0 ar ‰ where A is a constant and J0 ar is the Bessel function of order zero of the first kind. The parameter a must, from boundary conditions, be a solution to the equation J(aa) = 0. The initial temperature distribution, f(r), can be expanded as a series Hof BesselL functions of zero order, analo- gousH toL what we did with Fourier series. The general solution to the heat-flow problem will then be an infinite series of Bessel functions, each modified by an exponentially ¶ 2 -kan t decaying amplitude, taking the form T = An J0 an r ‰ . For a more thorough n=1 discussion, see H.S. Carslaw and J.C. Jaeger, Conduction of Heat in Solids, Oxford University Press, Second Edition, pp. 194–196‚ (1959).H L As an example of an application where the Bessel functions arise, consider radially-sym- metric heat flow in an infinitely long cylinder of radius a that has an initial temperature -ka2 t profile T =T(r) and a surface temperature T(r = a) = Tr , and substitute T = ‰ t into ∂T the heat equation ÅÅÅÅÅÅÅÅÅÅ = k “2 T in cylindrical coordinates. The function t must ∂t d2 t 1 dt obey ÅÅÅÅÅÅÅÅÅÅÅÅÅÅ + ÅÅÅÅÅÅ ÅÅÅÅÅÅÅÅÅ + a2 t = 0, which has the form of Bessel's equation of order n = ∂r2 r dr -ka2 t zero. The solution will have the form T = A J0 ar ‰ where A is a constant and J0 ar is the Bessel function of order zero of the first kind. The parameter a must, from boundary conditions, be a solution to the equation J(aa) = 0. The initial temperature 16 distribution, f(r), can be expanded as a series Hof BesselL functions of zero order,Lecture-26.nb analo- gousH toL what we did with Fourier series. The general solution to the heat-flow problem will then be an infinite series of Bessel functions, each modified by an exponentially ¶ 2 -kan t decaying amplitude, taking the form T = An J0 an r ‰ . For a more thorough n=1 discussion, see H.S. Carslaw and J.C. Jaeger, Conduction of Heat in Solids, Oxford University Press, Second Edition, pp. 194–196‚ (1959).H L

Legendre's equation

Legendre's equation is a second-order ODE having the following form, with the parame- ters m and n being integers such that n is positive and -n ≤ m ≤ n (seems to suggest applications to quantum numbers!). Legendre's equation arises in physical problems with spherical symmetry. The simplest form of the equation has only one parameter, n and takes the form: Lecture-26.nbLegendre's equation is a second-order ODE having the following form, with the parame-17 ters m and n being integers such that n is positive and -n ≤ m ≤ n (seems to suggest applications to quantum numbers!). Legendre's equation arises in physical problems with spherical symmetry. The simplest form of the equation has only one parameter, n and takes the form:

In[161]:= 7 LegendreODE = 1 - x2 y'' x - 2 x y' x + n n + 1 y x ã 0 Out[161]=

12 y x -H2 x y¢ Lx +@ D1 - x2 y@¢¢ Dx äH 0H LL @ D

@ D @ D I M @ D 18 Lecture-26.nb

‡ Its solution is a linear combination of two special functions, Legendre and PLegendreQ:

In[162]:= 8 DSolve LegendreODE, y x , x

@ @ D D Lecture-26.nb 19

Out[162]=

1 y x Æ ÄÄÄÄÄÄ -3 x + 5 x3 C 1 + 2 2 5 x2 1 1 1 C 2 ÄÄÄÄÄÄ - ÄÄÄÄÄÄÄÄÄÄÄÄÄÄ - ÄÄÄÄÄÄ x 3 - 5 x2 - ÄÄÄÄÄ Log 1 - x + ÄÄÄÄÄ Log 1 + x 99 @ D I 3 2 M @2D 2 2 i y j ji zyz @ D j I M j @ D @ Dzz== k k {{ 20 Lecture-26.nb

‡ The two-parameter form of the Legendre equation is:

In[163]:= m2 9 AnotherFormLegendreODE = 1 - x2 y'' x - 2 x y' x + n n + 1 - ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ y x ã 0 1 - x2 Out[163]= i y ¢ H 2 L ¢¢ @ D @ D j H L z @ D 12 y x - 2 x y x + 1 - x y x ä 0 k {

@ D @ D I M @ D Lecture-26.nb 21

‡ which has a solution involving the same special functions:

In[164]:= 10 DSolve AnotherFormLegendreODE, y x , x

@ @ D D 22 Lecture-26.nb

Out[164]=

1 y x Æ ÄÄÄÄÄÄ -3 x + 5 x3 C 1 + 2 2 5 x2 1 1 1 C 2 ÄÄÄÄÄÄ - ÄÄÄÄÄÄÄÄÄÄÄÄÄÄ - ÄÄÄÄÄÄ x 3 - 5 x2 - ÄÄÄÄÄ Log 1 - x + ÄÄÄÄÄ Log 1 + x 99 @ D I 3 2 M @2D 2 2 i y j ji zyz @ D j I M j @ D @ Dzz== k k {{ Lecture-26.nb 23

‡ Of course, Mathematica can evaluate and plot Legendre functions…

In[165]:= 11 Plot LegendreP 0, x , LegendreQ 0, x , x, -1, 1 , PlotStyle Ø MyPlotStyle 2

@ D @8 @ D @ D< 8 < 7.5 D

5

2.5

-1 -0.5 0.5 1 -2.5

-5

-7.5 24 7.5 Lecture-26.nb

5

2.5

-1 -0.5 0.5 1 -2.5

-5

-7.5 7.5

5

2.5

Lecture-26.nb 25 -1 -0.5 0.5 1 -2.5

-5

-7.5 7.5

5

2.5

-1 -0.5 0.5 1 -2.5

-5

26 -7.5 Lecture-26.nb

Out[165]=

Ö Graphics Ö

In[166]:= 12 Plot LegendreP 1, x , LegendreQ 1, x , x, -1, 1 , PlotStyle Ø MyPlotStyle 2 4 @8 @ D @ D< 8 < @ DD

3

2

1

-1 -0.5 0.5 1

-1 4 Lecture-26.nb 27

3

2

1

-1 -0.5 0.5 1

-1 4

3

2

28 Lecture-26.nb 1

-1 -0.5 0.5 1

-1 Lecture-26.nb 29

Out[166]=

Ö Graphics Ö

In[167]:= 13 Plot LegendreP 2, x , LegendreQ 2, x , x, -1, 1 , PlotStyle Ø MyPlotStyle 2

@8 @ D @ D< 8 < @ DD 3

2

1

-1 -0.5 0.5 1 -1

-2

-3 30 3 Lecture-26.nb

2

1

-1 -0.5 0.5 1 -1

-2

-3 3

2

1

Lecture-26.nb 31 -1 -0.5 0.5 1 -1

-2

-3 32 Lecture-26.nb

Out[167]=

Ö Graphics Ö

In[168]:= 14 Plot Evaluate Table LegendreP i, x , i, 0, 10 , x, -1, 1 , PlotStyle Ø MyPlotStyle 11 1 @ @ @ @ D 8

0.5

-1 -0.5 0.5 1

-0.5

-1 1

Lecture-26.nb 33

0.5

-1 -0.5 0.5 1

-0.5

-1 1

0.5

34 Lecture-26.nb -1 -0.5 0.5 1

-0.5

-1 Lecture-26.nb 35

Out[168]=

Ö Graphics Ö

In[169]:= 15 Plot Evaluate Table LegendreQ i, x , i, 0, 10 , x, -1, 1 , PlotStyle Ø MyPlotStyle 11

@ @ @ @ D 8

1

-1 -0.5 0.5 1

-1

-2 36 2 Lecture-26.nb

1

-1 -0.5 0.5 1

-1

-2 2

1

Lecture-26.nb 37 -1 -0.5 0.5 1

-1

-2 38 Lecture-26.nb

Out[169]=

Ö Graphics Ö Lecture-26.nb 39

‡ Note how some of the Legendre functions are even and some are odd. Recall that by summing even and odd functions, functions that are neither even or odd can be produced.

Hypergeometric and Laguerre special functions 40 Lecture-26.nb

‡ Here is another whose solution involves special functions. Many special functions are defined and analyzed precisely because they are solutions to simple ODEs

In[170]:= 16 DSolve x y'' x + q + 1 - x y' x + p y x ã 0, y x , x

@ @ D H L @ D @ D @ D D Lecture-26.nb 41

Out[170]=

y x Æ C 1 HypergeometricU -p, 1 + q, x + C 2 LaguerreL p, q, x

In[171]:= 17 Plot LaguerreL88 @ D 4,@1,Dx , x, -5, 15 @ D @ D @ D<<

@ @ D 8

20

10

-5 5 10 15

-10 42 Lecture-26.nb

20

10

-5 5 10 15

-10 20

10

Lecture-26.nb 43

-5 5 10 15

-10 44 Lecture-26.nb

Out[171]=

Ö Graphics Ö

Visualizing the Hydrogen Atom Orbitals (Example still 2 in progress---may not be correct)