User:Egm6321.f09.Team1/HW6

 Nice overall organization and level of details in the work. Egm6321.f09 15:49, 23 November 2009 (UTC)

= 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" |
 * <p style="text-align:right;">$$\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)
 * }
 * }

= Problem 7: Legendre Polynomials as solutions of the Legendre equation =

From lecture slide 32-1.

Given
The first 5 Legendre polynomials are (from lecture note slide 31-3
 * {| 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"
 * {| 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"
 * {| 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"
 * {| 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"
 * {| 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 $$\displaystyle P_0$$, $$\displaystyle P_1$$, $$\displaystyle P_2$$, $$\displaystyle P_3$$, and $$\displaystyle P_4$$ are solutions to the Legendre polynomial (from lecture slide 14-2)
 * {| style="width:100%" border="0" align="left"

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

Solution
0. For $$\displaystyle n=0$$, we substitute Eq. 1 into Eq. 6
 * {| style="width:100%" border="0" align="left"

$$\displaystyle (1-x^2) y'' - 2 x y' + n(n+1) y = (1-x^2) 0 - 2 x 0 + 0(0+1) 1 = 0 $$ $$
 * 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)
 * }
 * }

1. For $$\displaystyle n=1$$, we substitute Eq. 2 into Eq. 6
 * {| style="width:100%" border="0" align="left"

$$\displaystyle (1-x^2) y'' - 2 x y' + n(n+1) y = (1-x^2) 0 - 2 x + 1(1+1) x = -2x + 2x = 0 $$ $$
 * 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)
 * }
 * }

2. For $$\displaystyle n=2$$, we substitute Eq. 3 into Eq. 6
 * {| style="width:100%" border="0" align="left"

(1-x^2) y'' - 2 x y' + n(n+1) y = (1-x^2) 3 - 6 x^2 + 2(2+1)\frac{1}{2} \left(3 x^2 - 1\right) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 9)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

(1-x^2) y'' - 2 x y' + n(n+1) y = 3-3 x^2 - 6 x^2 + 3 \left(3 x^2 - 1\right) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 10)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

$$\displaystyle (1-x^2) y'' - 2 x y' + n(n+1) y = \left(-3-6+9\right) x^2 + 3 - 3 = 0 $$ $$
 * 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)
 * }
 * }

3. For $$\displaystyle n=3$$, we substitute Eq. 4 into Eq. 6
 * {| style="width:100%" border="0" align="left"

(1-x^2) y'' - 2 x y' + n(n+1) y = (1-x^2) 15 x - 2 x \frac{1}{2} \left(15x^2 - 3\right)+ 3(3+1)\frac{1}{2} \left(5 x^3 - 3x\right) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 12)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

(1-x^2) y'' - 2 x y' + n(n+1) y = 15 x - 15 x^3 - 15x^3 + 3x + 30 x^3 - 18x $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 13)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

$$\displaystyle (1-x^2) y'' - 2 x y' + n(n+1) y = 18 x - 30 x^3 + 30 x^3 - 18x = 0 $$ $$
 * 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. 14)
 * }
 * }

4. For $$\displaystyle n=4$$, we substitute Eq. 5 into Eq. 6
 * {| style="width:100%" border="0" align="left"

(1-x^2) y'' - 2 x y' + n(n+1) y = (1-x^2) \left(\frac{105}{2} x^2 - \frac{15}{2} \right) - 2 x \left(\frac{35}{2} x^3 - \frac{15}{2} x\right) + 4(4+1) \left(\frac{35}{8} x^4 - \frac{15}{4} x^2 + \frac{3}{8}\right) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 15)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

(1-x^2) y'' - 2 x y' + n(n+1) y = \frac{105}{2} x^2 - \frac{15}{2} - \frac{105}{2} x^4 + \frac{15}{2} x^2 - 35 x^4 + 15 x^2 +  \left(\frac{175}{2} x^4 - 75 x^2 + \frac{15}{2}\right) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 16)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

$$\displaystyle (1-x^2) y'' - 2 x y' + n(n+1) y = - \frac{105}{2} x^4 + \frac{175}{2} x^4 - 35 x^4 + \frac{105}{2} x^2 + \frac{15}{2} x^2  + 15 x^2 - 75 x^2 + \frac{15}{2}- \frac{15}{2} = 0 $$ $$
 * 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. 17)
 * }
 * }

= Problem 8: Separation of variables for the Laplace equation and the Bessel differential equation =

From lecture slide 32-1.

Given
The Laplace Equation in circular cylinder coordinates $$\displaystyle \Delta \psi = 0 $$

Find
Obtain the separated equations for Laplace equation on circular cylinder coordinates, and identify the Bessel differential equation


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

x^2 y'' + x y' - (x^2 - \nu^2) y = 0 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 1)
 * }
 * }

Solution
Assume the total solution of the Laplace equation is given by


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

f(\xi_1, \xi_2, \xi_3) = X_1(\xi_1) X_2(\xi_2) X_3(\xi_3) $$ $$ Using Laplace operator on the function $$\displaystyle f$$, we can write Laplace equation
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 2)
 * }
 * }


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

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


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

X_2 X_3 \frac{1}{\xi_1} \frac{\partial }{\partial \xi_1} \left(\xi_1 \frac{\partial X_1}{\partial \xi_1} \right) + X_1 X_3 \frac{1}{\xi_1^2} \frac{\partial^2 X_2}{\partial \xi_2^2} + X_1 X_2 \frac{\partial^2 X_3}{\partial \xi_3^2} = 0 $$ $$ Divide by $$\displaystyle X_1 X_2 X_3$$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 4)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\frac{1}{\xi_1 X_1 } \frac{\partial }{\partial \xi_1} \left(\xi_1 \frac{\partial X_1}{\partial \xi_1} \right) + \frac{1}{\xi_1^2 X_2} \frac{\partial^2 X_2}{\partial \xi_2^2} + \frac{1}{X_3} \frac{\partial^2 X_3}{\partial \xi_3^2} = 0 $$ $$ The last term is only dependent on $$\displaystyle \xi_3$$, and is the only term dependent on $$\displaystyle \xi_3$$, hence it must be a constant. So we substitute
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 5)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\frac{1}{\xi_1 X_1 } \frac{\partial }{\partial \xi_1} \left(\xi_1 \frac{\partial X_1}{\partial \xi_1} \right) + \frac{1}{\xi_1^2 X_2} \frac{\partial^2 X_2}{\partial \xi_2^2} - \beta^2 = 0 $$ $$ where
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 6)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\beta^2 = -\frac{1}{X_3} \frac{\partial^2 X_3}{\partial \xi_3^2} $$ $$ Now, multiply by $$\displaystyle \xi_1^2$$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 7)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\frac{\xi_1}{ X_1 } \frac{\partial }{\partial \xi_1} \left(\xi_1 \frac{\partial X_1}{\partial \xi_1} \right) + \frac{1}{X_2} \frac{\partial^2 X_2}{\partial \xi_2^2} - \xi_1^2 \beta^2 = 0 $$ $$ Now, the second term is only dependent on $$\displaystyle \xi_2$$, and it is the only term dependent on $$\displaystyle \xi_2$$. It must also be a constant. We can substitute
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 8)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\nu^2 = \frac{1}{X_2} \frac{\partial^2 X_2}{\partial \xi_2^2} $$ $$ So that
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 9)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\frac{\xi_1}{ X_1 } \frac{\partial }{\partial \xi_1} \left(\xi_1 \frac{\partial X_1}{\partial \xi_1} \right) + \nu^2 - \xi_1^2 \beta^2 = 0 $$ $$ Expand the first term
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 10)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\frac{\xi_1^2}{ X_1 } \frac{\partial^2 X_1}{\partial \xi_1^2} + \frac{\xi_1}{ X_1 } \frac{\partial X_1}{\partial \xi_1} + \nu^2 - \xi_1^2 \beta^2 = 0 $$ $$ Multiply by $$\displaystyle X_1$$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 11)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\xi_1^2 \frac{\partial^2 X_1}{\partial \xi_1^2} + \xi_1 \frac{\partial X_1}{\partial \xi_1} - \left( \xi_1^2 \beta^2 - \nu^2 \right) X_1 = 0 $$ $$ Now, substitute $$\displaystyle x = \xi_1 \beta$$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 12)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

