User:Egm6321.f09.Team1.sallstrom/HW6

= Problem 1: Laplacian in Curvilinear Coordinates = From lecture note slide 31-1, 32-1.

Given
Circular cylinder coordinates are given as:
 * {| style="width:100%" border="0" align="left"

\left. \begin{matrix} x &=& r \cos \theta &=& \xi_1 &\cos \xi_2 \\ y &=& r \sin \theta &=& \xi_1 &\sin \xi_2 \\ z &&&=& \xi_3& \end{matrix} \right. $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 1)
 * }
 * }

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

\{{\rm d} x_i\} = \{{\rm d} x_1, {\rm d} x_2, {\rm d} x_3\} $$ $$ in terms of
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 2)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\{\xi_j\} = \{\xi_1, \xi_2, \xi_3\} $$ $$ and
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 3)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\{{\rm d} \xi_k\} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 4)
 * }
 * }

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

{\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 \}$$.
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 5)
 * }
 * }

3. Find the Laplacian in these curvilinear coordinates.

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

Solution
1. We find Eq. 2 by differentiating Eqs. 1 w.r.t. $$\displaystyle \xi_i$$
 * {| 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. 7)
 * }
 * }


 * {| 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. 8)
 * }
 * {| 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 + 1 \, {\rm d} \xi_3 $$ $$ So
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 9)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle \begin{matrix} {\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{matrix} $$ $$ 2. Use Eqs. 10 in Eq. 5
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * $$\displaystyle (Eq. 10)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\begin{matrix} {\rm d}s^2 &= & \cos^2 \xi_2 \left({\rm d}\xi_1 \right)^2 - 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 + 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 \end{matrix} $$ $$ which simplifies to
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 11)
 * }
 * }
 * {| 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 $$ $$ So
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * style="width:2%; padding:10px; border:2px solid #8888aa" |
 * $$\displaystyle (Eq. 12)
 * }
 * }
 * {| 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. 13)
 * }
 * }

3. Eq. 1 on lecture slide 29-3 shows that the Laplacian is given by
 * {| style="width:100%" border="0" align="left"

\Delta = \nabla^2 = \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}{\partial \xi_i} \right] $$ $$ We can insert the results from part 2, term by term, so that
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 14)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\Delta_1 = \frac{1}{\xi_1} \frac{\partial}{\partial \xi_1} \left[ \xi_1 \frac{\partial}{\partial \xi_1} \right] $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 15)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

\Delta_2 = \frac{1}{\xi_1^2} \frac{\partial^2}{\partial \xi_2^2} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 16)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

\Delta_3 = \frac{1}{\xi_1} \frac{\partial}{\partial \xi_3} \left[ \xi_1 \frac{\partial}{\partial \xi_3} \right] = \frac{\partial^2}{\partial \xi_3^2} $$ $$ Combining these yields
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 17)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle \Delta = \frac{1}{\xi_1} \frac{\partial}{\partial \xi_1} \left(\xi_1 \frac{\partial}{\partial \xi_1} \right) + \frac{1}{\xi_1^2} \frac{\partial^2}{\partial \xi_2^2} + \frac{\partial^2}{\partial \xi_3^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. 18)
 * }
 * }

4. Assume
 * {| 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 from Eq. 18 on $$\displaystyle f$$, we can write Laplace equation
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 19)
 * }
 * }
 * {| 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. 20)
 * }
 * }


 * {| 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. 21)
 * }
 * }
 * {| 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. 22)
 * }
 * }
 * {| 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. 23)
 * }
 * }
 * {| 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. 24)
 * }
 * }
 * {| 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. 25)
 * }
 * }
 * {| 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. 26)
 * }
 * }
 * {| 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. 27)
 * }
 * }
 * {| 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. 28)
 * }
 * }
 * {| 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. 29)
 * }
 * }
 * {| 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. 30)
 * }
 * }
 * {| 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. 31)
 * }
 * }
 * {| 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. 6, 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. 32)
 * }
 * }

= Problem 2: Laplacian in Spherical Coordinates = From lecture note slide 31-1.

