User:Eml5526.s11.t1.ab/HW4

=Problem 5: Various Basis Functions satisfying the Constraint Breaking Solution=

Given

 * a) Constraint Breaking Solution which needs to be satisfied is $$b_{0}(\beta)\neq 0$$ and $$b_{i}(\beta)=0$$, i=1,2,3,....,n.
 * b) Consider $$\Omega=[-2,4]$$

Find
For $$\Gamma _{g}=\left \{ \beta\right \}$$ and each of the following Families of Basis Functions Find the Corresponding Basis Functions Satisfying the Given Constraint Breaking Solution. Plot original and required basis function for $$j=1,2,3$$
 * 5.1 $$F_{p}:=\left \{ x^{j}, j=0,1,2,...\right \}$$.
 * 5.2 $$F_{c}:=\left \{ \cos(jx), j=0,1,2,... \right \}$$.
 * 5.3 $$F_{s}:=\left \{ 1,\sin(jx), j=1,2,... \right \}$$.
 * 5.4 $$F_{f}:= \left \{\cos(jx),j=0,1,2,...\sin(jx),j=1,2,...\right\}$$
 * 5.5 $$F_{e}:=\left \{ e^{jx},j=0,1,2,.. \right \}$$.
 * 5.6 Show that $$\left \{ e^{jx},j=0,1,2,.. \right \}$$ is Linear Independent on $$\Omega$$.

5.1 Find the Corresponding Polynomial Basis Function $$F_{p}:=\left \{ x^{j}, j=0,1,2,...\right \}$$ Satisfying the Given Constraint Breaking Solution.
If we choose $$b_{i}\left ( x \right )=\left(x-\beta\right)^{j}$$, it satisfies the given Constraint Breaking Solution as below,

$$b_{0}\left(\beta\right )=\left ( x-\beta \right )^{0}=1\neq 0$$

&

$$b_{j}\left(\beta\right )=\left ( x-\beta \right )^{j}=0, j=1,2,...$$

So the Polynomial Basis Function satisfying the given constraint breaking solution is,


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

$$b_{j}\left ( x \right )=\left \{\left(x-\beta\right)^{j}, j=0,1,2,...\right \}$$ Plot Between the original and the required basis function is plotted in the MATLAB using the following code.
 * style="width:2%; padding:1px; border:2px solid #FF0000" |
 * style="width:2%; padding:1px; border:2px solid #FF0000" |
 * $$\displaystyle (Eq. 5.1) $$
 * style= |
 * }

Appendix
 Matlab Code: 

5.2 Find the Corresponding Cosine Basis Function $$F_{c}:=\left \{ \cos(jx), j=0,1,2,... \right \}$$ Satisfying the Given Constraint Breaking Solution.
If we select $$b_{j}\left ( x \right )=\cos(j(x-\beta)), j=0$$

It will yield, $$b_{0}\left ( \beta\right)=\cos(0)=1\neq0$$

and further

$$b_{j}\left ( x \right )=\cos(\frac{\pi}{2}(2j+1)\frac{x}{\beta}), j=1,2,...$$

it will yield,

$$b_{j}\left ( x \right )=\cos(n\frac{\pi}{2})=0$$

So the Cosine Basis Function satisfying the given constraint breaking solution is,


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

$$b_{j}\left ( x \right )=\left \{\cos(j(x-\beta)), j=0\right \}$$
 * style="width:2%; padding:1px; border:2px solid #FF0000" |
 * style="width:2%; padding:1px; border:2px solid #FF0000" |

&

$$b_{j}\left ( x \right )=\left \{\cos(\frac{\pi}{2}(2j+1)\frac{x}{\beta}), j=1,2,...\right \}$$ Plot of the original and the required Basis Function is plotted in the MATLAB using the following code
 * $$\displaystyle (Eq. 5.2) $$
 * style= |
 * }

Appendix
 Matlab Code: 

5.3 Find the Corresponding Sine Basis Function $$F_{s}:=\left \{1,\sin(jx), j=1,2,... \right \}$$ Satisfying the Given Constraint Breaking Solution.
If we select,

$$b_{j}\left ( x \right )=\sin(j\pi\frac{x}{\beta}), i=1,2,...$$

It yields,

$$b_{j}\left ( x \right )=\sin(n\pi)=0$$

So the Sine Basis Function satisfying the given constraint breaking solution is,


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