x^2 \frac{\partial^2 X_1}{\partial x^2} + x \frac{\partial X_1}{\partial x} - \left( x^2 - \nu^2 \right) X_1 = 0 $$ $$ Then, with $$\displaystyle X_1 = y(x)$$, we get
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 13)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

x^2 \frac{\partial^2 y}{\partial x^2} + x \frac{\partial y}{\partial x} - \left( x^2 - \nu^2 \right) y = 0 $$ $$ or
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 14)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle x^2 y'' + x y' - \left( x^2 - \nu^2 \right) y = 0 $$ $$ which is the same as Eq. 1, i.e. the Bessel differential equation.
 * 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. 15)
 * }
 * }

= Problem 9: Sums of Even and Odd Functions =

From lecture slide 33-3

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

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

Find
Show that: 1. if the family $$\displaystyle \{g_i\}$$ is odd, then $$\displaystyle f$$ is odd.

2. if the family $$\displaystyle \{g_i\}$$ is even, then $$\displaystyle f$$ is even.

Solution
1. The definition of an odd function is that $$\displaystyle f(x) = -f(-x)$$.
 * {| style="width:100%" border="0" align="left"

$$\displaystyle f(x) = \sum_i g_i(x) = \sum_i \left[-g_i(-x)\right] = -\sum_i g_i(-x) = -f(-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. 2)
 * }
 * }

2. The definition of an even function is that $$\displaystyle f(x) = f(-x)$$. So, if every $$\displaystyle g_i$$ is even, then
 * {| style="width:100%" border="0" align="left"

$$\displaystyle f(x) = \sum_i g_i(x) = \sum_i g_i(-x) = f(-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. 3)
 * }
 * }

= Problem 10: Legendre Polynomials' Evenness and Oddness =

From lecture slide 33-3

Given
The Legendre polynomials are given by
 * {| style="width:100%" border="0" align="left"

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

Find
Show that, with $$\displaystyle k = 0,1,2,...$$,

1. $$\displaystyle P_{2k}(x)$$ is even

2. $$\displaystyle P_{2k+1}(x)$$ is odd

Solution
1. The definition of an even function is that $$\displaystyle f(x) = f(-x)$$. Substitute $$\displaystyle n=2k$$ in Eq. 1
 * {| style="width:100%" border="0" align="left"

P_{2k}(x) = \sum_{i=0}^{k} (-1)^i \frac{(4k - 2 i)! x^{2k - 2i}}{2^{2k} i! (2k-1)! (2k-2i)!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 2)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

P_{2k}(x) = \sum_{i=0}^{k} (-1)^i \frac{(4k - 2 i)! \left[(x)^2\right]^{k - i}}{2^{2k} i! (2k-1)! (2k-2i)!} $$ $$ Then, since both $$\displaystyle i$$ and $$\displaystyle k$$ are integers,
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 3)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle P_{2k}(x) = \sum_{i=0}^{k} (-1)^i \frac{(4k - 2 i)! \left[(-x)^2\right]^{k - i}}{2^{2k} i! (2k-1)! (2k-2i)!} = P_{2k}(-x) $$ $$ 2. The definition of an odd function is that $$\displaystyle f(x) = -f(-x)$$. Substitute $$\displaystyle n=2k+1$$ in Eq. 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. 4)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

P_{2k+1}(x) = \sum_{i=0}^{k} (-1)^i \frac{(4k + 2 - 2 i)! x^{2k + 1 - 2i}}{2^{2k+1} i! (2k)! (2k+1-2i)!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 5)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

P_{2k+1}(x) = \sum_{i=0}^{k} (-1)^i \frac{(4k + 2 - 2 i)! (x) \left[(x)^2\right]^{k - i}}{2^{2k+1} i! (2k)! (2k+1-2i)!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 6)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

P_{2k+1}(x) = \sum_{i=0}^{k} (-1)^i \frac{(4k + 2 - 2 i)! (x) \left[(-x)^2\right]^{k - i}}{2^{2k+1} i! (2k)! (2k+1-2i)!} $$ $$ But Eq. 6 at $$\displaystyle -x$$ is
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 7)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

P_{2k+1}(-x) = \sum_{i=0}^{k} (-1)^i \frac{(4k + 2 - 2 i)! (-x) \left[(-x)^2\right]^{k - i}}{2^{2k+1} i! (2k)! (2k+1-2i)!} $$ $$ Comparing Eqs. 7 and 8 shows that
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 8)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle P_{2k+1}(x) = -P_{2k+1}(-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. 9)
 * }
 * }

= Problem 11: Computation of Legendre Coefficients Using the Gram Matrix Method =

From lecture slide 33-4

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

q(x) = \sum_{i=0}^4 c_i x^i $$ $$ with the coefficients
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 1)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

c_0 = 3, \quad c_1 = 10, \quad c_2 = 15, \quad c_3 = -1, \quad c_4 = 5 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 2)
 * }
 * }

Find
1. Find the coefficients $$\displaystyle \{ a_i \}$$ s.t. $$\displaystyle q(x) = \sum_{i=0}^4 a_i P_i(x)$$, where $$\displaystyle P_i(x)$$ are Legendre polynomials.

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

q = \sum_i c_i x^i $$ $$ and
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 3)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

q = \sum_i a_i P_i(x) $$ $$ to verify that they are equal.
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 4)
 * }
 * }

