User:Egm6322.s12.TEAM1.HW/HW1

Problem 1: Constructing the Gram Matrix for Fourier Basis Functions
 Solved without assistance 

Given Equations
Fourier Series with basis functions:

Scalar (inner) product:

Wronskian:

Find: Gram Matrix and Properties
A. Construct the Gram Matrix for the given Fourier basis functions using the scalar product. B. Determine the property of this Gram Matrix. C. Show that $$

\left \{ \cos \theta\ \, \sin \theta\ \ \right \} $$ are linearly independent using the Wronskian.

Solution
A. From Wolfram Mathworld the Gram matrix is defined as a set $$ \mathbf{V} $$ of $$ \mathbf{m} $$ vectors (points in $$ \mathbb R ^n $$), the Gram Matrix $$ \mathbf{G} $$ is the matrix of all possible inner products of $$ \mathbf{V} $$, i.e. where $$ \mathbf{A}^T $$ denotes the transpose. The Gram matrix determines the vectors $$ \mathbf{v}_i $$ up to isometry. For this problem the value of $$ \mathbf{v}_i = g(x)= \cos n \omega\ \theta\ \ $$ and $$ \mathbf{v}_j = h(x)= \sin n \omega\ \theta\ \ $$ Then, and B. This Gram matrix is invertible C. The Wronskian is defined as: Using $$ u_1 = \cos \theta\ $$ and $$ u_2 = \sin \theta\ $$, then $$ u_1' = -\sin \theta\ $$ and $$ u_2' = \cos \theta\ $$ The Wronskian now becomes: If the determinant of the Wronskian doesn't equal zero, the terms are condidered linearly independant, i.e. Thus $$ \cos ^2 \theta\ - (- \sin ^2 \theta\ ) \ne \ 0 $$ can be shown as a true statement and $$ \left \{ \cos \theta\ \, \sin \theta\ \ \right \} $$ are proven linearly independant.

Problem 2: Fourier Coefficients
 Solved without assistance 

Find
A. Verify Eq 2.1 is valid. B. Recover from Eq2.2 the Fourier coefficients found with the trigonometric identities given.

Solution
A. Verify Eq 2.1 is valid.

if $$ n=m$$, then:

if $$ n\ne m$$, then:

B. Recover from Eq2.2 the Fourier coefficients found with the trigonometric identities given.

From the definition of the coefficients in the lecture, we can get: Then, the Fourier coefficients can be found from above:

Problem 3: Alternative Coefficients
 Solved without assistance 

Given & Find
show that, equivalent to (2)-(3)P.42-10, the Fourier series can be written as

$$f(\theta )=\operatorname{Re}(\sum\limits_{n=0}^{+\infty }{{e}^{in\omega \;\theta \;}})$$

An advantage of (2)-(3)P.42-10 is a simple and elegant computation of the coefficients as shown in (1) p.42-12.

Solution
Starting from eqation (1) in P42-10, the following can be derived.

in which:

$${{\overline{a}}_{n}}={{a}_{n}}-i{{b}_{n}}$$, for n>0.

In comparison, the coefficients in equation (1) p.42-12 is obviously more simple and elegant than equation(3.1) above.

Problem 4: Plot the following pairs in separate figures
 Solved without assistance 

Given
From [[media:pea1.f11.mtg42.djvu|Mtg 42]] Pg 42-2

Legendre polynomials

$$\begin{align} & {{P}_{0}}(x)=1 \\ & {{P}_{1}}(x)=x \\ & {{P}_{2}}(x)=\frac{1}{2}(3{{x}^{2}}-1) \\ & {{P}_{3}}(x)=\frac{1}{2}(5{{x}^{3}}-3x) \\ \end{align}$$

Legendre functions

$$\begin{align} & {{Q}_{0}}(x)=\frac{1}{2}\log \left( \frac{1+x}{1-x} \right) \\ & {{Q}_{1}}(x)=\frac{1}{2}x\log \left( \frac{1+x}{1-x} \right)-1 \\ & {{Q}_{2}}(x)=\frac{1}{4}(3{{x}^{2}}-1)\log \left( \frac{1+x}{1-x} \right)-\frac{3}{2}x \\ & {{Q}_{3}}(x)=\frac{1}{4}(5{{x}^{3}}-3x)\log \left( \frac{1+x}{1-x} \right)-\frac{5}{2}{{x}^{2}}+\frac{2}{3} \\ \end{align}$$ And the fourth pair: $$ \begin{align} P_4(x)&=\frac{35}{8}x^4-\frac{15}{4}x^2+\frac{3}{8} \\ Q_4(x)&= ((105*atan(x*i)*i)*x^4 + 105*x^3 + (-90*atan(x*i)*i)*x^2 - 55*x + 9*atan(x*i)*i)/24 \end{align} $$

(Q4 is the result calculated by Matlab)

Find
1.Plot the above 5 pairs in separate figures

2.Observe even-ness and odd-ness of {Pi,Qi},i=1,...,4 and guess the value of the scalar products: $$ =\int^{\mu=+1}_{\mu=-1}P_i(\mu)Q_i(\mu)d\mu $$

Solution










So, for Pn: when n is odd, Pn is odd; when n is even, Pn is even;

for Qn: when n is odd, Qn is even; when n is even, Qn is odd;

Thus, PnQn is always odd

So, $$ =\int^{\mu=+1}_{\mu=-1}P_i(\mu)Q_i(\mu)d\mu=0 $$ for i=0,...,n

Problem 5: Proof problems
 Solved without assistance 

Find
1. Show that if g is odd, then f is odd. 2. Show that if g is even, then f is even.

Solution
If g is odd, g(x) is following that

This shows that if g is odd, f is also odd. If g is even, g(x) is following that

This result shows that if g is even, f is also even.

Problem 6: Legendre Polynomials for even or odd numbers
 Solved without assistance 

Find
Show $$\displaystyle P_2k(x) $$ is even $$\displaystyle P_{2k+1}(x)$$ is odd When k = 0,1,2,3,....,

Solution
When n= 2k,the above equation is following that

The above results show that if n is even, f(x) = f(-x).

When n = 2k+1, the equation is following that

When x= -x,

This shows that

Problem 7: Computing Coefficients
 Solved without assistance 

Given
$$ q(x)=-4-7x+3{{x}^{2}}+2{{x}^{3}}-5{{x}^{4}}+{{x}^{5}} \ $$

Find
Find $$ {{d}_{i}} \ $$ such that: $$q(x)=\sum\limits_{i=0}^{n}{{{d}_{i}}{{P}_{i}}(x)}\in {{\Rho }_{n}}$$ plot q(x) in two figures

Solution
According the Lecture 42-15, components can be computed by:

And the Legendre polynomials are known as: And, The components can be computed by substituting Eq 7.2 and Eq 7.3 into Eq 7.1 within Wolfram Alpha.

From the following figure, we can see that these two equations produce almost identical curves.

=Contributing Members & Referenced Lecture=

=References=