User:Egm6321.f09.Team1.vasquez/HW6

= Problem 1: Laplacian in Circular Cylindrical Coordinates =

From lecture slide 31-1.

Given
The equations for circular cylinder coordinates are given by:


 * {| style="width:100%" border="0" align="left"

\begin{array}{*{20}l} x_1 & = & r \cos \theta & = & \xi_1 \cos \xi_2 \\ x_2 & = & r \sin \theta & = & \xi_1 \sin \xi_2 \\ x_3 & = & z & = & \xi_3 & \end{array} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 1)
 * }
 * }

Find
1. Find $$\displaystyle \{{\rm d} x_i\} = \{{\rm d} x_1, {\rm d} x_2, {\rm d} x_3\} $$ in terms of $$\displaystyle \{\xi_j\} = \{\xi_1, \xi_2, \xi_3\} $$ and $$\displaystyle \{{\rm d} \xi_k\} $$

2. Find $$\displaystyle {\rm d} s^2 = \sum_i ({\rm d} x_i)^2 = \sum_k (h_k)^2 ({\rm d} \xi_k)^2 $$. Identify $$\displaystyle \{h_i\}$$ in terms of $$\displaystyle \{ \xi_j \}$$.

3. Find the Laplacian in these curvilinear coordinates.

Solution
1. We can take the derivative of each $$\displaystyle \{x_i\}$$ in Eq. 1 with respect to $$\displaystyle \xi_i$$ as follows


 * {| style="width:100%" border="0" align="left"

{\rm d} x_1 = \frac{\partial x_1}{\partial \xi_1} {\rm d} \xi_1 + \frac{\partial x_1}{\partial \xi_2} {\rm d} \xi_2 + \frac{\partial x_1}{\partial \xi_3} {\rm d} \xi_3 = \cos \xi_2 {\rm d} \xi_1 - \xi_1 \sin \xi_2 {\rm d} \xi_2 + 0 {\rm d} \xi_3 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 2)
 * }
 * }


 * {| style="width:100%" border="0" align="left"

{\rm d} x_2 = \frac{\partial x_2}{\partial \xi_1} {\rm d}\xi_1 + \frac{\partial x_2}{\partial \xi_2} {\rm d}\xi_2 + \frac{\partial x_2}{\partial \xi_3} {\rm d}\xi_3 = \sin \xi_2 {\rm d}\xi_1 + \xi_1 \cos \xi_2 {\rm d} \xi_2 + 0 {\rm d} \xi_3 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 3)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

{\rm d}x_3 = \frac{\partial x_3}{\partial \xi_1} {\rm d}\xi_1 + \frac{\partial x_3}{\partial \xi_2} {\rm d}\xi_2 + \frac{\partial x_3}{\partial \xi_3} {\rm d}\xi_3 = (0) {\rm d}\xi_1 + (0) {\rm d} \xi_2 + {\rm d} \xi_3 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 4)
 * }
 * }

Therefore,


 * {| style="width:100%" border="0" align="left"

$$\displaystyle \begin{array}{*{20}l} {\rm d}x_1 & = & \cos \xi_2 {\rm d}\xi_1 - \xi_1 \sin \xi_2 {\rm d} \xi_2 \\ {\rm d}x_2 & = & \sin \xi_2 {\rm d}\xi_1 + \xi_1 \cos \xi_2 {\rm d} \xi_2 \\ {\rm d}x_3 & = & {\rm d} \xi_3 \end{array} $$ $$
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * $$\displaystyle (Eq. 5)
 * }
 * }

2. Using the definition for $$\displaystyle {\rm d} s $$ gives


 * {| style="width:100%" border="0" align="left"

{\rm d}s^2 = \cos^2 \xi_2 \left({\rm d}\xi_1 \right)^2 - \cancel{2 \xi_1 \sin \xi_2 \cos \xi_2 {\rm d}\xi_1 {\rm d} \xi_2} + \xi_1^2 \sin^2 \xi_2 \left({\rm d} \xi_2\right)^2 + \sin^2 \xi_2 \left({\rm d}\xi_1 \right)^2 + \cancel{2 \xi_1 \sin \xi_2 \cos \xi_2 {\rm d}\xi_1 {\rm d} \xi_2} + \xi_1^2 \cos^2 \xi_2 \left({\rm d} \xi_2 \right)^2 + \left( {\rm d} \xi_3 \right)^2 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 6)
 * }
 * }