Given
Spherical coordinates are given as:
 * {| style="width:100%" border="0" align="left"

\left. \begin{matrix} x &=& r & \cos \theta & \cos \varphi &=& \xi_1 & \cos \xi_3 & \cos \xi_2 \\ y &=& r & \cos \theta & \sin \varphi &=& \xi_1 & \cos \xi_3 & \sin \xi_2 \\ z &=& r & \sin \theta &             &=& \xi_1 & \sin \xi_3 & \end{matrix} \right. $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 1)
 * }
 * }

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

\{{\rm d} x_i\} = \{{\rm d} x_1, {\rm d} x_2, {\rm d} x_3\} $$ $$ in terms of
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 2)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\{\xi_j\} = \{\xi_1, \xi_2, \xi_3\} $$ $$ and
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 3)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

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

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

ds^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 \}$$.
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 5)
 * }
 * }

3. Find the Laplacian in these spherical coordinates

Solution
1. We find Eq. 2 by differentiating Eqs. 1 w.r.t. $$\displaystyle \xi_i$$
 * {| 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 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 6)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

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


 * {| 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 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 8)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

{\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 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 9)
 * }
 * }


 * {| 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
 * <p style="text-align:right;">$$\displaystyle (Eq. 10)
 * }
 * }

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

$$\displaystyle \begin{matrix} {\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{matrix} $$ $$
 * 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. Use Eqs. 11 in Eq. 5
 * {| style="width:100%" border="0" align="left"

\begin{matrix} {\rm d}s^2 & = & &\cos^2 \xi_3 & \cos^2 \xi_2 &{\rm d}\xi_1^2 \\ &-& 2 \xi_1 & \cos^2 \xi_3 & \sin \xi_2 \cos \xi_2 & {\rm d}\xi_1 {\rm d} \xi_2 \\ &-& 2 \xi_1 & \sin \xi_3 \cos \xi_3 & \cos^2 \xi_2 & {\rm d}\xi_1 {\rm d} \xi_3 \\ &+& \xi_1^2 &\cos^2 \xi_3 & \sin^2 \xi_2 & {\rm d}\xi_2^2 \\ &+& 2 \xi_1^2 &\sin \xi_3 \cos \xi_3 & \sin \xi_2 \cos \xi_2 & {\rm d} \xi_2 {\rm d} \xi_3 \\ &+& \xi_1^2 & \sin^2 \xi_3 & \cos^2 \xi_2 & {\rm d} \xi_3^2 \\ &+& & \cos^2 \xi_3 & \sin^2 \xi_2 &{\rm d}\xi_1^2 \\ &+& 2 \xi_1 & \cos^2 \xi_3 & \sin \xi_2 \cos \xi_2 & {\rm d}\xi_1 {\rm d} \xi_2 \\ &-& 2 \xi_1 & \sin \xi_3 \cos \xi_3 & \sin^2 \xi_2 & {\rm d}\xi_1 {\rm d} \xi_3 \\ &+& \xi_1^2 & \cos^2 \xi_3 & \cos^2 \xi_2 & {\rm d}\xi_2^2 \\ &-& 2 \xi_1^2 & \sin \xi_3 \cos \xi_3 & \sin \xi_2 \cos \xi_2 & {\rm d} \xi_2 {\rm d} \xi_3 \\ &+& \xi_1^2 & \sin^2 \xi_3 &\sin^2 \xi_2 & {\rm d} \xi_3^2 \\ &+& & \sin^2 \xi_3 && {\rm d} \xi_1^2 \\ &+& 2 \xi_1 &\sin \xi_3 \cos \xi_3 && {\rm d} \xi_1 {\rm d} \xi_3\\ &+& \xi_1^2 &\cos^2 \xi_3 && {\rm d} \xi_3^2 \end{matrix} $$ $$ this simplifies to
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 12)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle {\rm d}s^2 = {\rm d}\xi_1^2 + \xi_1^2 \cos^2 \xi_3 {\rm d}\xi_2^2 + \xi_1^2 {\rm d} \xi_3^2 $$ $$ Hence
 * 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)
 * }
 * }
 * {| 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. 14)
 * }
 * }

3. Eq. 1 on lecture slide 29-3 shows that the Laplacian is given by
 * {| style="width:100%" border="0" align="left"

\Delta = \nabla^2 = \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}{\partial \xi_i} \right] $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 15)
 * }
 * }