Solution
1. The first 5 Legendre polynomials are
 * {| style="width:100%" border="0" align="left"

\underbrace{ \left\{ \begin{matrix} P_0(x) \\ P_1(x) \\ P_2(x) \\ P_3(x) \\ P_4(x) \end{matrix} \right\} }_{\mathbf{P}(x)} = \left\{ \begin{matrix} 1 \\ x \\ \frac{1}{2} \left(3 x^2 - 1\right) \\ \frac{1}{2} \left(5 x^3 - 3 x\right) \\ \frac{35}{8} x^4 - \frac{15}{4} x^2 + \frac{3}{8} \end{matrix} \right\} = \underbrace{ \left[ \begin{matrix} 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \\ -\frac{1}{2} & 0 & \frac{3}{2} & 0 & 0 \\ 0 & -\frac{3}{2} & 0 & \frac{5}{2} & 0 \\ \frac{3}{8} & 0 & -\frac{15}{4} & 0 & \frac{35}{8} \end{matrix} \right] }_{A} \underbrace{ \left\{ \begin{matrix} 1 \\ x \\ x^2 \\ x^3 \\ x^4 \end{matrix} \right\} }_{\mathbf{x}} $$ $$ Then we have that
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 5)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

q(x) = \mathbf{a} \cdot \mathbf{P}(x) = \mathbf{a}^T A \mathbf{x} = \mathbf{c}^T \mathbf{x} $$ $$ the above is true for all $$\displaystyle \mathbf{x}$$ if
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 6)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\mathbf{a}^T A = \mathbf{c}^T $$ $$ or
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 7)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\mathbf{a}^T = \mathbf{c}^T A^{-1} $$ $$ The inverse of $$\displaystyle A$$ is
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 8)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

A^{-1} = \left[ \begin{matrix} 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \\ \frac{1}{3} & 0 & \frac{2}{3} & 0 & 0 \\ 0 & \frac{3}{5} & 0 & \frac{2}{5} & 0 \\ \frac{1}{5} & 0 & \frac{4}{7} & 0 & \frac{8}{35} \end{matrix} \right] $$ $$ Hence
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 9)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\mathbf{a}^T = \left\{ \begin{matrix} 3 \\ 10 \\ 15 \\ -1 \\ 5 \end{matrix} \right\}^T \left[ \begin{matrix} 1 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 \\ \frac{1}{3} & 0 & \frac{2}{3} & 0 & 0 \\ 0 & \frac{3}{5} & 0 & \frac{2}{5} & 0 \\ \frac{1}{5} & 0 & \frac{4}{7} & 0 & \frac{8}{35} \end{matrix} \right] = \left\{ \begin{matrix} 9 \\ \frac{47}{5} \\ \frac{90}{7} \\ -\frac{2}{5} \\ \frac{8}{7} \end{matrix} \right\}^T $$ $$ So the answer is
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 10)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle \mathbf{a} = \left\{ \begin{matrix} 9 \\ \frac{47}{5} \\ \frac{90}{7} \\ -\frac{2}{5} \\ \frac{8}{7} \end{matrix} \right\} \approx \left\{ \begin{matrix} 9 \\ 9.4 \\ 12.8571 \\ -0.4 \\ 1.1429 \end{matrix} \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)
 * }
 * }

2. The two functions are plotted



Matlab source code:

= Problem 12: L2-ODE-VC = From lecture slides 22-2, 22-3. If you did this in homework 4, just link to it.

Given
From, p. 28, problem 1.1b.
 * {| style="width:100%" border="0" align="left"

x y'' + 2 y' + xy = 0 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 1)
 * }
 * }

Find
1. Verify the exactness of Eq. 1.

2. Try the following trial solutions

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

y(x) = e^{rx} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 2)
 * }
 * }

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

y(x) = x e^{rx} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 3)
 * }
 * }

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

y(x) = \frac{1}{x} e^{rx} $$ $$ where $$\displaystyle r$$ is a (possibly complex) constant.
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 4)
 * }
 * }

3. Use undetermined factor method to find $$\displaystyle u_2(x)$$, knowing $$\displaystyle u_1(x)$$. Compare to the above results.

Solution
1. Assume
 * {| style="width:100%" border="0" align="left"

F(x, y, y', y'') = \frac{{\rm} d \phi(x, y, y')}{{\rm d}x} = \underbrace{\phi_x + \phi_y y'}_{g} + \underbrace{\phi_{y'}}_{f} y'' $$ $$ and $$\displaystyle p=y'$$. Then
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 5)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

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

g(x) = 2 p + x y $$ $$ Then, for the differential equation to be exact, we need that (from lecture slide 10-2)
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 7)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

f_{xx} + 2p f_{xy} + p^2 f_{yy} = g_{xp} + p g_{yp} - g_y $$ $$ and
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 8)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

f_{xp} + p f_{yp} + 2 f_{y} = g_{pp} $$ $$ The only non-zero derivative in the above equations is
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 9)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle g_y = x $$ $$ hence, Eq. 8 is not fulfilled. We need to multiply Eq. 5 with an integrating factor $$\displaystyle x^a y^b p^c$$, so we get
 * 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)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\tilde f(x) = x^{a+1} y^b p^c $$ $$ and
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 11)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

g(x) = 2 x^a y^b p^{c+1} + x^{a+1} y^{b+1} p^c $$ $$ Eqs. 8 and 9 then become
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 12)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

(a+1)ax^{a-1} y^b p^c + 2 (a+1) b p x^{a} y^{b-1} p^c + b (b-1) p^2 x^{a+1} y^{b-2} p^c $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

= 2 a(c+1) x^{a-1} y^b p^{c} + (a+1) c x^{a} y^{b+1} p^{c-1} + 2 b (c+1) x^a y^{b-1} p^{c+1} + (b+1) c x^{a+1} y^{b} p^c + - 2 b x^a y^{b-1} p^{c+1} - (b+1) x^{a+1} y^{b} p^c $$ $$ and
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 13)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

(a+1) c x^{a} y^b p^{c-1} + b c x^{a+1} y^{b-1} p^c + 2 b x^{a+1} y^{b-1} p^c = 2 c (c+1) x^a y^b p^{c-1} + c(c-1) x^{a+1} y^{b+1} p^{c-2} $$ $$ Divide 13 with $$\displaystyle x^{a-1} y^{b-1} p^{c-1}$$ and group terms
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 14)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

(a+1)a y p + 2 (a+1) b x p^2 + b (b-1) p^3 x^1 y^{-1} $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

= 2 a(c+1) y p + (a+1) c x y^2 p + 2 b (c+1) x p^{2} + (b+1) c x^{2} y p - 2 b x p^{2} - (b+1) x^{2} y p $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 15)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