Simplifying Eq. 6 yields


 * {| style="width:100%" border="0" align="left"

$$\displaystyle {\rm d}s^2 = \left({\rm d}\xi_1 \right)^2 + \xi_1^2 \left({\rm d} \xi_2\right)^2 + \left( {\rm d} \xi_3 \right)^2 $$ $$
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * $$\displaystyle (Eq. 7)
 * }
 * }

Therefore,


 * {| style="width:100%" border="0" align="left"

$$\displaystyle h_1 = 1, \quad h_2 = \xi_1, \quad h_3 = 1 $$ $$
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * $$\displaystyle (Eq. 8)
 * }
 * }

3. The Laplacian operator over a function $$\displaystyle \psi$$ in 3-D curvilinear coordinates is given by


 * {| style="width:100%" border="0" align="left"

\Delta \psi= \nabla^2 \psi= \frac{1}{h_1 h_2 h_3} \sum_{i=1}^3 \frac{\partial}{\partial \xi_i} \left[ \frac{h_1 h_2 h_3}{h_i^2} \frac{\partial \psi}{\partial \xi_i} \right] $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 9)
 * }
 * }

Substituting the results given in Eq. 8 into Eq. 9 gives


 * {| style="width:100%" border="0" align="left"

\Delta \psi = \frac{1}{\xi_1} \left[ \frac{\partial}{\partial \xi_1} \left( \xi_1 \frac{\partial \psi}{\partial \xi_1} \right) + \frac{\partial}{\partial \xi_2} \left( \frac{\xi_1}{\xi_1^2} \frac{\partial \psi}{\partial \xi_2} \right) + \frac{\partial}{\partial \xi_3} \left(\xi_1 \frac{\partial}{\partial \xi_3} \right) \right] $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 10)
 * }
 * }

Simplifying yields


 * {| style="width:100%" border="0" align="left"

$$\displaystyle \Delta \psi = \frac{1}{\xi_1} \frac{\partial}{\partial \xi_1} \left(\xi_1 \frac{\partial \psi}{\partial \xi_1} \right) + \frac{1}{\xi_1^2} \frac{\partial^2 \psi}{\partial \xi_2^2} + \frac{\partial^2 \psi}{\partial \xi_3^2} $$ $$
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * $$\displaystyle (Eq. 11)
 * }
 * }

= Problem 2: Laplacian in Spherical Coordinates =

From lecture slide 31-1.

Given
The equations for spherical coordinates are given by:


 * {| style="width:100%" border="0" align="left"

\begin{array}{*{20}l} x_1 & = & r \cos \theta \cos \phi & = & \xi_1 \cos \xi_3 \cos \xi_2 \\ x_2 & = & r \cos \theta \sin \phi & = & \xi_1 \cos \xi_3 \sin \xi_2 \\ x_3 & = & r \sin \theta & = & \xi_1 \sin \xi_3 & \end{array} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 1)
 * }
 * }

Find
1. Find $$\displaystyle \{{\rm d} x_i\} = \{{\rm d} x_1, {\rm d} x_2, {\rm d} x_3\} $$ in terms of $$\displaystyle \{\xi_j\} = \{\xi_1, \xi_2, \xi_3\} $$ and $$\displaystyle \{{\rm d} \xi_k\} $$

2. Find $$\displaystyle {\rm d} s^2 = \sum_i ({\rm d} x_i)^2 = \sum_k (h_k)^2 ({\rm d} \xi_k)^2 $$. Identify $$\displaystyle \{h_i\}$$ in terms of $$\displaystyle \{ \xi_j \}$$.

3. Find the Laplacian in these curvilinear coordinates.

