User:Egm6321.f09.Team1/HW7

= Problem 1: Odd and Even Solutions of Legendre DE =

From Lecture Slide 37-1.

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

and from lecture slide 37-1, the general expression for the second solution of Legendre Differential Equation is given as,


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

Q_n(x) = P_n(x) \tanh^{-1}(x) - 2 \sum_{j=1,3,5...}^{J} \frac{2n-2j+1}{(2n-j+1)j} P_{n-j}(x), $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 2)
 * }
 * }

where $$\displaystyle J $$ is given by,


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

J := 1 + 2 \left\lfloor \frac{n-1}{2} \right\rfloor. $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 3)
 * }
 * }

Find
Using Equation (2), to show when $$\displaystyle Q_n $$ is even or odd, depending on whether "$$\displaystyle n $$" is even or odd.

Solution
We know, from Odd and Even property of $$\displaystyle P_n $$, that $$\displaystyle P_n $$ is odd, when $$\displaystyle n $$ is odd and even, when $$\displaystyle n $$ is even and the fact that


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

\tanh^{-1}(x), $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 4)
 * }
 * }

is odd.

''' (i). When $$\displaystyle n $$ is odd.'''

When $$\displaystyle n $$ is odd, $$\displaystyle P_n $$ is odd and so,


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

P_n(x)\tanh^{-1}(x), $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

is even.


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

So, when $$\displaystyle n $$ is odd, first term in Equation (2) is even.
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

When $$\displaystyle n $$ is odd, value of $$\displaystyle n - j $$ is even since $$\displaystyle j $$ values are odd,  and so, $$\displaystyle P_{n-j} $$ is even.


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

So, when $$\displaystyle n $$ is odd, all the terms in the summation of Equation (2) are even.
 * style="width:50%; padding:10px; border:2px solid #8888aa" |
 * style="width:50%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

And so,


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

$$\displaystyle \Rightarrow $$ So, when $$\displaystyle n $$ is odd, $$\displaystyle Q_n $$ is even.
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

''' (ii). When $$\displaystyle n $$ is even.'''

When $$\displaystyle n $$ is even, $$\displaystyle P_n $$ is even and so,


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

P_n(x)\tanh^{-1}(x), $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

is odd.


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

So, when $$\displaystyle n $$ is even, first term in Equation (2) is odd.
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

When $$\displaystyle n $$ is even, value of $$\displaystyle n - j $$ is odd since $$\displaystyle j $$ values are odd, and so, $$\displaystyle P_{n-j} $$ is odd.


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

So, when $$\displaystyle n $$ is even, all the terms in the summation of Equation (2) are odd.
 * style="width:50%; padding:10px; border:2px solid #8888aa" |
 * style="width:50%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

And so,


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

$$\displaystyle \Rightarrow $$ So, when $$\displaystyle n $$ is even, $$\displaystyle Q_n $$ is odd.
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style="width:35%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }
 * }

= Problem 2: Legendre Solutions Plot =

From Lecture Slide 37-1.

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

and from lecture slide 37-1, the general expression for the second solution of Legendre Differential Equation is given as,


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

Q_n(x) = P_n(x) \tanh^{-1}(x) - 2 \sum_{j=1,3,5...}^{J} \frac{2n-2j+1}{(2n-j+1)j} P_{n-j}(x), $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 2)
 * }
 * }

where $$\displaystyle J $$ is given by,


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

J := 1 + 2 \left\lfloor \frac{n-1}{2} \right\rfloor. $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 3)
 * }
 * }

Find
Plot {$$\displaystyle P_0, P_1, P_2, P_3, P_4$$ } and {$$\displaystyle Q_0, Q_1, Q_2, Q_3, Q_4$$ } using Matlab.

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

Please refer, p. 33, for expressions of $$\displaystyle Q_0(x), Q_1(x), Q_2(x), Q_3(x)$$.

The expression for $$\displaystyle Q_4(x)$$ is given by,


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