\left\{ ay \left[a -  2 c - 1\right] - (b+1) x^{2} y \left[c -  1\right] \right\}p + \left\{ a - c + 1 \right\} 2 b p^2 x + b (b-1) p^3 x^1 y^{-1} = (a+1) c x y^2 + $$ $$ For the above equation to be satisfied, we need $$\displaystyle b=0$$ or $$\displaystyle b=1$$, and we are left with
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 16)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\left\{ ay \left[a -  2 c - 1\right] - (b+1) x^{2} y \left[c -  1\right] \right\}p + \left\{ a - c + 1 \right\} 2 b p^2 x = (a+1) c x y^2 $$ $$ Then, for the second term in the first parenthesis to vanish, we need $$\displaystyle c = 1$$, so that
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 17)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\left\{ ay \left[a - 3\right] \right\}p + \left\{ a \right\} 2 b p^2 x = (a+1) x y^2 $$ $$ Then if we choose $$\displaystyle b=0$$, we get
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 18)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle \left\{ ay \left[a - 3\right] \right\}p = (a+1) x y^2 $$ $$ We only have $$\displaystyle a$$ left to choose, and it cannot be chosen to satisfy the above equation. Hence, Eq. 8 cannot be satisfied using an integrating factor of the form $$\displaystyle x^a y^b z^c$$.
 * 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)
 * }
 * }

2.1. Differentiate Eq. 2 twice:
 * {| style="width:100%" border="0" align="left"

y'(x) = r e^{rx} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 20)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

y''(x) = r^2 e^{rx} $$ $$ Substitute into Eq. 1
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 21)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

x r^2 e^{rx} + 2 r e^{rx} + x e^{rx} = 0 $$ $$ Divide by $$\displaystyle e^{rx} x$$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 22)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

r^2 + \frac{2}{x} r + 1 = 0 $$ $$ Then $$\displaystyle r$$ is
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 23)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle r = - x^{-1} \pm \sqrt{x^{-2} - 1} $$ $$ $$\displaystyle r$$ was assumed to be a constant while differentiating Eq. 2, which it clearly can't be.
 * 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. 24)
 * }
 * }

2.2. Differentiate Eq. 3 twice
 * {| style="width:100%" border="0" align="left"

y'(x) = e^{rx} + r x e^{rx} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 25)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

y''(x) = 2 r e^{rx} + r^2 x e^{rx} $$ $$ Substitute into Eq. 1
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 26)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

2 r x e^{rx} + r^2 x^2 e^{rx} + 2 e^{rx} + 2 r x e^{rx} + + x^2 e^{rx} = 0 $$ $$ Divide by $$\displaystyle x^2 e^{rx}$$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 27)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

r^2 + 4 r x^{-1} + 2 x^{-2} + 1 = 0 $$ $$ Solve for $$\displaystyle r$$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 28)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

r = - 2 x^{-1} \pm \sqrt{4 x^{-2} - 2 x^{-2} - 1} = - 2 x^{-1} \pm \sqrt{2 x^{-2} - 1} $$ $$ $$\displaystyle r$$ was assumed to be a constant while differentiating Eq. 3, which it clearly can't be.
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 29)
 * }
 * }

2.3. Differentiate Eq. 4 twice
 * {| style="width:100%" border="0" align="left"

y'(x) = -\frac{1}{x^2} e^{rx} + \frac{r}{x} e^{rx} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 30)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

y''(x) = \frac{2}{x^3} e^{rx} -\frac{2 r}{x^2} e^{rx} + \frac{r^2}{x} e^{rx} $$ $$ Substitute into Eq. 1
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 31)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\left( \frac{2}{x^2} -\frac{2 r}{x} + r^2 - \frac{2}{x^2} + \frac{2 r}{x} + 1 \right) e^{rx} = 0 $$ $$ Divide by $$\displaystyle e^{rx}$$ and remove canceling terms
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 32)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

r^2 + 1 = 0 $$ $$ Hence $$\displaystyle r = \pm \sqrt{1} = \pm i$$ and
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 33)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle y = A \frac{e^{i x}}{x} + B \frac{e^{- i x}}{x} = C_1 \frac{\sin x}{x} + C_2 \frac{\cos 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. 34)
 * }
 * }

3. See Homework 4, Problem 4, part 2

= Problem 13: Legendre Polynomials' Orthogonality = From lecture slide 34-2

Given
Consider the boundary condition
 * {| style="width:100%" border="0" align="left"

\psi(1,\theta) = f(\theta) = T_0 \cos \theta $$ $$ where
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 1)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

f(\mu) = T_0 \sqrt{1 - \mu^2} $$ $$ is even, and
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 2)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\mu = \sin \theta $$ $$ Eq. 5 from lecture slide 33-2
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 3)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

A_n = \frac{2n + 1}{2} <f, P_n> $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 4)
 * }
 * }

Find
1. Without calculation, find property of $$\displaystyle A_n$$, i.e.
 * {| style="width:100%" border="0" align="left"

\begin{cases} A_{2k} = 0 \\ A_{2k+1} = 0 \end{cases} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 5)
 * }
 * }

2. Compute 3 non-zero coefficients of $$\displaystyle A_n$$

2a. Analytical, using either $$\displaystyle \theta$$ or $$\displaystyle \mu$$ as integrating variable

2b. Numerically, using Gauss-Legendre, accurately within $$\displaystyle 5\%$$

Solution
1. Eq. 3 from lecture slide 33-1
 * {| style="width:100%" border="0" align="left"

<f, P_n> = \int_{-1}^1 f(\mu) P_n(\mu) \, {\rm d}\mu $$ $$ We can split the integral up in two intervals
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 6)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

<f, P_n> = \int_{-1}^0 f(\mu) P_n(\mu) \, {\rm d}\mu + \int_{0}^1 f(\mu) P_n(\mu) \, {\rm d}\mu $$ $$ When $$\displaystyle n$$ is odd, so is $$\displaystyle P_n$$, and $$\displaystyle f(\mu)$$ is $$\displaystyle even$$. Hence, when $$\displaystyle n$$ is odd, we have that $$\displaystyle n = 2k + 1$$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 7)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

<f, P_{2k+1}> = \int_{-1}^0 f(-\mu) (-P_{2k+1}(-\mu)) \, {\rm d}\mu + \int_{0}^1 f(\mu) P_{2k+1}(\mu) \, {\rm d}\mu $$ $$ We can substitute $$\displaystyle \xi = -\mu$$ in the first integral so that
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 8)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

<f, P_{2k+1}> = \int_1^0 f(\xi) P_{2k+1}(\xi) \, {\rm d}\xi + \int_0^1 f(\mu) P_{2k+1}(\mu) \, {\rm d}\mu $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 9)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

<f, P_{2k+1}> = - \int_0^1 f(\xi) P_{2k+1}(\xi) \, {\rm d}\xi + \int_0^1 f(\mu) P_{2k+1}(\mu) \, {\rm d}\mu = 0 $$ $$ Hence
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 10)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle A_{2k+1} = \frac{2k + 2}{2} <f, P_{2k+1}> = 0 $$ $$
 * 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)
 * }
 * }

2.

2a.

The expression for $$\displaystyle A_n $$ is given by,


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