Solution
1. We can take the derivative of each $$\displaystyle \{x_i\}$$ in Eq. 1 with respect to $$\displaystyle \xi_i$$ as follows


 * {| style="width:100%" border="0" align="left"

{\rm d} x_1 = \frac{\partial x_1}{\partial \xi_1} {\rm d} \xi_1 + \frac{\partial x_1}{\partial \xi_2} {\rm d} \xi_2 + \frac{\partial x_1}{\partial \xi_3} {\rm d} \xi_3 = \cos \xi _3 \cos \xi _2 {\rm d}\xi _1 - \xi _1 \cos \xi _3 \sin \xi _2 {\rm d}\xi _2  - \xi _1 \sin \xi _3 \cos \xi _2 {\rm d}\xi _3 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 2)
 * }
 * }


 * {| style="width:100%" border="0" align="left"

{\rm d} x_2 = \frac{\partial x_2}{\partial \xi_1} {\rm d}\xi_1 + \frac{\partial x_2}{\partial \xi_2} {\rm d}\xi_2 + \frac{\partial x_2}{\partial \xi_3} {\rm d}\xi_3 = \cos \xi _3 \sin \xi _2 {\rm d}\xi _1  + \xi _1 \cos \xi _3 \cos \xi _2 {\rm d}\xi _2  - \xi _1 \sin \xi _3 \sin \xi _2 {\rm d}\xi _3 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 3)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

{\rm d}x_3 = \frac{\partial x_3}{\partial \xi_1} {\rm d}\xi_1 + \frac{\partial x_3}{\partial \xi_2} {\rm d}\xi_2 + \frac{\partial x_3}{\partial \xi_3} {\rm d}\xi_3 = \sin \xi _3 {\rm d}\xi _1 + (0){\rm d}\xi _2  + \xi _1 \cos \xi _3 {\rm d}\xi _3 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 4)
 * }
 * }

Therefore,


 * {| style="width:100%" border="0" align="left"

$$\displaystyle \begin{array}{*{20}l} {\rm d}x_1 & = & \cos \xi _3 \cos \xi _2 {\rm d}\xi _1 - \xi _1 \cos \xi _3 \sin \xi _2 {\rm d}\xi _2  - \xi _1 \sin \xi _3 \cos \xi _2 {\rm d}\xi _3 \\ {\rm d}x_2 & = & \cos \xi _3 \sin \xi _2 {\rm d}\xi _1 + \xi _1 \cos \xi _3 \cos \xi _2 {\rm d}\xi _2  - \xi _1 \sin \xi _3 \sin \xi _2 {\rm d}\xi _3 \\ {\rm d}x_3 & = & \sin \xi _3 {\rm d}\xi _1 + \xi _1 \cos \xi _3 {\rm d}\xi _3 \end{array} $$ $$
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * $$\displaystyle (Eq. 5)
 * }
 * }

2. Using the definition for $$\displaystyle {\rm d} s $$ gives


 * {| style="width:100%" border="0" align="left"

\begin{array}{*{20}l} {\rm d}s^2 & = & \quad \left(\cos \xi _3 \cos \xi _2 {\rm d}\xi _1 - \xi _1 \cos \xi _3 \sin \xi _2 {\rm d}\xi _2  - \xi _1 \sin \xi _3 \cos \xi _2 {\rm d}\xi _3 \right)^2\\ {} & {} & + \left(\cos \xi _3 \sin \xi _2 {\rm d}\xi _1 + \xi _1 \cos \xi _3 \cos \xi _2 {\rm d}\xi _2  - \xi _1 \sin \xi _3 \sin \xi _2 {\rm d}\xi _3 \right)^2 \\ {} & {} & + \left(\sin \xi _3 {\rm d}\xi _1 + \xi _1 \cos \xi _3 {\rm d}\xi _3 \right)^2 \end{array} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 6)
 * }
 * }

Simplifying Eq. 6 yields


 * {| style="width:100%" border="0" align="left"

$$\displaystyle {\rm d}s^2 = \left({\rm d}\xi_1 \right)^2 + \xi_1^2 \cos^2 \xi_3 \left({\rm d} \xi_2\right)^2 + \xi_1^2 \left( {\rm d} \xi_3 \right)^2 $$ $$
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right;">$$\displaystyle (Eq. 7)
 * }
 * }

Therefore,


 * {| style="width:100%" border="0" align="left"

$$\displaystyle h_1 = 1, \quad h_2 = \xi_1 \cos \xi_3, \quad h_3 = \xi_1 $$ $$
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right;">$$\displaystyle (Eq. 8)
 * }
 * }

3. The Laplacian operator over a function $$\displaystyle \psi$$ in 3-D curvilinear coordinates is given by


 * {| style="width:100%" border="0" align="left"

\Delta \psi= \nabla^2 \psi= \frac{1}{h_1 h_2 h_3} \sum_{i=1}^3 \frac{\partial}{\partial \xi_i} \left[ \frac{h_1 h_2 h_3}{h_i^2} \frac{\partial \psi}{\partial \xi_i} \right] $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 9)
 * }
 * }