Q_4= P_4(x) \tanh^{-1}(x) - 2 \sum_{j=1,3}^{} \frac{2n-2j+1}{(2n-j+1)j} P_{n-j}(x) $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }


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

\Rightarrow Q_4= \left[\frac{35}{8} x ^ 4 - \frac{15}{4} x ^ 2 + \frac{3}{8}\right] \tanh^{-1}(x) - 2 \left[ \frac{2(4)-2+1}{(2(4)-1+1)1} P_{3}(x) \right] - 2 \left[ \frac{2(4)-2(3)+1}{(2(4)-3+1)3} P_{1}(x) \right] $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }


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

\Rightarrow Q_4= \left[\frac{35}{8} x ^ 4 - \frac{15}{4} x ^ 2 + \frac{3}{8}\right] \tanh^{-1}(x) - \frac{7}{8} \left[ 5 x ^ 3 - 3 x\right] - \frac{1}{3} x $$
 * $$\displaystyle
 * $$\displaystyle
 * }.
 * }.

 Matlab Code: 

 Plots: 

The plots for $$\displaystyle P_n(x) $$ with $$\displaystyle n = 0,1,2,3,4 $$ are shown below:

.

The plots for $$\displaystyle Q_n(x) $$ with $$\displaystyle n = 0,1,2,3,4 $$ are shown below:

.

= Problem 3: Orthogonality of Legendre Solutions =

From Lecture Slide 37-2.

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

and from lecture slide 37-1, the general expression for the second solution of Legendre Differential Equation is given as,


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

Q_n(x) = P_n(x) \tanh^{-1}(x) - 2 \sum_{j=1,3,5...}^{J} \frac{2n-2j+1}{(2n-j+1)j} P_{n-j}(x), $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 2)
 * }
 * }

where $$\displaystyle J $$ is given by,


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

J := 1 + 2 \left\lfloor \frac{n-1}{2} \right\rfloor $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 3)
 * }
 * }

Find
Show that, $$\displaystyle < P_n, Q_n > = 0$$.

Solution
From lecture slide 33-1, the inner (scalar) product is given by,


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

 = \int_{-1}^{+1} G(x)F(x)dx, $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 4)


 * }
 * }

and Equation (4) becomes zero, when $$\displaystyle G(x) $$ is even and $$\displaystyle F(x) $$ is odd or when $$\displaystyle G(x) $$ is odd and $$\displaystyle F(x) $$ is even.

For $$\displaystyle P_n(x) $$ and $$\displaystyle Q_n(x) $$ using Equation (4),


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

 = \int_{-1}^{+1} P_n(x)Q_n(x)dx. $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 5)
 * }
 * }

From Solution to Problem 1 above, $$\displaystyle Q_n(x) $$ is odd and $$\displaystyle P_n(x) $$ is even, when $$\displaystyle n $$ is even. When $$\displaystyle n $$ is odd, $$\displaystyle Q_n(x) $$ is even and $$\displaystyle P_n(x) $$ is odd.

So, for all values of $$\displaystyle n $$, $$\displaystyle Q_n(x) $$ is opposite to $$\displaystyle P_n(x) $$ in oddness and evenness, which means,


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

\int_{-1}^{+1} P_n(x)Q_n(x)dx = 0. $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

And so,


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

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

= Problem 4: Integration by Parts: Legendre Solutions = From lecture slide 37-3.

Given
From lecture slide 37-2,


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

\alpha = \int_{-1}^{+1} L_m \left[ (1-x^2) L'_n \right]' dx $$ $$ where $$\displaystyle L_n$$ and $$\displaystyle L_m$$ are solutions to the Legendre differential equation.
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 1)
 * }
 * }

Find
Show that


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

\alpha = -\int_{-1}^{+1} (1-x^2) L'_n L'_m dx, $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 2)
 * }
 * }

after integration by parts of $$\displaystyle \alpha $$ in Equation (1).

