User:Egm6322.s12.team2/HW8

= R 8.1 - Gram matrix for Fourier basis functions =

Given
Fourier basis functions:
 * {| style="width:100%" border="0"

$$  \displaystyle \textbf{B} = \left\{1,cos(n\omega\theta),sin(n\omega\theta)\right\}, n = 1,2,....     $$ (8.1.1)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Gram matrix:
 * {| style="width:100%" border="0"

$$  \displaystyle \mathbf{\Gamma} = [\mathbf{\Gamma_{ij}}] = [(\mathbf b_i \cdot \mathbf b_j)] \in \mathbb{R} $$     (8.1.2)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Definition of inner product for functions:
 * {| style="width:100%" border="0"

$$  \displaystyle \langle g,h \rangle = \int_a^b g(x)h(x)dx $$     (8.1.3)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Find
Part 1: Construct the Gram matrix for the Fourier basis functions (3)p.40-1 using the scalar product (2)p.42-8. What is the property of the Gram matrix? Part 2: Show that $$\left\{cos\theta,sin\theta\right\}$$ are linearly independent using the Wronskian; see (2)p.35-1

Solution
Part 1: To form the Gram matrix for the Fourier basis functions given in Eq. 8.1.1, it is necessary to compute the inner product for all combinations of basis functions; ie, $$g(\theta)=1,h(\theta)=cos(n\omega\theta); g(\theta)=1,h(\theta)=sin(n\omega\theta); g(\theta)=cos(n\omega\theta),h(\theta)=cos(n\omega\theta);$$ etc. Using Eq. 3 for all permutations, the components of the Gram matrix are computed below. The diagonal terms are given by:


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

$$  \displaystyle \begin{align} \langle 1,1 \rangle &= 1 \\ &=\Gamma_{11} \end{align} $$     (8.1.4)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle \begin{align} \langle \text{cos}(n\omega\theta),\text{cos}(n\omega\theta) \rangle& = \int_0^T \text{cos}^2(n\omega\theta)d\theta \\ &= \int_0^T \frac{1}{2} + \frac{1}{2}\text{cos}(2n\omega\theta) d\theta \\ &=\left[\frac{\theta}{2} + \frac{\text{sin}(2n\omega\theta)}{4n\omega}\right]_0^T \\ &= \frac{T}{2} + \frac{\text{sin}(2n\omega T)}{4n\omega} \\ & =\Gamma_{22} \end{align} $$     (8.1.5)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle \begin{align} \langle \text{sin}(n\omega\theta),\text{sin}(n\omega\theta) \rangle& = \int_0^T \text{sin}^2(n\omega\theta)d\theta \\ &= \int_0^T \frac{1}{2} - \frac{1}{2}\text{cos}(2n\omega\theta) d\theta \\ &=\left[\frac{\theta}{2} - \frac{\text{sin}(2n\omega\theta)}{4n\omega}\right]_0^T \\ &= \frac{T}{2} - \frac{\text{sin}(2n\omega T)}{4n\omega} \\ & =\Gamma_{33} \end{align} $$     (8.1.6)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

And the off-diagonal terms, noting that due to symmetry of the integral, $$\Gamma_{ij} = \Gamma_{ji}$$ for $$i\neq j$$ :


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

$$  \displaystyle \begin{align} \langle 1,\text{cos}(n\omega\theta) \rangle& = \int_0^T (1)(\text{cos}(n\omega\theta))d\theta \\ &= \frac{1}{n\omega}[\text{sin}(n\omega\theta)]_0^T \\ &= \frac{1}{n\omega}\text{sin}(n\omega T)\\ & =\Gamma_{12} = \Gamma_{21} \end{align} $$     (8.1.7)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle \begin{align} \langle 1,\text{sin}(n\omega\theta) \rangle& = \int_0^T (1)(\text{sin}(n\omega\theta))d\theta \\ &= -\frac{1}{n\omega}[\text{cos}(n\omega\theta)]_0^T \\ &= -\frac{1}{n\omega}\left(\text{cos}(n\omega T)-1\right) \\ & =\Gamma_{13} = \Gamma_{31} \end{align} $$     (8.1.8)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle \begin{align} \langle \text{cos}(n\omega\theta),\text{sin}(n\omega\theta) \rangle& = \int_0^T (\text{cos}(n\omega\theta))(\text{sin}(n\omega\theta))d\theta \\ &= \int_0^T \frac{1}{2}\text{sin}(2n\omega\theta) d\theta \\ &= -\frac{1}{4n\omega}[\text{cos}(2n\omega\theta)]_0^T \\ &= -\frac{1}{4n\omega}\left(\text{cos}(2n\omega T)-1\right) \\ & =\Gamma_{23} = \Gamma_{32} \end{align} $$     (8.1.9)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Substituting the results of Eq. 8.1.4-8.1.9 into Eq. 8.1.2 yields the Gram matrix for the Fourier basis functions:
 * {| style="width:100%" border="0"

$$  \displaystyle \mathbf{\Gamma} = \begin{bmatrix} 1 & \frac{1}{n\omega}\text{sin}(n\omega T) & -\frac{1}{n\omega}\left(\text{cos}(n\omega T)-1\right) \\ \frac{1}{n\omega}\text{sin}(n\omega T) & \frac{T}{2} + \frac{\text{sin}(2n\omega T)}{4n\omega} & -\frac{1}{4n\omega}\left(\text{cos}(2n\omega T)-1\right)\\ -\frac{1}{n\omega}\left(\text{cos}(n\omega T)-1\right) & -\frac{1}{4n\omega}\left(\text{cos}(2n\omega T)-1\right) & \frac{T}{2} - \frac{\text{sin}(2n\omega T)}{4n\omega} \end{bmatrix} $$     (8.1.10)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * 
 * }

By inspection, it is clear that the columns of $$\mathbf{\Gamma}$$ are linearly independent as one cannot form one vector from a linear combination of the other two; thus, the Gram matrix for the Fourier basis functions is invertible for all values of n.

Part 2: Wronskian:
 * {| style="width:100%" border="0"

$$  \displaystyle W = \begin{vmatrix} u_1 & u_2\\ \dot{u_1} & \dot{u_2} \end{vmatrix} $$     (8.1.11) in which $$\dot{u}$$ represents the derivative of u. Thus, for the Fourier basis functions in Eq. 8.1.1,
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \begin{align} W &= \begin{vmatrix} \text{cos}\theta & \text{sin}\theta\\ \dot{\text{cos}\theta } & \dot{\text{sin}\theta} \end{vmatrix}\\ &= \begin{vmatrix} \text{cos}\theta & \text{sin}\theta\\ -\text{sin}\theta & \text{cos}\theta \end{vmatrix} \\ &= \text{cos}^2\theta + \text{sin}^2\theta = 1 \neq 0 \end{align} $$     (8.1.12)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

As the determinant is nonzero the basis functions are linearly independent.

= R 8.2 Fourier Series, Euler's Identity, and Fourier Coefficients=

Given
Fourier Series:

$$f(\theta) = a_0 + \sum_{n=1}^\infty a_n \frac{1}{2}(e^{in\omega\theta} + e^{-in\omega\theta}) + \sum_{n=1}^\infty b_n \frac{1}{2i}(e^{in\omega\theta} - e^{-in\omega\theta}) $$

Find
Verify (4). $$\int_0^T e^{i(n-m) \omega \theta} d\theta = $$ $$ \begin{cases} 0, & \text{if} n \ne m \\ T, & \text{if} n=m \end{cases}$$ Recover from (1) on p. 42-12 the Fourier coefficients found with the trigonometric identities above.

From lecture notes [[media:pea1.f11.mtg42.djvu|Mtg 42]]

Solution
Apply Euler's identity. $$e^{ikx} = \cos kx + i\sin kx$$

$$\int_0^T f(\theta)e^{-im\omega \theta} d\theta = \sum_{n=-\infty}^{+\infty} \tilde a_n \, \int_0^T e^{i(n-m) \omega \theta} d\theta$$ The first part of the solution requires the derivation of (4) from p. 42-11. First, let n=m and substitute into the derivation with the Euler identity. The solution requires expansion of the terms in the integral into terms of sine and cosine. The key is to recognize that the expansion of the Euler identity for the positive and negative exponents as shown below. $$e^{-in\omega \theta} = \cos{n\omega \theta} - i\sin{n\omega \theta}$$ $$e^{in\omega \theta} = \cos{n\omega \theta} + i\sin{n\omega \theta}$$ $$e^{in\omega \theta} + e^{-in\omega \theta} = \cos{n\omega \theta} + \cos{n\omega \theta} - i\sin{n\omega \theta} + i\sin{n\omega \theta}$$ Note that the imaginary terms above go to zero. $$e^{in\omega \theta} + e^{-in\omega \theta} = 2\cos{n\omega \theta}$$

Divide the exponential summation by 2, and we have. $$(e^{in\omega \theta} + e^{-in\omega \theta})/2 = \cos{n\omega \theta}$$ Similarly, the pattern can be repeated for the sine term but leaves the imaginary component.

$$e^{in\omega \theta} - e^{-in\omega \theta} = \cos{n\omega \theta} - \cos{n\omega \theta} + i\sin{n\omega \theta} + i\sin{n\omega \theta}$$ Note that the real terms above go to zero. $$e^{in\omega \theta} + e^{-in\omega \theta} = 2i\sin{n\omega \theta}$$

This final term can be divided by 2i to get the equivalent value below. $$(e^{in\omega \theta} - e^{-in\omega \theta})/2 = \sin{n\omega \theta}$$ The Euler identity applies to the integral below. $$\int_0^T e^{i(n-m) \omega \theta} d\theta = \int_0^T{\cos{(n-m) \omega \theta} + i\sin{(n-m) \omega \theta}}$$ Note that if n=m then the following values occur. $$\cos{(n-m) \omega \theta} = \cos{0} = 1$$ $$\sin{(n-m) \omega \theta} = \sin{0} = 0$$ By substituting the values back into the integral, a simple integration is achieved for m=n. $$ \begin{align} \int_0^T e^{i(n-m) \omega \theta} d\theta & = \int_0^T{\cos{(n-m) \omega \theta} + i\sin{(n-m) \omega \theta}} \\ & = \int_0^T{(1 + 0)} \\ & = T \end{align}$$ Next, we concentrate on the condition where n does not equal m below. In this case, apply the substitution $$\text{T} = 2\pi / \omega$$. $$\begin{align} \int_0^T e^{i(n-m) \omega \theta} d\theta & = \int_0^T{\cos{(n-m) \omega \theta} + i\sin{(n-m) \omega \theta}} \\ & = \frac{1}{(n-m)\omega}(\sin{(n-m)\omega \theta} - i\cos{(n-m)\omega \theta} |_0^T \\ & = \frac{1}{(n-m)\omega}(\sin{(n-m)\omega \theta} - i\cos{(n-m)\omega \theta} |_0^2{\pi / \omega} \\ & = \frac{1}{(n-m)\omega}[(\sin{(n-m)\omega 2{\pi / \omega}} - i\cos{(n-m)\omega 2{\pi / \omega}} - (\sin{0} - i\cos{0})] \\ & = \frac{1}{(n-m)\omega}[(\sin{2\pi (n-m)} - i\cos{2\pi (n-m)}) + i] \\ & = \frac{1}{(n-m)\omega}[0 - i + i] \\ & = 0 \end{align}$$ The 2nd part of problem R8.2 requires the recovery of Fourier coefficients. First, the defintion below must be restated as given for the problem.  $$ \bar a_n := \begin{cases} 2 a_0, & \text{for } n=0 \\ a_n - ib_n, & \text{for } n>0 \\ a_n + ib_n, & \text{for } n<0 \end{cases}$$ Next, we revisit the equation of interest below. $$\int_0^T f(\theta)e^{-im\omega \theta} d\theta = \sum_{n=-\infty}^{+\infty} \tilde a_n \, \int_0^T e^{i(n-m) \omega \theta} d\theta$$ In the equation above, if n=m, then we can re-examine the integral above.  First, in the summation, all terms for n go to 0 except where n=m, so the summation term no longer appears. Subsequently, the integral derivation of (4) on p. 42-11 is applied. So this gives the following equation. $$\int_0^T f(\theta) e^{-in \omega \theta}d\theta = \tilde{a_n} T = \tilde{a_m} T$$ Note that the constant can be expanded into the equation from which we recover the Fourier coefficients. $$\begin{align} \tilde{a_n} & = \frac{1}{2}\bar{a_n} \\ & = \frac{1}{T} \int_0^T f(\theta) e^{-in\omega\theta} d\theta \end{align}$$

The equation can be solved in 3 parts: n=0, n>0, and n<0. Let's start with n=0 for which the Fourier coefficient is defined below. Through team collaboration, the derivation below must include to proper definition of Fourier coefficients as noted by Wolfram at url http://mathworld.wolfram.com/FourierSeries.html. The key is to use the relationship for the boundaries of the integral where T=2L. $$\begin{align} \tilde{a_0} & = \frac{1}{T}\int_0^T f(\theta) e^{-in\omega \theta}d\theta & = \frac{1}{2L}\int_0^{2L} f(\theta)d\theta \end{align}$$ Next, the Fourier coefficient for n>0 can be derived with the given definitions and the Euler identity. The identity of the even function for cosine is used. $$\begin{align} {a_n - ib_n} & = \frac{2}{T}\int_0^T f(\theta) e^{-in\omega \theta}d\theta \\ & = \frac{2}{T}\int_0^T f(\theta)(\cos(-in\omega\theta) + i\sin(-n\omega\theta) d\theta \end{align}$$ In the deriviation above for n>0, the Fourier coefficient is the real part of the complex number in the integration. $$\begin{align} a_n & = \frac{2}{T} \mathbf{Re}\int_0^T f(\theta)(\cos{(-n\omega\theta)} + i\sin{(-n\omega\theta)}) \\ & = \frac{1}{L}\int_0^{2L} f(\theta) \cos{(-n\omega\theta)} \\ & = \frac{1}{L}\int_0^{2L} f(\theta) \cos{(n\pi\theta / L)} \end{align}$$ Next, we derive the Fourier coefficient for n<0 by simply taking the imaginary component of the main integral. It must be noted that sine is an odd function to solve the problem. $$\begin{align} b_n & = \frac{2}{T}\mathbf{Im} \int_0^T f(\theta)(\cos{(-n\omega\theta)} + i\sin{(-n\omega\theta)}) \\ & = \frac{2}{T}\int_0^T f(\theta) \sin{(-n\omega\theta)} \\ & = -\frac{1}{L}\int_0^{2L} f(\theta) \sin{(n\pi\theta /L)} \end{align}$$

=R8.3 Fourier Series and Real Components=

Given
We are given (2) and (3) on p. 42-10 below. $$f(\theta) = \frac{1}{2} \sum_{n=-\infty}^{+\infty} \bar a_n e^{in\omega\theta} = \sum_{n=-\infty}^{+\infty}\tilde a_n e^{in\omega\theta}$$ $$\bar a_n := \begin{cases} 2 a_0, &\text{for }n=0 \\ a_n-ib_n, & \text{for }n>0 \\ a_n + ib_n, &\text{for }n<0 \end{cases}$$

Find
Show that, equivalent to (2)-(3) p. 42-10, the Fourier series can be written as $$f(\theta) = \text{Re} \left(\sum_{n={\color{red} 0}}^{+\infty} \tilde a_n e^{in \omega \theta} \right)$$

From lecture notes [[media:pea1.f11.mtg42.djvu|Mtg 42]]

Solution
The first step is to write the original equation for the Fourier Series using exponential terms. $$ f(\theta) = \frac{1}{2}\sum_{n=-\infty}^{+\infty} \bar{a_n} e^{in\omega\theta} = \frac{1}{2}\sum_{n=-1}^{-\infty}(a_n + ib_n)e^{-in\omega\theta} + 2a_0 e^{in\omega\theta} + \sum_{n=1}^{\infty}(a_n - ib_n)e^{-in\omega\theta}$$ The equation can be simplified by recognizing the conjugate values. $$\bar{a_n}^* = \bar{a_{-n}}$$ The conjugate method can be applied to the summation below. $$\sum_{n=-1}^{-\infty} (a_n + ib_n) e^{in\omega\theta} = \sum_{n=1}^{+\infty} (a_n - ib_n)e^{-in\omega\theta}$$ Substitute the right hand term above back into the main equation for $$f(\theta)$$. The derivation steps below show the real component for the solution. $$ \begin{align} f(\theta) & = \frac{1}{2}(\sum_{n=1}^{\infty}(a_n - ib_n)e^{-in\omega\theta} + 2{a_0}e^{in\omega\theta} + \sum_{n=1}^{\infty}(a_n - ib_n)e^{in\omega\theta}) \\ & = \frac{1}{2}(2{a_0}e^{in\omega\theta}(e^{-in\omega\theta} + \sum_{n=1}^{\infty}(a_n - ib_n)e^{in\omega\theta}) \\ & = \frac{1}{2} (2a_0 e^{in\omega\theta} + \sum_{n=0}^{\infty}(a_n - ib_n)\cos{n\omega\theta} \\ & = \frac{1}{2} \sum_{n=0}^{\infty} \bar{a_n} \cos{n\omega\theta} \\ & = \sum_{n=0}^{\infty} \tilde{a_n} \cos{n\omega\theta} \\ & = \text{Re} \sum_{n=0}^{\infty} \tilde{a_n}(cos{n\omega\theta} + i\sin{n\omega\theta}) \\ & = \text{Re} \sum_{n=0}^{+\infty} \tilde{a_n} e^{in\omega\theta} \end{align} $$

=R*8.4 -Legendre Function =

Given
The following pairs: $$\displaystyle \{P_{0},\, Q_{0}\},\,\{P_{1},\! Q_{1}\},\cdots\,,\{P_{4},\, Q_{4}\}$$ (8.4.1)

where $$\displaystyle \{P_{i},\, Q_{i}\} $$ are Legendre polynomials.

Find
1.Plot the 8.4.1 in separate figures. 2.Observe even-ness and odd-ness of 8.4.1 and guess the value of the scalar products:

$$\displaystyle =\int_{\mu=-1}^{\mu=+1}P_{i}(\mu)Q_{i}(\mu)du=?$$

Solution
1.The Legendre polynomial is as follows: $$\displaystyle {P}_{n}(x)=\sum^{m}_{r=0}(-1)^r \frac{(2n-2r)!x^{n-2r}}{2^{n}r!}(n-r)!(n-2r)! $$ where $$\displaystyle m = \frac{n}{2}$$. $$\displaystyle {P}_{0}(x) = 1 $$

$$\displaystyle {P}_{1}(x) = x $$

$$\displaystyle {P}_{2}(x) = \frac{1}{2}(3x^2-1) $$

$$\displaystyle {P}_{3}(x) = \frac{1}{2}(5x^3-3x) $$

$$\displaystyle {P}_{4}(x) = \frac{35\,{x}^{4}}{8}-\frac{15\,{x}^{2}}{4}+\frac{3}{8} $$ and $$\displaystyle {Q}_{0}(x) = \frac{1}{2}\mathrm{log}\left(\frac{1+x}{1-x}\right) $$

$$\displaystyle {Q}_{1}(x) = \frac{1}{2}x \mathrm{log}\left(\frac{1+x}{1-x}\right)-1 $$

$$\displaystyle {Q}_{2}(x) = \frac{1}{4}(3x^2-1)\mathrm{log}\left(\frac{1+x}{1-x}\right)-\frac{3}{2}x $$

$$\displaystyle {Q}_{3}(x) = \frac{1}{4}(5x^3-3x)\mathrm{log}\left(\frac{1+x}{1-x}\right)-\frac{5}{2}x^2+\frac{2}{3} $$

$$\displaystyle {Q}_{4}(x) = \frac{35\,{x}^{4}\,\mathrm{log}\left( -\frac{x}{x-1}-\frac{1}{x-1}\right) }{16}-\frac{15\,{x}^{2}\,\mathrm{log}\left( -\frac{x}{x-1}-\frac{1}{x-1}\right) }{8}+\frac{3\,\mathrm{log}\left( -\frac{x}{x-1}-\frac{1}{x-1}\right) }{16}-\frac{35\,{x}^{3}}{8}+\frac{55\,x}{24} $$ Using Maxima with GNUplot we get the following figures: 2. It is easy to find that $$\displaystyle {P}_{0}(x) = 1={P}_{0}(-x) $$

$$\displaystyle {P}_{1}(x) = x= -{P}_{1}(-x) $$

$$\displaystyle {P}_{2}(x) = \frac{1}{2}(3x^2-1)= {P}_{2}(-x)$$

$$\displaystyle {P}_{3}(x) = \frac{1}{2}(5x^3-3x)= -{P}_{2}(-x) $$ Thus, we are able to guess that $$\displaystyle {P}_{2n}(x)={P}_{2n}(-x) $$ are even-ness while $$\displaystyle {P}_{2n+1}(x)=-{P}_{2n+1}(-x) $$ are odd-ness. Using the same method, we will find that $$\displaystyle {Q}_{2n}(x)=-{Q}_{2n}(-x) $$ are odd-ness while $$\displaystyle {Q}_{2n+1}(x)={Q}_{2n+1}(-x) $$ are even-ness. From the above, we can easily find that $$\displaystyle {P}_{i}(x){Q}_{i}(x) $$ are odd-ness, Since the integral of smooth odd functions from -a to a are zero. That's to say $$\displaystyle =\int_{\mu=-1}^{\mu=+1}P_{i}(\mu)Q_{i}(\mu)du= 0$$

Given
Consider the functions $$\displaystyle g_{i}:\,\mathbb{R}\rightarrow\mathbb{R}$$ and the function $$\displaystyle f=\sum_{i}g_{i}\,:\,\mathbb{R}\rightarrow\mathbb{R}$$

(8.5.1)

Find
Show that: 1. If $$\displaystyle g_{i}$$ is odd, then $$\displaystyle f $$ is odd. 2. If $$\displaystyle g_{i}$$ is even, then $$\displaystyle f$$  is even.

Solution
1. If $$\displaystyle g_{i} $$ is odd, we have $$\displaystyle g_{i}(-x)=-g_{i}(x) $$ then $$\displaystyle {\color{blue}f(-x)}=\sum_{i}g_{i}(-x)=g_{1}(-x)+g_{2}(-x)+\cdots+g_{i}(-x)$$ $$\displaystyle =-g_{1}(x)-g_{2}(x)-\cdots-g_{i}(x)=-\sum_{i}g_{i}(x)={\color{blue}-f(x)}$$ thus $$\displaystyle f$$ is odd. 2. If $$\displaystyle g_{i}$$ is even, we have $$\displaystyle g_{i}(-x)=g_{i}(x)$$ then $$\displaystyle {\color{blue}f(-x)}=\sum_{i}g_{i}(-x)=g_{1}(-x)+g_{2}(-x)+\cdots+g_{i}(-x)$$ $$\displaystyle =g_{1}(x)+g_{2}(x)+\cdots+g_{i}(x)=\sum_{i}g_{i}(x)={\color{blue}f(x)}$$ thus $$\displaystyle f$$ is even.

= R 8.6 - Legendre Polynomials =

Given

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

$$ P_n(x) = \sum^{[n/2]}_{i=0}(-1)^i\frac{(2n-2i)!x^(n-2i)}{2^ni!(n-i)!(n-2i)!} $$     (8.6.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Find

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

$$ \displaystyle P_{2k}(x) is even$$ (8.6.2)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$ \displaystyle P_{2k+1}(x) is odd$$ (8.6.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Solution
Even Function $$\displaystyle F(x) = -F(x) $$

Odd Function $$ \displaystyle F(x) = F(-x) $$

When n=2k


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

$$ \displaystyle P_{2k}(x) = \sum^{[2k/2]}_{i=0}(-1)^i\frac{(4k-2i)!x^(2k-2i)}{2^2ki!(2k-i)!(2k-2i)!}$$ (8.6.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

above equation, x term is the factor to deciede even or odd function.

Therefore, extract x term and expand it

Let assume that k = 5

Then, equation is reduced below


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

$$ \displaystyle \sum_{i=0}^{[5]}x^{10-2i}= x^{10} + x^8 + x^6 + x^4 + x^2 + x^0 $$ (8.6.4)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

since 6 terms are even functions, therefore, $$ P_{2k} $$ is even function

when n=2k+1


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

$$ \displaystyle P_{2k+1}(x) = \sum^{[2k+1/2]}_{i=0}(-1)^i\frac{(2(2k+1)-2i)!x^{((2k+1)-2i)}}{2^(2k+1)i!(2k+1)-i)!((2k+1)-2i)!} $$     (8.6.5)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

extract x term and expand it

Assuming k=5


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

$$ \displaystyle \sum_{i=0}^{[5]}x^{11-2i}= x^{11} + x^9 + x^7 + x^5 + x^3 + x^1$$ (8.6.6)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Since those terms are odd function, therefore, $$P_{2k+1} $$ is odd function

Egm6322.s12.sungsik 18:02, 1 February 2012 (UTC)

= R 8.7 - Change of basis to Legendre polynomials =

Given
Consider the following polynomial:


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

$$  \displaystyle \begin{align} q &\in \mathcal{P}_n \Rightarrow q(x) = \sum_{i=0}^n c_ix^i \\ n &= 5; c_0 = -4,c_1=-7,c_2=3,c_3=2,c_4=-5,c_5=1 \end{align} $$     (8.1.13)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Find
Find $$d_i$$ such that
 * {| style="width:100%" border="0"

$$  \displaystyle q(x) = \sum_{i=0}^n d_iP_i(x) \in \mathcal{P}_n $$     (8.1.14) and plot Eq. 8.1.12 and 8.1.13 on separate figures
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Solution
The goal of this problem is essentially to complete change of basis such that the polynomial q(x) given in Eq. 8.1.13 is mapped onto the orthogonal basis of Legendre polynomials $$P_i$$. This requires the coefficients to the polynomials which can be obtained using Eq. (3)p.42-16 in the class notes, adapted here in Eq. 8.1.15:
 * {| style="width:100%" border="0"

$$  \displaystyle d_i = \frac{2i+1}{2} \int_{x=-1}^{x=1} P_i(x) q(x)dx $$     (8.1.15)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

The Legendre polynomials are well known and can be found online; see for example Wolfram's website (http://mathworld.wolfram.com/LegendrePolynomial.html). Thus, it is only necessary to multiply the polynomials and integrate from -1 to 1; this yields the required coefficients $$d_0$$ through $$d_5$$. For brevity, the algebra for the first coefficient will be included and only the values of the remaining coefficients will be presented. All calculations were verified using Mathematica.


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

$$  \displaystyle \begin{align} d_0& = \frac{2(0)+1}{2} \int_{x=-1}^{x=1} (1) (x^5-5x^4+2x^3+3x^2-7x-4)dx \\ &= \frac{1}{2}\left[\frac{1}{6}x^6 - x^5 + \frac{1}{2} x^4 +x^3 -\frac{7}{2}x^2 -4x\right]_{-1}^1 \\ &= -4 \end{align} $$     (8.1.16)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

Similarly;
 * {| style="width:100%" border="0"

$$  \displaystyle d_1=-5.370; d_2= -0.857; d_3=1.244;d_4=-1.143;d_5=0.127 $$     (8.1.17)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

To verify that the mapping of q(x) onto the Legendre polynomial basis functions, the original polynomial and the summation of $$\sum_{i=0}^{n=5}d_i P_i$$ are plotted separately from $$-10<x<10$$. As expected, the figures are identical.

= References for Report 8 = Vu-Quoc, L. Class Lecture: Principles of Engineering Analysis. University of Florida, Gainesville, FL, (Meeting 42) [[media:pea1.f11.mtg42.djvu|Mtg 42]] 23 Nov 2011. Vu-Quoc, L. Class Lecture: Principles of Engineering Analysis. University of Florida, Gainesville, FL, (Meeting 43a) [[media:pea2.s12.sec43.b.djvu|Mtg 43]] 24 Jan 2012.

= Contributing Members =

Egm6322.s12.team2.Xia I solved R*8.4 and R8.5, proofread R*8.1 and R*8.2