Substituting the results given in Eq. 8 into Eq. 9 gives


 * {| style="width:100%" border="0" align="left"

\Delta \psi = \frac{1}{\xi_1^2 \cos \xi_3} \left[ \frac{\partial}{\partial \xi_1} \left( \xi_1^2 \cos \xi_3 \frac{\partial \psi}{\partial \xi_1} \right) + \frac{\partial}{\partial \xi_2} \left( \frac{\xi_1^2 \cos \xi_3}{\xi_1^2 \cos^2 \xi_3} \frac{\partial \psi}{\partial \xi_2} \right) + \frac{\partial}{\partial \xi_3} \left(\frac{\xi_1^2 \cos \xi_3}{\xi_1^2} \frac{\partial}{\partial \xi_3} \right) \right] $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 10)
 * }
 * }

Simplifying yields


 * {| style="width:100%" border="0" align="left"

$$\displaystyle \Delta \psi = \frac{1}{\xi_1^2} \frac{\partial}{\partial \xi_1} \left(\xi_1^2 \frac{\partial \psi}{\partial \xi_1} \right) + \frac{1}{\xi_1^2 \cos^2 \xi_3} \frac{\partial^2 \psi}{\partial \xi_2^2} + \frac{1}{\xi_1^2 \cos \xi_3}\left(\cos \xi_3\frac{\partial^2 \psi}{\partial \xi_3^2} \right) $$ $$
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right;">$$\displaystyle (Eq. 11)
 * }
 * }

= Problem 3: Laplacian in Spherical Coordinates (Math/Phys. convention) = From lecture slide 31-2.

Given
The equations for spherical coordinates with Math/Phys. convention are given by:


 * {| style="width:100%" border="0" align="left"

\begin{array}{*{20}l} x_1 & = & r \sin {\bar \theta } \cos \phi & = & \xi_1 \sin {\bar \xi_3 } \cos \xi_2 \\ x_2 & = & r \sin {\bar \theta } \sin \phi & = & \xi_1 \sin {\bar \xi_3 } \sin \xi_2 \\ x_3 & = & r \cos {\bar \theta } & = & \xi_1 \cos {\bar \xi_3 } & \end{array} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 1)
 * }
 * }

Find
Find the Laplacian in these coordinates considering that


 * {| style="width:100%" border="0" align="left"

\bar \theta = \frac{\pi}{2} - \theta $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 2)
 * }
 * }

Solution
Eq. 2 can be written as follows


 * {| style="width:100%" border="0" align="left"

\bar \xi_3 = \frac{\pi}{2} - \xi_3 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 3)
 * }
 * }

Therefore,


 * {| style="width:100%" border="0" align="left"

\cos \xi_3 = \sin \bar \xi_3 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 4)
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\sin \xi_3 = \cos \bar \xi_3 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 5)
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\partial \xi_3 = - \partial \bar \xi_3 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 6)
 * }
 * }

Substituting Eqs. 4, 5 and 6 into Eq.11 from problem 2 gives


 * {| style="width:100%" border="0" align="left"

$$\displaystyle \Delta \psi = \frac{1}{\xi_1^2} \frac{\partial}{\partial \xi_1} \left( \xi_1^2 \frac{\partial \psi}{\partial \xi_1} \right) + \frac{1}{\xi_1^2 \sin^2 \bar \xi_3} \frac{\partial^2 \psi}{\partial \xi_2^2} - \frac{1}{\xi_1^2 \sin \bar \xi_3} \frac{\partial}{\partial \bar \xi_3} \left[ \sin \bar \xi_3 \left(- \frac{\partial \psi}{\partial \bar \xi_3} \right) \right] $$ $$
 * <p style="text-align:right;">$$\displaystyle (Eq. 7)
 * }
 * }

Simplifying Eq. 7 yields


 * {| style="width:100%" border="0" align="left"

$$\displaystyle \Delta \psi = \frac{1}{\xi_1^2} \frac{\partial}{\partial \xi_1} \left( \xi_1^2 \frac{\partial \psi}{\partial \xi_1} \right) + \frac{1}{\xi_1^2 \sin^2 \bar \xi_3} \frac{\partial^2 \psi}{\partial \xi_2^2} + \frac{1}{\xi_1^2 \sin \bar \xi_3} \frac{\partial}{\partial \bar \xi_3} \left( \sin \bar \xi_3 \frac{\partial \psi}{\partial \bar \xi_3} \right) $$ $$
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right;">$$\displaystyle (Eq. 8)
 * }
 * }