Solution
Let,


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

u = L_m \Rightarrow du = L'_m dx, $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 3)
 * }
 * }

and,


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

dv = \left[ (1-x^2) L'_n \right]' dx. $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 4)
 * }
 * }


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

\Rightarrow \int dv = \int\left[ (1-x^2) L'_n \right]' dx \Rightarrow v = \left[ (1-x^2) L'_n \right]. $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

We know,


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

\int_{a}^{b} udv = \left[uv \right]_{a}^{b} - \int_{a}^{b} vdu , $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 5)
 * }
 * }

and so, with $$\displaystyle a = -1 $$ and $$\displaystyle b = +1 $$


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

\alpha = \int_{-1}^1 L_m \left[ (1-x^2) L'_n \right]' dx = \left[ L_m(1-x^2) L'_n\right]_{-1}^{+1} - \int_{-1}^{+1} (1-x^2) L'_n L'_m dx , $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 6)
 * }
 * }

For values of $$\displaystyle x = -1 $$ and $$\displaystyle x = +1 $$,


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

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

Substituting Equation (7) in first term of Equation (6), first term becomes zero.


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

\alpha = \cancelto{0}{\left[ L_m(1-x^2) L'_n\right]_{-1}^{+1}} - \int_{-1}^{+1} (1-x^2) L'_n L'_m dx. $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

So,


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

$$\displaystyle \alpha = - \int_{-1}^{+1} (1-x^2) L'_n L'_m dx $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = |
 * }
 * }

= Problem 5: Attraction of Spheres = From lecture slide 38-2.

Given
From lecture slide 38-2,


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

(r_{PQ})^2 = \sum_{i=1}^{3} \left(x_Q^i - x_P^i\right)^2, $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 1)
 * }
 * }

where,

$$\displaystyle x_P^1 = x_P,\ x_P^2 = y_P,\ x_P^3 = z_P,\ $$

and,

$$\displaystyle x_Q^1 = x_Q,\ x_Q^2 = y_Q,\ x_Q^3 = z_Q,\ $$

given by,


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

x_P = r_P \cos(\theta_P) \cos(\psi_P);\ y_P = r_P \cos(\theta_P) \sin(\psi_P);\ z_P = r_P \sin(\theta_P), $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 2)
 * }
 * }

and,


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

x_Q = r_Q \cos(\theta_Q) \cos(\psi_Q);\ y_Q = r_Q \cos(\theta_Q) \sin(\psi_Q);\ z_Q = r_Q \sin(\theta_Q). $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 3)
 * }
 * }

Find
Show that,


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

(r_{PQ})^2 = (r_P)^2 + (r_Q)^2 - 2 (r_P) (r_Q) \cos\gamma, $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 4)
 * }
 * }

where,


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

\cos\gamma = \cos(\theta_Q) \cos(\theta_P) \cos(\psi_Q-\psi_P) + \sin(\theta_Q)\sin(\theta_P) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 5)
 * }
 * }

Solution
Equation (1) can be written as,


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

(r_{PQ})^2 = \left(x_Q - x_P\right)^2 + \left(y_Q - y_P\right)^2 + \left(z_Q - z_P\right)^2. $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 6)
 * }
 * }

Substituting Equations (2) and (3) in (6),


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

\begin{align} \Rightarrow (r_{PQ})^2 = & \left[r_Q \cos(\theta_Q) \cos(\psi_Q) - r_P \cos(\theta_P) \cos(\psi_P)\right]^2 + \\ & \left[r_Q \cos(\theta_Q) \sin(\psi_Q) - r_P \cos(\theta_P) \sin(\psi_P)\right]^2 + \\ & \left[r_Q \sin(\theta_Q) - r_P \sin(\theta_P)\right]^2 \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }


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

