User:Eml5526.s11.team04.premchand/HW5

= Problem 5.1 =

Problem Statement
Solve G1DM1.0/D1b using WF with appropriate basis function (Poly, Fourier, Exp), until convergence of $$u^h(0.5)$$ to $$O(10^{-6})$$.

Boundary Conditions
The boundary conditions are

Solution
On solving the given PDE with the boundary conditions we get ,the exact equation for u(x) is as follows

Polynomial
The polynomial basis function is given by $$\mathfrak{F}_{p}=\left\{x^{j},j=0,1,...,n\right\}$$. For $$\left\{j=0,1,2,3\right\}$$ the basis functions $$\left\{b_{j}\right\}$$ are as follows: The constraint breaking solution$$\left\{\bar{b}_j\right\}$$ for the polynomial basis function is shown below: In the specific case where $$\left\{\beta=0\right\}$$ the CBS becomes:

The basis functions$$\left\{\bar{b}_j\right\}$$ satisfy the CBS requirements since$$\left\{\bar{b}_0(\beta)=constant\neq0\right\}$$ and $$\left\{\bar{b}_j(\beta)=0, for j=1,2,...,n\right\}$$.

Matlab code for polynomial function
The following figure shows the original polynomial basis functions and the CBS basis functions for $$\left\{j=1,2,3\right\}$$,We can see that convergence occurs at an n value of 8

The following figure shows the error vs n

Exponential
The exponential basis function is given by So, the basis functions $$\left\{b_j\right\}$$ are as follows: The corresponding basis functions $$\left\{\bar{b}_j\right\}$$ satisfying CBS are shown below: The basis functions$$\left\{\bar{b}_j\right\}$$ satisfy the CBS requirements


 * $$\left\{\bar{b}_0(\beta)=1\neq0\right\}$$


 * $$\left\{\bar{b}_{j}(\beta)=0, for j=1,2,...\right\}$$.

In the specific case where $$\left\{\beta=0\right\}$$ the CBS becomes:

Matlab code for exponential function
The following figure shows the original polynomial basis functions and the CBS basis functions for $$\left\{j=1,2,3\right\}$$,We can see that convergence occurs at an n value of 12

The following figure shows the error vs n