= Problem 4: Heat problem in a sphere. Separation of variables =

From lecture slide 31-2.

Given
The following equation


 * {| style="width:100%" border="0" align="left"

\lambda ( \lambda + 1 ) = n(n+1) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 1)
 * }
 * }

Find
Find the two solutions


 * {| style="width:100%" border="0" align="left"

\lambda_1 = n $$ $$ and
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 2)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\lambda_2 = -(n + 1) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 3)
 * }
 * }

Solution
Eq. 1 can be rewritten as follows


 * {| style="width:100%" border="0" align="left"

\lambda ^2 + \lambda - n(n+1) = 0 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 4)
 * }
 * }

The roots for this quadratic equation are given by


 * {| style="width:100%" border="0" align="left"

\lambda _{1,2} = \frac{2} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 5)
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\lambda _{1,2} =  - \frac{1}{2} \pm \sqrt {\frac{1}{4} + n(n + 1)} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 6)
 * }
 * }


 * {| style="width:100%" border="0" align="left"

\lambda _{1,2} =  - \frac{1}{2} \pm \left( {n + \frac{1}{2}} \right) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 7)
 * }
 * }

Taking the positive and negative signs respectively in Eq. 7 yields


 * {| style="width:100%" border="0" align="left"

$$\displaystyle \lambda_1 = n $$ $$
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right;">$$\displaystyle (Eq. 8)
 * }
 * }


 * {| style="width:100%" border="0" align="left"

$$\displaystyle \lambda_2 = -\left( n +1 \right) $$ $$
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right;">$$\displaystyle (Eq. 9)
 * }
 * }

= Problem 5: Legendre Polynomials, equations equivalence =

From lecture slide 31-3.

Given
The Legendre polynomials can generated as follows


 * {| style="width:100%" border="0" align="left"

P_n(x) = \sum_{i=0}^{[n/2]} \frac{(-1)^i (2 n - 2 i)! x^{n - 2i}}{2^n i! (n-i)! (n-2i)!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 1)
 * }
 * }

where $$\displaystyle [n/2]$$ is the integer part of $$\displaystyle n/2$$.

Find
Show that Eq. 1 is equivalent to


 * {| style="width:100%" border="0" align="left"

P_n(x) = \sum_{i=0}^{[n/2]} \frac{1 \cdot 3 \cdot \cdot \cdot \left(2n - 2i - 1\right)}{2^i i! (n-2i)!} (-1)^i x^{n-2i} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 2)
 * }
 * }

Solution
Eq. 1 can be re-written as follows:


 * {| style="width:100%" border="0" align="left"

P_n(x) = \sum_{i=0}^{[n/2]} \frac{(2 n - 2 i)!}{2^n (n-i)! } \frac{(-1)^i x^{n-2i}}{i!(n-2i)!}
 * $$\displaystyle
 * $$\displaystyle

$$ $$
 * <p style="text-align:right;">$$\displaystyle (Eq. 3)
 * }
 * }

The denominator of the left fraction in Eq. 3 can be written as


 * {| style="width:100%" border="0" align="left"

P_n(x) = \sum_{i=0}^{[n/2]} \frac{(2 n - 2 i)!}{2^i 2^{n-i} (n-i)! } \frac{(-1)^i x^{n-2i}}{i!(n-2i)!}
 * $$\displaystyle
 * $$\displaystyle

$$ $$
 * <p style="text-align:right;">$$\displaystyle (Eq. 4)
 * }
 * }

Rearrange Eq. 4 and substitute $$\displaystyle {\rm 2}^ = \prod\limits_{k = 1}^{n - i} 2 $$ and $$\displaystyle (n - i)! = \prod\limits_{k = 1}^{n - i} k $$


 * {| style="width:100%" border="0" align="left"

P_n(x) = \sum_{i=0}^{[n/2]} \frac{(2 n - 2 i)!}{ 2^i \prod\limits_{k = 1}^{n - i} 2 \prod\limits_{k = 1}^{n - i} k } \frac{(-1)^i x^{n-2i}}{ i!(n-2i)!}
 * $$\displaystyle
 * $$\displaystyle

$$ $$
 * <p style="text-align:right;">$$\displaystyle (Eq. 5)
 * }
 * }