\begin{align} \Rightarrow (r_{PQ})^2 = & \left[r_Q^2 \cos^2(\theta_Q) \cos^2(\psi_Q) + r_P^2 \cos^2(\theta_P) \cos^2(\psi_P) - 2 r_P r_Q \cos(\theta_Q) \cos(\psi_Q) \cos(\theta_P) \cos(\psi_P) \right] + \\ & \left[r_Q^2 \cos^2(\theta_Q) \sin^2(\psi_Q) + r_P^2 \cos^2(\theta_P) \sin^2(\psi_P) - 2 r_P r_Q \cos(\theta_Q) \sin(\psi_Q) \cos(\theta_P) \sin(\psi_P)\right] + \\ & \left[r_Q^2 \sin^2(\theta_Q) + r_P^2 \sin^2(\theta_P) - 2 r_P r_Q \sin(\theta_Q) \sin(\theta_P)\right] \end{align} $$
 * $$\displaystyle
 * $$\displaystyle


 * }
 * }


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

\begin{align} \Rightarrow (r_{PQ})^2 = &\ r_Q^2 \cos^2(\theta_Q) \cancelto{1}{\left[ \cos^2(\psi_Q) + \sin^2(\psi_Q) \right]} + r_Q^2 \sin^2(\theta_Q) -  2 r_P r_Q \cos(\theta_Q) \cos(\theta_P) \left [\cos(\psi_Q) \cos(\psi_P) \right] + \\ &\ r_P^2 \cos^2(\theta_P) \cancelto{1}{\left[ \cos^2(\psi_P) + \sin^2(\psi_P) \right]} + r_P^2 \sin^2(\theta_P) - 2 r_P r_Q \cos(\theta_Q)\cos(\theta_P) \left [\sin(\psi_Q) \sin(\psi_P)\right] - 2 r_P r_Q \sin(\theta_Q) \sin(\theta_P) \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }


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

\begin{align} \Rightarrow (r_{PQ})^2 = &\ r_Q^2 \cancelto{1}{\left[\cos^2(\theta_Q) + \sin^2(\theta_Q) \right]} -  2 r_P r_Q \cos(\theta_Q) \cos(\theta_P) \underbrace{\left [\cos(\psi_Q) \cos(\psi_P) + \sin(\psi_Q) \sin(\psi_P)\right]}_{=\ \cos(\psi_Q-\psi_P)} + \\ &\ r_P^2 \cancelto{1}{\left[ \cos^2(\theta_P) + \sin^2(\theta_P) \right]} - 2 r_P r_Q \sin(\theta_Q) \sin(\theta_P)
 * $$\displaystyle
 * $$\displaystyle

\end{align} $$
 * }
 * }


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

\begin{align} \Rightarrow (r_{PQ})^2 = &\ r_Q^2 + r_P^2 -  2 r_P r_Q \left[\underbrace{\cos(\theta_Q) \cos(\theta_P) {\cos(\psi_Q-\psi_P)} + \sin(\theta_Q)\sin(\theta_P)}_{=\ \cos\gamma} \right] \end{align} $$
 * $$\displaystyle
 * $$\displaystyle
 * }
 * }

And so,


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

$$\displaystyle (r_{PQ})^2 = (r_P)^2 + (r_Q)^2 - 2 (r_P) (r_Q) \cos\gamma $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = |
 * }
 * }

= Problem 6: Binomial Series = From lecture note slide 38-4.

Given
The binomial series expansion is
 * {| style="width:100%" border="0" align="left"

(x+y)^r = \sum_{k=0}^\infty \begin{pmatrix} r \\ k \end{pmatrix} x^{r-k} y^k $$ $$ where
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 1)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\begin{pmatrix} r \\ k \end{pmatrix} = \frac{r(r-1) \cdot\cdot\cdot (r-k+1)}{k!} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 2)
 * }
 * }

Find
Use Eqs. 1 and 2 to show that
 * {| style="width:100%" border="0" align="left"

(1-x)^{-1/2} = \sum_{i=0}^\infty \alpha_i x^i $$ $$ where
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 3)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

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