\begin{align} A_n & = \frac{2n+1}{2} \int_{-\pi/2}^{\pi/2} f(\theta)P_n(\sin\theta)d(\sin\theta) \\ & = \frac{2n+1}{2} \int_{-1}^{1} f(\mu)P_n(\mu)d\mu \\ \end{align} $$
 * $$\displaystyle
 * $$\displaystyle


 * }.
 * }.

where $$\displaystyle \mu = \sin\theta $$ and $$\displaystyle f(\mu) = T_0 \sqrt{1-\mu^2} $$.

$$\displaystyle A_n = 0 $$ for odd values of $$\displaystyle n $$.

(i.) When $$\displaystyle n = 0 $$, we know $$\displaystyle P_n(\mu) = 1 $$ and so,


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


 * $$\displaystyle
 * $$\displaystyle

A_0 = \frac{2(0)+1}{2} \int_{-1}^{1} T_0 \sqrt{1-\mu^2} d\mu

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


 * }.
 * }.

Using definite integrals in Matlab, we get,


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


 * $$\displaystyle
 * $$\displaystyle

\int_{-1}^{1} \sqrt{1-\mu^2} d\mu = \left[ \frac{\pi}{2} \right]

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


 * }.
 * }.

Substituting equation (13) in (12),


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


 * $$\displaystyle
 * $$\displaystyle

\Rightarrow A_0 = \frac{T_0}{2} \left[ \frac{\pi}{2} \right]

$$
 * }.
 * }.


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

$$\displaystyle
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |

\Rightarrow A_0 = \frac{\pi T_0}{4}

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

(ii.) When $$\displaystyle n = 2 $$, we know $$\displaystyle P_n(\mu) = \frac{1}{2} (3

\mu^2 - 1) $$ and so,


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


 * $$\displaystyle
 * $$\displaystyle

A_2 = \frac{2(2)+1}{2} \int_{-1}^{1} T_0 \sqrt{1-\mu^2} \left[\frac{1}{2} (3\mu^2 - 1) \right]d\mu

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


 * }.
 * }.

Using definite integrals in Matlab, we get,


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


 * $$\displaystyle
 * $$\displaystyle

\int_{-1}^{1} \sqrt{1-\mu^2}\left[\frac{1}{2} (3\mu^2 - 1) \right] d\mu = \left[ \frac{-\pi}{16} \right]

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


 * }.
 * }.

Substituting equation (16) in (15),


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


 * $$\displaystyle
 * $$\displaystyle

\Rightarrow A_2 = \frac{5T_0}{2} \left[ \frac{-\pi}{16} \right]

$$
 * }.
 * }.


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

$$\displaystyle
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |

\Rightarrow A_2 = \frac{-5\pi T_0}{32}

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

(iii) When $$\displaystyle n = 4 $$, we know $$\displaystyle P_n(\mu) = \frac{35}{8} \mu^4 - \frac{15}{4} \mu^2 + \frac{3}{8} $$ and so,


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


 * $$\displaystyle
 * $$\displaystyle

A_4 = \frac{2(2)+1}{2} \int_{-1}^{1} T_0 \sqrt{1-\mu^2} \left[\frac{35}{8} \mu^4 - \frac{15}{4} \mu^2 + \frac{3}{8} \right]d\mu

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


 * }.
 * }.

Using definite integrals in Matlab, we get,


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


 * $$\displaystyle
 * $$\displaystyle

\int_{-1}^{1} \sqrt{1-\mu^2}\left[\frac{35}{8} \mu^4 - \frac{15}{4} \mu^2 + \frac{3}{8} \right] d\mu = \left[ \frac{-\pi}{128} \right]

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


 * }.
 * }.

Substituting equation (19) in (18),


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


 * $$\displaystyle
 * $$\displaystyle

\Rightarrow A_4 = \frac{9T_0}{2} \left[ \frac{-\pi}{128} \right]

$$
 * }.
 * }.


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

$$\displaystyle
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |

\Rightarrow A_4 = \frac{-9\pi T_0}{256}

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

2b. The expression for $$\displaystyle A_n $$ is given by,


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

\begin{align} A_n & = \frac{2n+1}{2} \int_{-1}^{1} f(\mu)P_n(\mu)d\mu \\ & = \frac{2n+1}{2} \sum_{j=1}^{m} w_jf(x_j)P_n(x_j) \end{align} $$
 * $$\displaystyle
 * $$\displaystyle


 * }
 * }

where,


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

w_j = \frac{-2}{(n+1)P'_m(x_j)P_{m+1}(x_j)} $$
 * $$\displaystyle
 * $$\displaystyle


 * }.
 * }.

(i.) For n = 0 and m = 20 we get,


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


 * $$\displaystyle
 * $$\displaystyle

\Rightarrow P_0 = 1

$$


 * }
 * }

and,


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

\begin{align} \Rightarrow A_0 & = \frac{2(0)+1}{2} \sum_{j=1}^{20} T_0 w_j \sqrt{1-x_{j}^{2}}\\ & = \frac{T_0}{2} \left[ 1.570892146048340 \right] \end{align} $$
 * $$\displaystyle
 * $$\displaystyle


 * }.
 * }.


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

$$\displaystyle
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |

\Rightarrow A_0 = 7.854460730241699\cdot 10^{-1} \cdot T_0

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

(ii.) For n = 2 and m = 20 we get,


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


 * $$\displaystyle
 * $$\displaystyle

\Rightarrow P_2 = \frac{1}{2} (3x^2-2)

$$


 * }
 * }

and,


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

\begin{align} \Rightarrow A_2 & = \frac{2(2)+1}{2} \sum_{j=1}^{20} T_0 w_j (\frac{1}{2}) (3x_{j}^{2}-2) \sqrt{1-x_{j}^{2}}\\ & = \frac{5T_0}{2} \left[ -1.962526165998847\cdot 10^{-1} \right] \end{align} $$
 * $$\displaystyle
 * $$\displaystyle


 * }.
 * }.


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

$$\displaystyle
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |

\Rightarrow A_2 = -4.906315414997119\cdot 10^{-1} \cdot T_0

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

(iii.) For n = 4 and m = 20 we get,


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


 * $$\displaystyle
 * $$\displaystyle

\Rightarrow P_4 = \frac{35}{8} x^4 - \frac{15}{4} x^2 + \frac{3}{8}

$$


 * }
 * }

and,


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

\begin{align} \Rightarrow A_4 & = \frac{2(4)+1}{2} \sum_{j=1}^{20} T_0 w_j \left(\frac{35}{8} x_{j}^{4} - \frac{15}{4} x_{j}^{2} + \frac{3}{8} \right) \sqrt{1-x_{j}^{2}}\\ & = \frac{9T_0}{2} \left[ -2.444412881080017 \cdot 10^{-2} \right] \end{align} $$
 * $$\displaystyle
 * $$\displaystyle


 * }.
 * }.


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

$$\displaystyle
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |

\Rightarrow A_4 = -1.099985796486008 \cdot 10^{-1}\cdot T_0