$$b_{j}\left ( x \right )=\left \{1,\sin(j\pi\frac{x}{\beta}), j=1,2,...\right \}$$
 * style="width:2%; padding:1px; border:2px solid #FF0000" |
 * style="width:2%; padding:1px; border:2px solid #FF0000" |
 * $$\displaystyle (Eq. 5.3) $$
 * style= |
 * }

Appendix
 Matlab Code: 

===5.4 Find the Corresponding Fourier Basis Function $$F_{f}:=\left \{\cos(jx),j=0,1,2,... \sin(jx),j=1,2,...\right\}$$ Satisfying the Given Constraint Breaking Solution.===

If we select, According to $$\displaystyle (Eq. 5.2)$$

$$b_{j}\left ( x \right )=\cos(j(x-\beta)), j=0$$

It will yield, $$b_{0}\left ( \beta\right)=\cos(0)=1\neq0$$

and further

$$b_{j}\left ( x \right )=\cos(\frac{\pi}{2}(2j+1)\frac{x}{\beta}), j=1,2,...$$

it will yield,

$$b_{j}\left ( x \right )=\cos(n\frac{\pi}{2})=0$$

Also,

If we select, According to $$\displaystyle (Eq. 5.3)$$,

$$b_{j}\left ( x \right )=\sin(j\pi\frac{x}{\beta}), i=1,2,...$$

It yields,

$$b_{j}\left ( x \right )=\sin(n\pi)=0$$

Eventually,

The Fourier Basis Function Satisfying the given Constraint Breaking Solution is,


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

$$b_{j}\left ( x \right )=\left \{1,\cos(\frac{\pi}{2}(2j+1)\frac{x}{\beta}), j=1,2,...,
 * style="width:2%; padding:1px; border:2px solid #FF0000" |
 * style="width:2%; padding:1px; border:2px solid #FF0000" |

\sin(j\pi\frac{x}{\beta}), j=1,2,...\right \}$$ Plot of the original and the required Basis Function is plotted in the MATLAB using the following code.
 * $$\displaystyle (Eq. 5.4) $$
 * style= |
 * }

Appendix
 Matlab Code: 

===5.5 Find the Corresponding Exponential Basis Function $$F_{e}:=\left \{ e^{jx},j=0,1,2,... \right\}$$ Satisfying the Given Constraint Breaking Solution.===

If we select,

$$b_{j}\left ( x \right)=\left \{e^{jx\beta}, i=0\right \}$$

and further,

$$b_{j}\left ( x \right)=\left \{e^{j(x-\beta)}-1, i=1,2,...\right \}$$

Eventually, The Fourier Basis Function Satisfying the Given Constraint Breaking Solution is,


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

$$b_{j}\left ( x \right )=\left \{1,e^{j(x-\beta)}-1, i=1,2,...\right \}$$ Plot of the original and the required Basis Function is plotted in the MATLAB using the following code.
 * style="width:2%; padding:1px; border:2px solid #FF0000" |
 * style="width:2%; padding:1px; border:2px solid #FF0000" |
 * $$\displaystyle (Eq. 5.5) $$
 * style= |
 * }

Appendix
 Matlab Code: 

5.6 Show that $$\left \{ e^{jx},j=0,1,2,.. \right \}$$ is Linear Independent on $$\Omega$$.
We have,

$$F=\begin{bmatrix} 1 & e^x & e^{2x} \end{bmatrix}$$

Calculating $$\Gamma (F)$$ for the given interval $$\Omega [-2,4]$$,we get

$$\Gamma (F)=\int_{-2}^{4}\begin{bmatrix} 1 & e^{x} &e^{2x} \\ e^{x} &e^{2x} & e^{3x}\\ e^{2x} & e^{3x} & e^{4x} \end{bmatrix}$$

Therefore,

$$\Gamma (F)=\begin{bmatrix} 6 & e^{4}-e^{-2} &(e^{8}-e^{-4})/2 \\ e^{4}-e^{-2} &(e^{8}-e^{-4})/2 & (e^{12}-e^{-6})/3\\ (e^{8}-e^{-4})/2 & (e^{12}-e^{-6})/3 & (e^{16}-e^{-8})/4 \end{bmatrix}$$

To check the Linear Independent Behavior we need to check the Determinant of this matrix. So calculating the determinant of this matrix in the MATLAB Using the Following code,

Appendix
 Matlab Code: 

The Determinant arrives as $$1.1145\times (10)^{9}$$ which is a Non-zero number.

So we can say that, $$\left \{ e^{jx},j=0,1,2,.. \right \}$$ is Linear Independent on $$\Omega$$.