Solution
Using Eq. 3, we can rewrite the LHS of Eq. 1 as
 * {| style="width:100%" border="0" align="left"

(1-x)^{-1/2} = \sum_{k=0}^\infty \begin{pmatrix} -1/2 \\ k \end{pmatrix} 1^{-1/2-k} (-x)^k $$ $$ We can expand this
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 5)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

(1-x)^{-1/2} = \sum_{k=0}^\infty \frac{(-1/2)(-3/2)\cdot\cdot\cdot(1/2-k)}{k!} (-x)^k $$ $$ The number of factors in the numerator is $$\displaystyle k$$, hence we can rewrite this as
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 6)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

(1-x)^{-1/2} = \sum_{k=0}^\infty \frac{(1)(3)\cdot\cdot\cdot(2k-1)}{(-2)^k k!} (-x)^k $$ $$ Change $$\displaystyle k \rightarrow i$$, and cancel two minus signs
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 7)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

(1-x)^{-1/2} = \sum_{i=0}^\infty \frac{(1)(3)\cdot\cdot\cdot(2i-1)}{2^i i!} x^i $$ $$ The denominator can then be expanded
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 8)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

(1-x)^{-1/2} = \sum_{i=0}^\infty \underbrace{\frac{1 \cdot 3\cdot\cdot\cdot(2i-1)}{2 \cdot 4 \cdot \cdot \cdot (2i)}}_{\alpha_i} x^i $$ $$ So that
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 9)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle (1-x)^{-1/2} = \sum_{i=0}^\infty \alpha_i x^i $$ $$ where
 * 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"

$$\displaystyle \alpha_i = \frac{1 \cdot 3\cdot\cdot\cdot(2i-1)}{2 \cdot 4 \cdot \cdot \cdot (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. 11)
 * }
 * }

= Problem 7: Generating Functon for Legendre Polynomials = From lecture note slide 39-2.

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

A(\mu, \rho) := 1 - 2 \mu \rho + \rho^2 $$ $$ and the binomial expansion
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 1)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

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

\alpha_i = \frac{1 \cdot 3 \cdot ... \cdot (2i - 1)}{2 \cdot 4 \cdot ... \cdot (2i)} $$ $$ Using Eqs. 1 and 2, we can expand the expression
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 3)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

[A(\mu,\rho)]^{-1/2} = \alpha_0 + \alpha_1(2\mu \rho- \rho^2) + \alpha_2(2\mu \rho- \rho^2)^2 + ... $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

= \underbrace{\alpha_0}_{P_0(\mu)} + \underbrace{2 \mu \alpha_1}_{P_1(\mu)} \rho + \underbrace{(- \alpha_1 + 4 \mu^2 \alpha_2)}_{P_2(\mu)} \rho^2 + ... $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 4)
 * }
 * }