We can insert the results from part 2, term by term, so that
 * {| style="width:100%" border="0" align="left"

\Delta_1 = \frac{1}{\xi_1^2 \cos \xi_3} \frac{\partial}{\partial \xi_1} \left[ \xi_1^2 \cos \xi_3 \frac{\partial}{\partial \xi_1} \right] = \frac{1}{\xi_1^2} \frac{\partial}{\partial \xi_1} \left[ \xi_1^2 \frac{\partial}{\partial \xi_1} \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"

\Delta_2 = \frac{1}{\xi_1^2 \cos \xi_3} \frac{\partial}{\partial \xi_2} \left[ \frac{1}{\cos \xi_3} \frac{\partial}{\partial \xi_2} \right] = \frac{1}{\xi_1^2 \cos^2 \xi_3} \frac{\partial^2}{\partial \xi_2^2} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 17)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

\Delta_3 = \frac{1}{\xi_1^2 \cos \xi_3} \frac{\partial}{\partial \xi_3} \left[ \cos \xi_3 \frac{\partial}{\partial \xi_3} \right] $$ $$ Combining these yields
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 18)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle \Delta = \frac{1}{\xi_1^2} \frac{\partial}{\partial \xi_1} \left( \xi_1^2 \frac{\partial}{\partial \xi_1} \right) + \frac{1}{\xi_1^2 \cos^2 \xi_3} \frac{\partial^2}{\partial \xi_2^2} + \frac{1}{\xi_1^2 \cos \xi_3} \frac{\partial}{\partial \xi_3} \left( \cos \xi_3 \frac{\partial}{\partial \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. 19)
 * }
 * }

= Problem 3: Laplacian in Spherical Coordinates (Math/Physics Convention) = From lecture note slide 31-2.

Given
Spherical coordinates are given as:
 * {| style="width:100%" border="0" align="left"

\left. \begin{matrix} x &=& r & \sin \bar \theta & \cos \varphi &=& \xi_1 & \sin \bar \xi_3 & \cos \xi_2 \\ y &=& r & \sin \bar \theta & \sin \varphi &=& \xi_1 & \sin \bar \xi_3 & \sin \xi_2 \\ z &=& r & \cos \bar \theta &             &=& \xi_1 & \cos \bar \xi_3 & \end{matrix} \right. $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 1)
 * }
 * }

Find
Find the Laplacian in these spherical coordinates

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

\bar \theta = \frac{\pi}{2} - \theta $$ $$ or
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 2)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\bar \xi_3 = \frac{\pi}{2} - \xi_3 $$ $$ so that
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 3)
 * }
 * }
 * {| 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"
 * {| 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"
 * {| style="width:100%" border="0" align="left"

\partial \xi_3 = - \partial \bar \xi_3 $$ $$ Substituting these into Eq. 19 from problem 3 yields
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 6)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle \Delta = \frac{1}{\xi_1^2} \frac{\partial}{\partial \xi_1} \left( \xi_1^2 \frac{\partial}{\partial \xi_1} \right) + \frac{1}{\xi_1^2 \sin^2 \bar \xi_3} \frac{\partial^2}{\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}{\partial \bar \xi_3} \right) \right] $$ $$ or simply
 * <p style="text-align:right;">$$\displaystyle (Eq. 7)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle \Delta = \frac{1}{\xi_1^2} \frac{\partial}{\partial \xi_1} \left( \xi_1^2 \frac{\partial}{\partial \xi_1} \right) + \frac{1}{\xi_1^2 \sin^2 \bar \xi_3} \frac{\partial^2}{\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}{\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: = From lecture note slide 31-2.

Given
The following equation is given
 * {| 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 = n $$ $$ and
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 2)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

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

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

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

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

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

\lambda + \frac{1}{2} = \pm \left( n + \frac{1}{2}\right) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 7)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| 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"
 * {| style="width:100%" border="0" align="left"

\lambda_2 + \frac{1}{2} = - n - \frac{1}{2} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 9)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| 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. 10)
 * }
 * }

= Problem 5: Legendre Polynominal 1 = From lecture note slide 31-3.