Since the products in the denominator of Eq. 5 have the same limits, we have that


 * {| style="width:100%" border="0" align="left"

P_n(x) = \sum_{i=0}^{[n/2]} \frac{(2 n - 2 i)!}{2^i \prod\limits_{k = 1}^{n - i} 2k } \frac{(-1)^i x^{n-2i}}{ i!(n-2i)!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 6)
 * }
 * }

Expanding the numerator and denominator in Eq. 6 gives


 * {| style="width:100%" border="0" align="left"

P_n(x) = \sum_{i=0}^{[n/2]} \frac{1 \cdot \cancel{2}\cdot 3 \cdot \cancel{4} \cdot 5 \cdots (2 n - 2 i-1) \cdot \cancel{2( n - i)}}{2^i \quad \cancel{2} \cdot \cancel{4} \cdots  \cancel{2(n-i)} } \frac{(-1)^i  x^{n-2i}}{ i!(n-2i)!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 7)
 * }
 * }

Simplifying Eq. 7 yields


 * {| style="width:100%" border="0" align="left"

$$\displaystyle P_n(x) = \sum_{i=0}^{[n/2]} \frac{1 \cdot 3 \cdot 5 \cdots  (2 n - 2 i-1) }{ 2^i i!(n-2i)! } (-1)^i x^{n-2i} $$ $$
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right;">$$\displaystyle (Eq. 8)
 * }
 * }

Since Eqs. 2 and 8 are the same, Eqs. 1 and 2 are equivalent.

= Problem 6: Legendre Polynomials, generating the first five polynomials =

From lecture slide 31-3.

Given
The first five Legendre polynomials are given by


 * {| style="width:100%" border="0" align="left"

P_0(x) = 1 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 1)
 * }
 * }


 * {| style="width:100%" border="0" align="left"

P_1(x) = x $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 2)
 * }
 * }


 * {| style="width:100%" border="0" align="left"

P_2(x) = \frac{1}{2} \left(3 x ^ 2 - 1\right) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 3)
 * }
 * }


 * {| style="width:100%" border="0" align="left"

P_3(x) = \frac{1}{2} \left(5 x ^ 3 - 3 x\right) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 4)
 * }
 * }


 * {| style="width:100%" border="0" align="left"

P_4(x) = \frac{35}{8} x ^ 4 - \frac{15}{4} x ^ 2 + \frac{3}{8} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 5)
 * }
 * }

Find
Verify that Eqs. 1, 2, 3, 4, and 5 can be written as


 * {| style="width:100%" border="0" align="left"

P_n(x) = \sum_{i=0}^{[n/2]} \frac{(-1)^i (2 n - 2 i)! x^{n - 2i}}{2^n i! (n-i)! (n-2i)!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 6)
 * }
 * }

or


 * {| style="width:100%" border="0" align="left"

P_n(x) = \sum_{i=0}^{[n/2]} \frac{1 \cdot 3 \cdot \cdot \cdot \left(2n - 2i - 1\right)}{2^i i! (n-2i)!} (-1)^i x^{n-2i} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 7)
 * }
 * }

Solution
Since Eqs. 6 and 7 are equivalent we only need to verify that Eqs. 1 to 5 can be generated with one of them.

1. Substituting $$\displaystyle n=0$$ into Eq. 6 gives


 * {| style="width:100%" border="0" align="left"

P_0(x) = \sum_{i=0}^{[0/2]} \frac{(-1)^i (2 (0) - 2 i)! x^{0 - 2i}}{2^0 i! (0-i)! (0-2i)!}= \sum_{i=0}^{0} \frac{(-1)^i ( - 2 i)! x^{- 2i}}{i! (-i)! (-2i)!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 8)
 * }
 * }

Evaluating the sum gives


 * {| style="width:100%" border="0" align="left"

P_0(x) = \frac{0!}{0!0!0!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 9)
 * }
 * }

Evaluating Eq. 9 yields


 * {| style="width:100%" border="0" align="left"

$$\displaystyle P_0(x) = 1 $$ $$
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right;">$$\displaystyle (Eq. 10)
 * }
 * }