Find
Continue the expansion given by Eq. 4 to yield $$\displaystyle P_3$$, $$\displaystyle P_4$$, and $$\displaystyle P_5$$, and compare the result to that obtained by Eq. 7 on lecture note slide 31-3
 * {| style="width:100%" border="0" align="left"

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

Solution
We need the first 6 terms of the expansion
 * {| style="width:100%" border="0" align="left"

[A(\mu,\rho)]^{-1/2} = \alpha_0 + \alpha_1(2\mu \rho- \rho^2) + \alpha_2(2\mu \rho- \rho^2)^2 + \alpha_3(2\mu \rho- \rho^2)^3 + \alpha_4(2\mu \rho- \rho^2)^4 + \alpha_5(2\mu \rho- \rho^2)^5 + ... $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

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

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

+ \alpha_2(4\mu^2 \rho^2 - 4\mu \rho^3 + \rho^4) $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

+ \alpha_3 (8\mu^3 \rho^3 - 12\mu^2 \rho^4 + 6\mu \rho^5 -  \rho^6) $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

+ \alpha_4 (16\mu^4 \rho^4 - 32\mu^3 \rho^5 +  24\mu^2 \rho^6 - 8 \mu \rho^7 +  \rho^8) $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

+ \alpha_5 (32\mu^5 \rho^5 - 80 \mu^4 \rho^6 + 80 \mu^3 \rho^7 - 40 \mu^2 \rho^8 +  10 \mu \rho^9 -  \rho^{10}) + ... $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

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

+ (-\alpha_1 + 4 \alpha_2 \mu^2) \rho^2 $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

+ (- 4 \alpha_2 \mu + 8 \alpha_3 \mu^3) \rho^3 $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

+ (\alpha_2 - 12 \alpha_3 \mu^2 + 16 \alpha_4 \mu^4) \rho^4 $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

+ (6 \alpha_3 \mu - 32 \alpha_4 \mu^3 + 32 \alpha_5 \mu^5) \rho^5 + ... $$ $$ Using Eq. 3, we have that
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 6)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\alpha_0 = 1 \quad \alpha_1 = \frac{1}{2} \quad \alpha_2 = \frac{3}{8} \quad \alpha_3 = \frac{15}{48} \quad \alpha_4 = \frac{105}{384} \quad \alpha_5 = \frac{945}{3840} \quad $$ we can substitute this into Eq. 6
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * }
 * {| style="width:100%" border="0" align="left"

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

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

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

+ \left(\frac{3}{8} - \frac{15}{4} \mu^2 + \frac{35}{8} \mu^4\right) \rho^4 $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

+ \left(\frac{15}{8} \mu - \frac{35}{4} \mu^3 + \frac{63}{8} \mu^5\right) \rho^5 + ... $$ $$ From the above, we can extract
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 7)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle P_3(\mu) = - \frac{3}{2} \mu + \frac{5}{2} \mu^3 $$ $$
 * 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"

$$\displaystyle P_4(\mu) = \frac{3}{8} - \frac{15}{4} \mu^2 + \frac{35}{8} \mu^4 $$ $$
 * 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)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

$$\displaystyle P_5(\mu) = \frac{15}{8} \mu - \frac{35}{4} \mu^3 + \frac{63}{8} \mu^5 $$ $$ Using Eq. 5, 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"

P_3(x) = \sum_{i=0}^1 \frac{1 \cdot 3 \cdot ... \cdot (2n - 2i - 1)}{2^i i! (n-2i)!} (-1)^i x^{n-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_3(x) = \frac{1 \cdot 3 \cdot 5}{ 3!} x^3 - \frac{1 \cdot 3 }{2} x $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 12)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

$$\displaystyle P_3(x) = \frac{5}{ 2} x^3 - \frac{3}{2} 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)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

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

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

P_5(x) = \sum_{i=0}^2 \frac{1 \cdot 3 \cdot ... \cdot (2n - 2i - 1)}{2^i i! (n-2i)!} (-1)^i x^{n-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_5(x) = \frac{1 \cdot 3 \cdot ... \cdot 9}{5!} x^5 - \frac{1 \cdot 3 \cdot ... \cdot 7}{2 \cdot 3!} x^3 + \frac{1 \cdot 3 \cdot 5}{8} x $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (Eq. 18)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

$$\displaystyle P_5(x) = \frac{63}{8} x^5 - \frac{35}{4} x^3 + \frac{15}{8} x $$ $$ We have confirmed that the methods are equivalent, at least for terms up to $$\displaystyle P_5$$.
 * 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)
 * }
 * }

= Notes and References =

= Contributing Team Members =

Egm6321.f09.Team1.andy 12:03, 29 November 2009 (UTC)

Egm6321.f09.Team1.sallstrom 18:48, 2 December 2009 (UTC)

Egm6321.f09.Team1.vasquez 05:09, 5 December 2009 (UTC)

Egm6321.f09.Team1.AH 15:59, 8 December 2009 (UTC)