$$ $$ These numerical solutions are all less than 1 % from the exact solution.
 * style= |
 * <p style="text-align:right;">$$\displaystyle (Eq. 23)
 * }.
 * }.

 Matlab Code: 

Please refer and download matlab files from Gauss-Legendre Matlab Central. Below is the file functions.m that will be called by gausslege.m function.

Below is the function call to find the numerical integrals every time after modifying the functions.m file for corresponding n values [This is done at the command line or can be done as script].

= Problem 14: Gauss-Legendre Quadrature = From lecture slide 35-3

Given
From lecture slide 31-3, general expression for Legendre Polynomial is given by,


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

P_n(x) = \sum_{i=0}^{\lfloor n/2 \rfloor} \frac{1 \cdot 3 \dots \left(2n - 2i - 1\right)}{2^i i! (n-2i)!} (-1)^i x^{n-2i} $$
 * $$\displaystyle
 * $$\displaystyle


 * },
 * },

and from lecture slide 35-2, weights $$\displaystyle w_j $$ of the Legendre Polynomial $$\displaystyle P_n(x)$$ are given by,


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

w_j = \frac{-2}{(n+1)P'_n(x_j)P_{n+1}(x_j)} $$ \left[\forall j=1,2,...,n \right] $$ where each $$\displaystyle x_j $$ are the roots of $$\displaystyle P_n(x) = 0 $$.
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.
 * }.

Find
1. Verify the expressions on Wikipedia for the Legendre polynomials $$\displaystyle P_n$$ with $$\displaystyle n = 0, 1,..., 6$$. (See homework on lecture slide 31-3)

2. Verify the table for Gauss-Legendre quadrature in Wikipedia, analytical expressions of $$\displaystyle \{x_j\}$$ and $$\displaystyle \{w_j\}$$, $$\displaystyle j=1,...,5$$, and $$\displaystyle n=1,...,5$$, where $$\displaystyle n$$ is the number of integration points.

3. Evaluate numerically $$\displaystyle \{x_j\}$$ and $$\displaystyle \{w_j\}$$ and compare results with Abramovitz & Stegum. See [http://en.wikiversity.org/wiki/User:Egm6321.f09/Lecture_plan lecture plan].

Solution
1. The general expression for Legendre Polynomial is given by,


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

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


 * }.
 * }.

Please refer Problem 6 Solution above, for $$\displaystyle P_0(x),\ P_1(x),\ P_2(x),\ P_3(x),\ P_4(x) $$.

Substituting $$\displaystyle n=5$$ into Eq. 1 gives,


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


 * $$\displaystyle
 * $$\displaystyle

\Rightarrow P_5(x) = \sum_{i=0}^{\lfloor 5/2 \rfloor} \frac{1 \cdot 3 \dots \left(2n - 2i - 1\right)}{2^i i!(n-2i)!}(-1)^i x^{n - 2i}

$$


 * }.
 * }.

The sum is then expanded,


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


 * $$\displaystyle
 * $$\displaystyle

\Rightarrow P_5(x)  = \frac{1 \cdot 3 \cdot 5 \cdot 7 \cdot 9} {1 \cdot 2 \cdot 3 \cdot 4 \cdot 5} x^5 + \frac{1 \cdot 3 \cdot 5 \cdot 7 } {2 \cdot (3!)} (-1)x^3 +  \frac{1 \cdot 3 \cdot 5} {2^2 \cdot (2!)} (-1)^2 x

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

Equation (2) is then,


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

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

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


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


 * $$\displaystyle
 * $$\displaystyle

\Rightarrow P_6(x) = \sum_{i=0}^{\lfloor 6/2 \rfloor} \frac{1 \cdot 3 \cdot \cdot \cdot \left(2n - 2i - 1\right)}{2^i i!(n-2i)!}(-1)^i x^{n - 2i}

$$


 * }.
 * }.

The sum is then expanded,


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


 * $$\displaystyle
 * $$\displaystyle

\Rightarrow P_6(x)  = \frac{1 \cdot 3 \cdot 5 \cdot 7 \cdot 9 \cdot 11} {1 \cdot 2 \cdot 3 \cdot 4 \cdot 5 \cdot 6} x^6 + \frac{1 \cdot 3 \cdot 5 \cdot 7 \cdot 9} {2 \cdot (4!)} (-1)x^4 +  \frac{1 \cdot 3 \cdot 5 \cdot 7} {2^2 \cdot (2!) \cdot (2!)} (-1)^2 x^2 +  \frac{1 \cdot 3 \cdot 5} {2^3 \cdot (3!)} (-1)^3 x^0

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

Equation (4) is then,


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

$$\displaystyle \Rightarrow P_6(x) = \frac{231}{16} x^6 - \frac{315}{16} x^4 + \frac{105}{16} x^2 - \frac{5}{16} $$ $$
 * style="width:30%; padding:10px; border:2px solid #8888aa" |
 * style="width:30%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * <p style="text-align:right;">$$\displaystyle (Eq. 5)
 * }.
 * }.

The equations (3), (5) and equations (10), (13), (16), (19), (22) of Problem 6 match the equations in Wikipedia.

2. The weights $$\displaystyle w_j $$ of the Legendre Polynomial $$\displaystyle P_n(x)$$ are given by,


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

w_j = \frac{-2}{(n+1)P'_n(x_j)P_{n+1}(x_j)} $$ \left[\forall j=1,2,...,n \right] $$ $$ where each $$\displaystyle x_j $$ are the roots of $$\displaystyle P_n(x) = 0 $$.
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 6)
 * }.
 * }.

(i). When $$\displaystyle n = 1 $$,


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

P_1(x) = x;\ P'_1(x) = 1; \ P_2(x) = \frac{1}{2}(3x^2-1);when\ P_1(x) = 0 \Rightarrow\ x_1 = 0; $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 7)
 * }
 * }

Substituting values of Equation (7) into (6)


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

w_1 = \frac{-2}{(1+1)(1)(1/2)(-1)} = 2 $$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

And so,


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

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

(ii). When $$\displaystyle n = 2 $$,


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

P_2(x) = \frac{1}{2}(3x^2-1);\ P'_2(x) = 3x; P_3(x) = \frac{1}{2}(5x^3-3x);when\ P_2(x) = 0 \Rightarrow\ x_{1,2} = \bigg\{\frac{-1}{\sqrt{3}},\frac{1}{\sqrt{3}} \bigg\}; $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 9)
 * }
 * }

Substituting values of Equation (9) into (6),


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

w_1 = \frac{-2}{3(3)(\frac{-1}{\sqrt{3}})(\frac{1}{2})\left[5(-1/\sqrt{3})^3 - 3(-1/\sqrt{3})\right]} = \frac{4}{-5+9} = 1 $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }


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

w_2 = \frac{-2}{3(3)(\frac{1}{\sqrt{3}})(\frac{1}{2})\left[5(1/\sqrt{3})^3 - 3(1/\sqrt{3})\right]} = \frac{-4}{5-9} = 1 $$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

