User:Eml5526.s11.team3.ushnish12/Homework 5

Problem 5.4
i>

Let the LIBF be defined by a function


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

$$\displaystyle
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |

f(x)=\prod\limits_{0}^{n}{\frac{(x-{{x}_{1}})(x-{{x}_{2}})(x-{{x}_{3}})...(x-{{x}_{n}})}{({{x}_{0}}-{{x}_{1}})({{x}_{0}}-{{x}_{2}})({{x}_{0}}-{{x}_{3}})...({{x}_{0}}-{{x}_{n}})}}

$$
 * }

Now for the given function, at $$\displaystyle x={{x}_{0}}, f(x)= \frac{({{x}_{0}}-{{x}_{1}})({{x}_{0}}-{{x}_{2}})({{x}_{0}}-{{x}_{3}})...({{x}_{0}}-{{x}_{n}})}{({{x}_{0}}-{{x}_{1}})({{x}_{0}}-{{x}_{2}})({{x}_{0}}-{{x}_{3}})...({{x}_{0}}-{{x}_{n}})} =1 $$ Now for the given function, at $$\displaystyle x={{x}_{1}}, f(x)= \frac{({{x}_{1}}-{{x}_{1}})({{x}_{1}}-{{x}_{2}})({{x}_{1}}-{{x}_{3}})...({{x}_{1}}-{{x}_{n}})}{({{x}_{0}}-{{x}_{1}})({{x}_{0}}-{{x}_{2}})({{x}_{0}}-{{x}_{3}})...({{x}_{0}}-{{x}_{n}})}= 0$$

Now for the given function, at $$\displaystyle x={{x}_{2}}, f(x)= \frac{({{x}_{2}}-{{x}_{1}})({{x}_{2}}-{{x}_{2}})({{x}_{2}}-{{x}_{3}})...({{x}_{2}}-{{x}_{n}})}{({{x}_{0}}-{{x}_{1}})({{x}_{0}}-{{x}_{2}})({{x}_{0}}-{{x}_{3}})...({{x}_{0}}-{{x}_{n}})}= 0$$

Now for the given function, at $$\displaystyle x={{x}_{n}}, f(x)= \frac{({{x}_{n}}-{{x}_{1}})({{x}_{n}}-{{x}_{2}})({{x}_{n}}-{{x}_{3}})...({{x}_{n}}-{{x}_{n}})}{({{x}_{0}}-{{x}_{1}})({{x}_{0}}-{{x}_{2}})({{x}_{0}}-{{x}_{3}})...({{x}_{0}}-{{x}_{n}})}= 0$$

So for the basis function, $$\displaystyle {c}_{0} =1 , {c}_{1},{c}_{2},{c}_{n} = 0 $$

Hence the LIBF can be used as a CBS as it satisfies the conditions for the CBS.

Plotting the LIBF used
The LIBF used must satisfy the essential boundary conditions.

The essential boundary conditions to be satisfied are:-


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

$$\displaystyle {{b}_{0}}(1)=1 $$ and  $$\displaystyle {{b}_{1...n}}(1)=0 $$ Hence to satisfy the condition, the LIBF basis functions used are:-
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * }


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

$$\displaystyle f(x)=\prod\limits_{0}^{n}{\frac{(1-x-{{x}_{1}})(1-x-{{x}_{2}})(1-x-{{x}_{3}})...(1-x-{{x}_{n}})}{({{x}_{0}}-{{x}_{1}})({{x}_{0}}-{{x}_{2}})({{x}_{0}}-{{x}_{3}})...({{x}_{0}}-{{x}_{n}})}} $$
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * }

Using these basis functions, the LIBF are plotted until the convergence of the basis functions with the actual solution takes place where the error is less than $$\displaystyle {{10}^{-6}} $$

The convergence becomes less than $$\displaystyle  {{10}^{-6}} $$ for  $$\displaystyle  n=9 $$ The LIBF are plotted for various values of $$\displaystyle n $$ until convergence.



Plotting the LIBF and Exact Solution and Errors
The exact solution of governing equation is
 * {| style="width:100%" border="0"

$$\displaystyle
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |

u(x)=-\frac{118}{27}\ln (\frac{2+3x}{5})+\frac{1}{36}(20x-15{{x}^{2}}+139)

$$
 * }

Using Lagrangian Interpolation basis function
The convergence occurs at $$\displaystyle n=9 $$

Using Matlab to construct above two matrices until satisfying the convergence criterion, we finally have
 * {| style="width:100%" border="0"

$$\displaystyle
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |

{{K}_{FF}}=\left( \begin{matrix} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\   -118.406 & 376.137 & -595.975 &  712.071 & -660.485 & 432.555 & -193.210 & 55.498 & -8.185 \\   142.2520 & -595.975 & 1152.701 & -1453.567 & 1351.427 & -919.4265 & 440.528 & -142.253 & 24.315 \\   -178.012 & 712.071 & -1453.569 & 2000.226 & -1954.708 & 1382.496 & -718.900 & 260.149 & -49.751 \\   163.668 & -660.485 & 1351.427 & -1954.709 & 2080.253 & -1583.127 & 880.332 & -349.433 & 72.069\\   -104.8667 & 432.555 & -919.427 & 1382.497 & -1583.123 & 1349.980 & -828.416 & 345.622 & -74.822 \\   44.845 & -193.210 & 440.529 & -718.900 & 880.332 & -828.415 & 593.033 & -276.316 &  58.104 \\    -11.827 &  55.498 & -142.253 & 260.1492 & -349.433 &  345.622 & -276.3164 & 167.423 & -48.861\\   1.519 & -8.185 & 24.315 & -49.752 & 72.069 & -74.822 &  58.104 & -48.861 &  25.609\\ \end{matrix} \right)

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

$$\displaystyle
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |

{{F}_{F*1}}=\left( \begin{matrix}  4\\   0.908\\  -0.122\\    1.157\\  -0.400\\   0.694\\ -0.0409\\   0.129\\   12\\ \end{matrix} \right)

$$
 * }

By the equation $$\displaystyle Kd =F $$, we have
 * {| style="width:100%" border="0"

$$\displaystyle
 * style="width:92%; padding:10px; border:2px solid #ff0000" |
 * style="width:92%; padding:10px; border:2px solid #ff0000" |

{{d}_{F*1}}=\left( \begin{matrix}  4.0000\\    4.3689\\    4.7537\\    5.1595\\    5.5935\\    6.0649\\    6.5867\\    7.1775\\    7.8656\\ \end{matrix} \right)

$$
 * }