2. Substituting $$\displaystyle n=1$$ into Eq. 6 gives


 * {| style="width:100%" border="0" align="left"

P_1(x) = \sum_{i=0}^{[1/2]} \frac{(-1)^i (2 (1) - 2 i)! x^{1 - 2i}}{2^1 i! (1-i)! (1-2i)!}= \sum_{i=0}^{0} \frac{(-1)^i (2 - 2 i)! x^{1 - 2i}}{2 i! (1-i)! (1-2i)!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 11)
 * }
 * }

Evaluating the sum gives


 * {| style="width:100%" border="0" align="left"

P_1(x) = \frac{(-1)^0 \cancel{2!} x}{\cancel{2}0!1!1!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 12)
 * }
 * }

Evaluating Eq. 12 yields


 * {| style="width:100%" border="0" align="left"

$$\displaystyle P_1(x) = x $$ $$
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right;">$$\displaystyle (Eq. 13)
 * }
 * }

3. Substituting $$\displaystyle n=2$$ into Eq. 6 gives


 * {| style="width:100%" border="0" align="left"

P_2(x) = \sum_{i=0}^{[2/2]} \frac{(-1)^i (2 (2) - 2 i)! x^{2 - 2i}}{2^2 i! (2-i)! (2-2i)!}= \sum_{i=0}^{1} \frac{(-1)^i (4 - 2 i)! x^{2 - 2i}}{4 i! (2-i)! (2-2i)!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 14)
 * }
 * }

Evaluating the sum gives


 * {| style="width:100%" border="0" align="left"

P_2(x) = \frac{1 \cdot 2 \cdot 3 \cdot 4 \cdot x^{2}}{4 \cdot 1 \cdot 2! \cdot 2!} - \frac{2!}{4 \cdot 1 \cdot 1 \cdot 1} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 15)
 * }
 * }

Evaluating Eq. 15 yields


 * {| style="width:100%" border="0" align="left"

$$\displaystyle P_2(x) = \frac{1}{2}(3x^2-1) $$ $$
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right;">$$\displaystyle (Eq. 16)
 * }
 * }

4. Substituting $$\displaystyle n=3$$ into Eq. 6 gives


 * {| style="width:100%" border="0" align="left"

P_3(x) = \sum_{i=0}^{[3/2]} \frac{(-1)^i (2 (3) - 2 i)! x^{3 - 2i}}{2^3 i! (3-i)! (3-2i)!}= \sum_{i=0}^{1} \frac{(-1)^i (6 - 2 i)! x^{3 - 2i}}{8 i! (3-i)! (3-2i)!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 17)
 * }
 * }

Evaluating the sum gives


 * {| style="width:100%" border="0" align="left"

P_3(x) = \frac{6! \cdot x^{3}}{8 \cdot 3! \cdot 3!} - \frac{4! \cdot x}{8 \cdot 2!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 18)
 * }
 * }

Evaluating Eq. 18 yields


 * {| style="width:100%" border="0" align="left"

$$\displaystyle P_3(x) = \frac{1}{2}(5x^3-3x) $$ $$
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right;">$$\displaystyle (Eq. 19)
 * }
 * }

5. Substituting $$\displaystyle n=4$$ into Eq. 6 gives


 * {| style="width:100%" border="0" align="left"

P_4(x) = \sum_{i=0}^{[4/2]} \frac{(-1)^i (2 (4) - 2 i)! x^{4 - 2i}}{2^4 i! (4-i)! (4-2i)!}= \sum_{i=0}^{2} \frac{(-1)^i (8 - 2 i)! x^{4 - 2i}}{16 i! (4-i)! (4-2i)!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 20)
 * }
 * }

Evaluating the sum gives


 * {| style="width:100%" border="0" align="left"

P_4(x) = \frac{ 8! \cdot x^{4}}{16 \cdot (4)! \cdot (4)!} -  \frac{6! \cdot x^{2}}{16 \cdot 3! \cdot 2!} +  \frac{ 4! }{16 \cdot 2! \cdot 2!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 21)
 * }
 * }

Evaluating Eq. 21 yields


 * {| style="width:100%" border="0" align="left"

$$\displaystyle P_4(x) = \frac{35}{8} x ^ 4 - \frac{15}{4} x ^ 2 + \frac{3}{8} $$ $$
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right;">$$\displaystyle (Eq. 22)
 * }
 * }