User:Egm6321.f09.Team6/HW7

=Problem 1= =Problem 2=

Problem Statement
Use Eq. 2 to show that $$Q_n(x)$$ is even or odd, depending on $$n$$ (assigned in lecture 37-1).

Solution
The general function for $$Q_3(x)$$ is given by: $$Q_n(x)=P_n(x)tanh^{-1}(x)-2\sum^{J}_{j=1,2,3,...}\frac{2n-2j+1}{2n-j+1}P_{n-j}(x)$$ where $$Q_0(x)$$ is given by: $$Q_0(x)=\frac{1}{2}log\left(\frac{1+X}{1-X}\right)$$ Since $$Q_0(x)$$ is a logarithmic function, it is even. Next, the equation for $$Q_1(x)$$ is: $$Q_1(x)=\frac{1}{2}xlog\left(\frac{1+x}{1-x}\right)-1$$ The first part of the expression for $$Q_1(x)$$, given as $$\frac{1}{2}x$$ is an odd polynomial, and the second part is a logarithmic function, which is even. The product of these two parts is an odd function. The final expression for $$Q_1(x)$$ is the sum of this function with $$-1$$, which is even. Therefore, the final equation for $$Q_1(x)$$ is neither odd nor even. The equation for $$Q_2(x)$$ is given by $$Q_2(x)=\frac{1}{4}(3x^2-1)log\left(\frac{1+x}{1-x}\right)-\frac{3}{2}x$$ The first part of the equation for $$Q_2(x)$$, given as $$\frac{1}{4}(3x^2-1)$$ , is even. The second part is a logarithmic function, which is even. Then the third part, $$\frac{3}{2}x$$, is also even. The entire equation for $$Q_2(x)$$ is therefore even. Finally, the equation for $$Q_3(x)$$ is $$Q_3(x)=\frac{1}{4}(5x^3-3x)log\left(\frac{1+x}{1-x}\right)-\frac{5}{2}x^2+\frac{2}{3}$$ The first part of the equation for $$Q_3(x)$$, given by $$\frac{1}{4}(5x^3-3x)$$ , is odd. The second part is a logarithmic function, which is even. The product of these two functions is therefore odd. The third part of the function, given by $$-\frac{5}{2}x^2+\frac{2}{3}$$, is even. The sum of this function with the product is neither odd nor even. Following this pattern, $$Q_n(x)$$ is even for $$n=0,2,4,...$$ and $$Q_n(x)$$ is neither even nor odd for $$n=1,3,5,...$$. =Problem 3=

Problem Statement
Plot $$\{P_0, P_1, ..., P_4\}$$ and $$\{Q_0, Q_1, ... , Q_4\}$$.

MATLAB Plots
=Problem 4= =Problem 5=

Problem Statement
From Lecture p.37-3

Show that the following is true, by performing integration by parts:

$$ \begin{align} \alpha = -\int_{-1}^{+1} \left(1-x^{2}\right)L_{n}'L_{m}'\text{d}x \end{align} $$

Solution
Let,


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

u = L_m \Rightarrow du = L'_m dx, $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 1)
 * }
 * }

and,


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

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


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

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

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


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

(1-x^2) = 0. $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (Eq. 5)
 * }
 * }

Substituting Equation (5) in first term of Equation (4),


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

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

The first term becomes zero,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 6=

Problem Statement
From Lecture p.38-2

$$ \begin{align} \left(r_{pq}\right)^{2} = ||\vec{PQ}||^{2} = \sum_{i=1}^{3}\left(x_{qi}-x_{pi}\right)^{2} \end{align} $$

Points $$P$$ and $$Q$$ in spherical coordinates,

$$ \begin{align} P &= \left(r_{p},\phi_{p},\theta_{p}\right) \\ Q &= \left(r_{q},\phi_{q},\theta_{q}\right) \end{align} $$

The cartesian coordinates of these points be given as:

$$ \begin{align} P &= \left(x_{p1}, x_{p2}, x_{p3}\right) \\ Q &= \left(x_{q1}, x_{q2}, x_{q3}\right) \end{align} $$

The relationship between these two coordinate systems is given as

$$ \begin{align} x_{p1} &= r_{p}\cos\left(\theta_{p}\right)\cos\left(\phi_{p}\right) \\ x_{p2} &= r_{p}\cos\left(\theta_{p}\right)\sin\left(\phi_{p}\right) \\ x_{p3} &= r_{p}\sin\left(\theta_{p}\right) \\ \\ x_{q1} &= r_{q}\cos\left(\theta_{q}\right)\cos\left(\phi_{q}\right) \\ x_{q2} &= r_{q}\cos\left(\theta_{q}\right)\sin\left(\phi_{q}\right) \\ x_{q3} &= r_{q}\sin\left(\theta_{q}\right) \end{align} $$

Convert the following equation for $$\left(r_{pq}\right)^{2}$$ to spherical coordinates, by substituting in the relationships above.

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
 * $$\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) {\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) {\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 {\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 {\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 $$ =Problems 7 & 8= =Contributing Members= Egm6321.f09.Team6.PaulMoore
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = |
 * }
 * }

Egm6321.f09.team6.breaux 20:05, 9 December 2009 (UTC)

Egm6321.f09.Team06.sada 21:00, 9 December 2009 (UTC)

Egm6321.f09.Team6.dianafoster 21:02, 9 December 2009 (UTC)