Given
The general form of the Legendre polynomials can be written
 * {| 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)!} $$ $$ where $$\displaystyle [n/2]$$ means the integer part of $$\displaystyle n/2$$. Another way to write it is
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 1)
 * }
 * }
 * {| 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)
 * }
 * }

Find
Show that Eqs. 1 and 2 are equivalent

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

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

P_n(x) = \sum_{i=0}^{[n/2]} \frac{(-1)^i x^{n-2i}}{2^i i!(n-2i)!} 1 \cdot 3 \cdot \cdot \cdot \left(2n - 2i - 1\right) $$ $$ Now we can rewrite Eq. 3
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 4)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

P_n(x) = \sum_{i=0}^{[n/2]} \frac{(-1)^i  x^{n-2i}}{2^i i!(n-2i)!} \frac{\prod_{j=1}^{2n - 2i} j}{\prod_{j=1}^{n - i} 2 \prod_{j=1}^{n - i} j } $$ $$
 * $$\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_n(x) = \sum_{i=0}^{[n/2]} \frac{(-1)^i  x^{n-2i}}{2^i i!(n-2i)!} \frac{\prod_{j=1}^{2n - 2i} j}{\prod_{j=1}^{n - i} 2 j } $$ $$
 * $$\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_n(x) = \sum_{i=0}^{[n/2]} \frac{(-1)^i  x^{n-2i}}{2^i i!(n-2i)!} \frac{1 \cdot \cancel{2} \cdot 3 \cdot \cancel{4} \cdot ... \cdot (2n - 2i - 1) \cdot \cancel{2(n-i)}}{\cancel{2} \cdot \cancel{4} \cdot ... \cdot \cancel{2(n-i)}} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 7)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

$$\displaystyle P_n(x) = \sum_{i=0}^{[n/2]} \frac{(-1)^i  x^{n-2i}}{2^i i!(n-2i)!} 1 \cdot 3 \cdot ... \cdot (2n - 2i - 1) $$ $$ Eqs. 8 and 4 are the same, hence Eqs. 1 and 2 are equivalent.
 * 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 6: Legendre Polynominal 2 = From lecture note slide 31-3.

Given
The first 5 Legendre polynomials are
 * {| 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 polynomials given by 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]} (-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. 6)
 * }
 * }

Solution
0. Substitute $$\displaystyle n=0$$ into Eq. 6
 * {| style="width:100%" border="0" align="left"

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

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

P_0(x) = \frac{0! }{0! (0)! (-0)!} = \frac{1}{1\cdot 1\cdot 1} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 9)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| 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)
 * }
 * }

1. Substitute $$\displaystyle n=1$$ into Eq. 6
 * {| style="width:100%" border="0" align="left"

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

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

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

P_1(x) = \frac{2 x}{2} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 14)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| 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. 15)
 * }
 * }

2. Substitute $$\displaystyle n=2$$ into Eq. 6
 * {| style="width:100%" border="0" align="left"

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

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

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

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

$$\displaystyle P_2(x) = \frac{1}{2} \left( 3 x^2 - 1 \right) $$ $$ 3. Substitute $$\displaystyle n=3$$ into Eq. 6
 * 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. 20)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

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

P_3(x) = \frac{6! x^3}{8 (3)! (3)!} - \frac{(4)! x}{8 (2)!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 22)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

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

$$\displaystyle P_3(x) = \frac{1}{2} \left( 5 x^3 - 3x \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. 24)
 * }
 * }

4. Substitute $$\displaystyle n=4$$ into Eq. 6
 * {| style="width:100%" border="0" align="left"

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

P_4(x) = \frac{(8)! x^{4}}{16 (4)! (4)!} - \frac{(6)! x^{2}}{16 (3)! (2)!} + \frac{(4)! }{16 (2)! (2)!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 26)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| 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. 27)
 * }
 * }

= Problem 7: Legendre Polynomial 3 = From lecture note 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: 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 9: Legendre Polynomials' Even 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, and 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"

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
 * $$\displaystyle
 * $$\displaystyle
 * <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 10: Compute 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 11: = From lecture slides 22-2, 22-3. If you did this in homework 4, just link to it.

= Problem 12: Gauss-Legendre = 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.

2b.

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

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 lecture plan.

= Problem 14: 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)
 * }
 * }

= Contributing Team Members =