And so,


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

$$\displaystyle x_{1,2} = \bigg\{\frac{-1}{\sqrt{3}},\frac{1}{\sqrt{3}} \bigg\};\ w_{1,2} = \bigg\{1,1 \bigg\} $$ $$
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * <p style="text-align:right;">$$\displaystyle (Eq. 10)
 * }.
 * }.

(iii). When $$\displaystyle n = 3 $$,


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

P_3(x) = \frac{1}{2}(5x^3-3x);\ P'_3(x) = \frac{1}{2}(15x^2-3);\ P_4(x) = \frac{35}{8}x^4 - \frac{15}{4}x^2 + \frac{3}{8}; when\ P_3(x) = 0 \Rightarrow\ x_{1,2,3} = \bigg\{-\sqrt{\frac{3}{5}},0,\sqrt{\frac{3}{5}} \bigg\}; $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 11)
 * }
 * }

Substituting values of Equation (11) into (6),


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

w_1 = w_3 = \frac{-2}{4(1/2)\left[15(3/5) - 3 \right]\left[(35/8)(9/25) - (15/4)(3/5) + (3/8) \right]} = \frac{5}{9} $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

w_2 = \frac{-2}{2(-3)\frac{3}{8}} = \frac{8}{9} $$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

And so,


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

$$\displaystyle x_{1,2,3} = \bigg\{-\sqrt{\frac{3}{5}},0,\sqrt{\frac{3}{5}} \bigg\};\ w_{1,2,3} = \bigg\{\frac{5}{9},\frac{8}{9} ,\frac{5}{9}\bigg\} $$ $$
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * <p style="text-align:right;">$$\displaystyle (Eq. 12)
 * }.
 * }.

(iv). When $$\displaystyle n = 4 $$,


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


 * $$\displaystyle
 * $$\displaystyle

P_4(x) = \frac{35}{8}x^4 - \frac{15}{4}x^2 + \frac{3}{8}

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


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

P'_4(x) = \frac{35}{2}x^3 - \frac{15}{2}x; $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 14)
 * }
 * }


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

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

Substituting (13), (14), (15) into equation (6),


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

w_j = \frac{-2}{(5)(\frac{5{x_j}^2}{16})(7{x_j}^2-3)(63{x_j}^4-70{x_j}^2+15)}; \forall j = 1,2,3,4 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 16)
 * }.
 * }.

When $$\displaystyle P_4(x) = 0 $$,


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

\Rightarrow\ x_1 = - \sqrt{\frac{3+2\sqrt{6/5}}{7}} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 17)
 * }
 * }


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

\Rightarrow\ x_2 = - \sqrt{\frac{3-2\sqrt{6/5}}{7}} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 18)
 * }
 * }


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

\Rightarrow\ x_3 = \sqrt{\frac{3-2\sqrt{6/5}}{7}} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 19)
 * }
 * }


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

\Rightarrow\ x_4 = \sqrt{\frac{3+2\sqrt{6/5}}{7}} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 20)
 * }.
 * }.

Substituting equations (18) and (19) into (16),


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

$$\displaystyle \Rightarrow\ w_{2,3} = \frac{18+\sqrt{30}}{36} $$ $$
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * <p style="text-align:right;">$$\displaystyle (Eq. 21)
 * }.
 * }.

Substituting equations (18) and (19) into (16),


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

$$\displaystyle \Rightarrow\ w_{1,4} = \frac{18-\sqrt{30}}{36} $$ $$
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * <p style="text-align:right;">$$\displaystyle (Eq. 22)
 * }.
 * }.

(v). When $$\displaystyle n = 5 $$,


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


 * $$\displaystyle
 * $$\displaystyle

P_5(x) = \frac{63}{8}x^5 - \frac{35}{4}x^3 + \frac{15}{8}x

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


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

P'_5(x) = \frac{315}{8}x^4 - \frac{105}{4}x^2+\frac{15}{8}; $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 24)
 * }
 * }


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

P_6(x) = \frac{231}{16} x^6 - \frac{315}{16} x^4 + \frac{105}{16} x^2 - \frac{5}{16}; $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 25)
 * }.
 * }.

Substituting (23), (24), (25) into equation (6),


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

w_j = \frac{-2}{6(\frac{315}{8}x^4 - \frac{105}{4}x^2+\frac{15}{8})(\frac{231}{16} x^6 - \frac{315}{16} x^4 + \frac{105}{16} x^2 - \frac{5}{16})}; \forall j = 1,2,3,4,5 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 26)
 * }.
 * }.

When $$\displaystyle P_5(x) = 0 $$,


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

\Rightarrow\ x_1 = - \sqrt{\frac{35+\sqrt{280}}{63}} = - \frac{1}{3}\sqrt{5+2\sqrt{\frac{10}{7}}} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 27)
 * }
 * }


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

\Rightarrow\ x_2 = - \sqrt{\frac{35-\sqrt{280}}{63}} = - \frac{1}{3}\sqrt{5-2\sqrt{\frac{10}{7}}} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 28)
 * }
 * }


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

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


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

\Rightarrow\ x_4 = \sqrt{\frac{35-\sqrt{280}}{63}} = \frac{1}{3}\sqrt{5-2\sqrt{\frac{10}{7}}} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 30)
 * }
 * }


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

\Rightarrow\ x_5 = \sqrt{\frac{35+\sqrt{280}}{63}} = \frac{1}{3}\sqrt{5+2\sqrt{\frac{10}{7}}} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 31)
 * }.
 * }.

Substituting equations (29) into (26),


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

$$\displaystyle \Rightarrow\ w_3 = \frac{128}{225} $$ $$
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * <p style="text-align:right;">$$\displaystyle (Eq. 32)
 * }.
 * }.

Substituting equations (28) and (30) into (26),


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

$$\displaystyle \Rightarrow\ w_{2,4} = \frac{322+13\sqrt{70}}{900} $$ $$
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * <p style="text-align:right;">$$\displaystyle (Eq. 32)
 * }.
 * }.

Substituting equations (27) and (31) into (26),


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

$$\displaystyle \Rightarrow\ w_{1,5} = \frac{322-13\sqrt{70}}{900} $$ $$
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * style="width:15%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * <p style="text-align:right;">$$\displaystyle (Eq. 32)
 * }.
 * }.

3.

(i). The numerical values when $$\displaystyle n = 1 $$ are given by equation (8).

(ii). The numerical values when $$\displaystyle n = 2 $$ are,


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

x_{1,2} = \bigg\{\frac{-1}{\sqrt{3}},\frac{1}{\sqrt{3}} \bigg\};\ w_{1,2} = \bigg\{1,1 \bigg\} $$
 * $$\displaystyle
 * $$\displaystyle


 * }
 * }


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

\Rightarrow
 * $$\displaystyle
 * $$\displaystyle

\begin{bmatrix} x_1 \\ x_2 \\ \end{bmatrix} = \begin{bmatrix} \frac{-1}{\sqrt{3}} \\ \frac{1}{\sqrt{3}} \\ \end{bmatrix} = \begin{bmatrix} -5.773502691896258 \cdot 10^{-1} \\ 5.773502691896258 \cdot 10^{-1} \\ \end{bmatrix}

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

and,


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

\Rightarrow
 * $$\displaystyle
 * $$\displaystyle

\begin{bmatrix} w_1 \\ w_2 \\ \end{bmatrix} = \begin{bmatrix} 1.0000000000000000 \\ 1.0000000000000000 \\ \end{bmatrix} $$ $$
 * <p style="text-align:right;">$$\displaystyle (Eq. 34)
 * }.
 * }.

(iii). When $$\displaystyle n = 3 $$,


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

w_j = \frac{-2}{(4)(\frac{1}{2})(15x^2-3)(\frac{35}{8}x^4 - \frac{15}{4}x^2 + \frac{3}{8})} $$
 * $$\displaystyle
 * $$\displaystyle

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

the numerical values are calculated to be,


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

\Rightarrow
 * $$\displaystyle
 * $$\displaystyle

\begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ \end{bmatrix} = \begin{bmatrix} -7.745966692414834 \cdot 10^{-1} \\ 0.000000000000000 \\   7.745966692414834 \cdot 10^{-1} \\ \end{bmatrix}

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

and,


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

\Rightarrow
 * $$\displaystyle
 * $$\displaystyle

\begin{bmatrix} w_1 \\ w_2 \\ w_3 \\ \end{bmatrix} = \begin{bmatrix} 5.555555555555554 \cdot 10^{-1} \\ 8.888888888888888 \cdot 10^{-1} \\ 5.555555555555554 \cdot 10^{-1} \\ \end{bmatrix} $$ $$
 * <p style="text-align:right;">$$\displaystyle (Eq. 37)
 * }.
 * }.

Matlab source code:

.

(iv). When $$\displaystyle n = 4 $$, the expression for $$\displaystyle w_j $$ is given by equation (16) and the numerical values are,


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

\Rightarrow
 * $$\displaystyle
 * $$\displaystyle

\begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \\ \end{bmatrix} = \begin{bmatrix} -8.611363115940526 \cdot 10^{-1} \\ -3.399810435848563 \cdot 10^{-1} \\ 3.399810435848563 \cdot 10^{-1} \\ 8.611363115940526 \cdot 10^{-1} \\ \end{bmatrix}

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

and,


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

\Rightarrow
 * $$\displaystyle
 * $$\displaystyle

\begin{bmatrix} w_1 \\ w_2 \\ w_3 \\ w_4 \\ \end{bmatrix} = \begin{bmatrix} 3.478548451374542 \cdot 10^{-1}\\ 6.521451548625461 \cdot 10^{-1}\\ 6.521451548625461 \cdot 10^{-1}\\ 3.478548451374542 \cdot 10^{-1}\\ \end{bmatrix} $$ $$
 * <p style="text-align:right;">$$\displaystyle (Eq. 39)
 * }.
 * }.

Matlab source code:

.

(v). When $$\displaystyle n = 5 $$, the expression for $$\displaystyle w_j $$ is given by equation (26) and the numerical values are,


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

\Rightarrow
 * $$\displaystyle
 * $$\displaystyle

\begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \\ x_5 \\ \end{bmatrix} = \begin{bmatrix} -9.061798459386641 \cdot 10^{-1} \\ -5.384693101056831 \cdot 10^{-1} \\ 0 \\   5.384693101056831 \cdot 10^{-1} \\ 9.061798459386641 \cdot 10^{-1} \\ \end{bmatrix}

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

and,


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

\Rightarrow
 * $$\displaystyle
 * $$\displaystyle

\begin{bmatrix} w_1 \\ w_2 \\ w_3 \\ w_4 \\ w_5 \\ \end{bmatrix} = \begin{bmatrix} 2.369268850561896 \cdot 10^{-1} \\ 4.786286704993663 \cdot 10^{-1} \\ 5.688888888888889 \cdot 10^{-1} \\ 4.786286704993663 \cdot 10^{-1} \\ 2.369268850561896 \cdot 10^{-1} \\ \end{bmatrix} $$ $$
 * <p style="text-align:right;">$$\displaystyle (Eq. 41)
 * }.
 * }.

Matlab source code:


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

The equations (8), (33), (34), (36), (37), (38), (39), (40) and (41) match the numerical values given by Abramovitz & Stegum's table.
 * style="width:78%; padding:10px; border:2px solid #8888aa" |
 * style="width:78%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }.
 * }.

= Problem 15: Second Solution to the 0th Legendre Polynomial = From lecture slide 36-4

Given
The second solution to the 0th Legendre polynomial is
 * {| style="width:100%" border="0" align="left"

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

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

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

Solution
We have that
 * {| style="width:100%" border="0" align="left"

\tanh(x) = \frac{e^x - e^{-x}}{e^x + e^{-x}} $$ $$ If Eq. 2 holds, then $$\displaystyle \tanh(Q_0) = x$$. Hence, we substitute Eq. 1 into Eq. 3
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 3)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\tanh(Q_0) = \frac{e^{Q_0} - e^{-Q_0}}{e^{Q_0} + e^{-Q_0}} $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

= \frac{e^{\frac{1}{2} \log \left(\frac{1 + x}{1 - x}\right)} - e^{-\frac{1}{2} \log \left(\frac{1 + x}{1 - x}\right)}}{e^{\frac{1}{2} \log \left(\frac{1 + x}{1 - x}\right)} + e^{-\frac{1}{2} \log \left(\frac{1 + x}{1 - x}\right)}} $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

= \frac{\sqrt{\frac{1+x}{1-x}} - \sqrt{\frac{1-x}{1+x}}} {\sqrt{\frac{1+x}{1-x}} + \sqrt{\frac{1-x}{1+x}}} $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

= \frac{\sqrt{\frac{(1+x)^2}{1-x^2}} - \sqrt{\frac{(1-x)^2}{1-x^2}}} {\sqrt{\frac{(1+x)^2}{1-x^2}} + \sqrt{\frac{(1-x)^2}{1-x^2}}} $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

= \frac{\sqrt{(1+x)^2} - \sqrt{(1-x)^2}} {\sqrt{(1+x)^2} + \sqrt{(1-x)^2}} $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

= \frac{1+x -1 +x} {1+x +1-x} $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

= \frac{2x} {2} $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

$$\displaystyle = 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. 4)
 * }.
 * }.

= Notes and references =

= Contributing Team Members =

Egm6321.f09.Team1.vasquez 04:51, 14 November 2009 (UTC)

Egm6321.f09.Team1.sallstrom 21:01, 14 November 2009 (UTC)

Egm6321.f09.Team1.AH 18:55, 16 November 2009 (UTC)

Egm6321.f09.Team1.andy 04:54, 17 November 2009 (UTC)