User:Eml5526.s11.team2/hwk2

=Problem 2.1: "Derive the First Order Differential Heat Equation for a 1-D Finite Element"=

Problem Statement:
To derive the first order differential equation for heat was introduced in Meeting 6 Page 2 Using a free-body diagram apply the appropriate heat balance and verify that the following differential equation holds for the case of a 1-D finite element with heat applied:

The following figure is the free body diagram of the finite element heat problem:



Solution:
The first order differential equation can derived by summing the heat flux, heat flow, and heat outflow:

where

Summing all heat leaving and entering the finite element:

Expanding the q(x+dx) and A(x+dx) terms:

Dividing through by dx:

From initial and boundary conditions, the final solution is equal to equation 1.1:
 * }
 * }

= Problem 2.2:Comparing Two finite element methods=

Given
$$\left\{ {{\underline{a}}_{i}},i=1,2,......n \right\}$$ is a orthonormal basis.

i.e. $${{\underline{a}}_{i}}.{{\underline{a}}_{j}}={{\delta }_{ij}}$$

$$\left[ {{b}_{jk}} \right]=\left( \begin{matrix}  1 & 1 & 1  \\   2 & -1 & 3  \\   3 & 2 & 6  \\ \end{matrix} \right)$$

Vectors $$ \displaystyle {{\underline{b}}_{j}}$$ are basis vectors and we cen express this basis vectors in terms of orthonormal basis vectors. These basis vectors were represented in meeting 7-3.

$${{\underline{b}}_{j}}={{\underline{b}}_{jk}}{{\underline{a}}_{k}}$$

i.e.

$$\begin{align} & {{\underline{b}}_{1}}={{\underline{a}}_{1}}+{{\underline{a}}_{2}}+{{\underline{a}}_{3}} \\ & {{\underline{b}}_{2}}=2{{\underline{a}}_{1}}-{{\underline{a}}_{2}}+3{{\underline{a}}_{3}} \\ & {{\underline{b}}_{3}}=3{{\underline{a}}_{1}}+2{{\underline{a}}_{2}}+6{{\underline{a}}_{3}} \\ \end{align}$$

also

$$\underline{v}=5{{\underline{a}}_{1}}-7{{\underline{a}}_{2}}-4{{\underline{a}}_{3}}$$

Find
1) Find $$\left[ {{b}_{jk}} \right]$$

2) Find $$\underline{\Gamma }\left( {{\underline{b}}_{1}},{{\underline{b}}_{2}},{{\underline{b}}_{3}} \right)$$, which is also equal to $$\underline{K}$$  also find $$\text{det}\left[ \underline{\Gamma } \right]$$

3) Solve $$\underline{F}=\left\{ {{F}_{i}} \right\}=\left\{ {{\underline{b}}_{i}}.\underline{v} \right\}$$

4) Solve $$\underline K \underline d = \underline F $$ for $$d = \left[  \right]$$

5) Use $${\underline w _i}.\underline{\underline P} \left( {\underline v } \right) = 0$$ $$\forall i = 1,2,.......n$$ to find $$ \underline {\overline K } \underline d = \underline {\overline F } $$. What will be $$\underline {\overline K } $$ and $$\underline {\overline F } $$ for this case.

6) Solve for $$\underline d $$ for this case and compare to the value calculated in 4).

7) Observe the symmetric properties of $$\underline K $$ and $$\underline {\overline K } $$. Discuss the pros and cons of two methods.

Background Theory


The Equations used below are stated in meeting 7-1.

$$\left\{ {{\underline{b}}_{i}},i=1,2.....n \right\}$$ is a basis for $${{\mathbb{R}}^{n}}$$ not rectilinear orthonormal.

$$\underline{v}$$ is any vector,such that


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

$$  \displaystyle \underline v = \sum\limits_{j = 1}^n $$      (2.1)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle \sum\limits_{j = 1}^n {{{\underline b }_j}{v_j} - \underline v = 0} $$      (2.2)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle \underline{\underline P} \left( {\underline v } \right) = 0 $$      (2.3)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle \underline{\underline P} \left( v \right) = \sum\limits_{j = 1}^n {{{\underline b }_j}{v_j} - \underline v } $$      (2.4)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Successively multiply by $${\underline b _i}\left( {i = 1,2,......n} \right)$$ equations with n unknowns are formed


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

$$  \displaystyle {\underline b _i}.\underline{\underline P} \left( {\underline v } \right) = 0 $$      (2.5)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle {\underline b _i}\sum\limits_{j = 1}^n  = {\underline b _i}.\underline v $$ (2.6)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle \sum\limits_{j = 1}^n {{{\underline b }_i}.{{\underline b }_j}{v_j}} = {\underline b _i}.\underline v $$ (2.7)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle {\left[ \right]_{n \times n}}{\left[  \right]_{n \times 1}} = {\left[  \right]_{n \times 1}} $$      (2.8)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle \underline K \underline d = \underline F $$ (2.9)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * 
 * }

Solution
1) Using MATLAB Mathworks to find determinant. $$\det \left[ \right] = -8$$

2) Elements of Stiffness matrix $$\underline K $$ are given by equation number (7),(8) & (9) and shown in following matrix.
 * {| style="width:100%" border="0"

$$  \displaystyle \underline K = \left( {\begin{array}{ccccccccccccccc}  {{{\underline b }_1}.{{\underline b }_1}}&{{{\underline b }_1}.{{\underline b }_2}}&{{{\underline b }_1}.{{\underline b }_3}} \\   {{{\underline b }_2}.{{\underline b }_1}}&{{{\underline b }_2}.\underline  }&{{{\underline b }_2}.{{\underline b }_3}} \\   {{{\underline b }_3}.{{\underline b }_1}}&{{{\underline b }_3}.{{\underline b }_2}}&{{{\underline b }_3}.{{\underline b }_3}} \end{array}} \right) $$      (2.10)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle \underline K = \left( {\begin{array}{ccccccccccccccc}  3&4&{11} \\   4&{14}&{22} \\   {11}&{22}&{49} \end{array}} \right) $$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * }


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

$$  \displaystyle \det \left( {\underline K } \right) = 64 $$      (2.11)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

3) As shown in equation numbers (7) & (8).

$$\underline F = \left\{  \right\} = \left\{ {{{\underline b }_i}.\underline v } \right\}$$


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

$$  \displaystyle \left( {\begin{array}{ccccccccccccccc}  \\    \\ \end{array}} \right) = \left( {\begin{array}{ccccccccccccccc}  {{{\underline b }_1}.\underline v } \\   {{{\underline b }_2}.\underline v } \\   {{{\underline b }_3}.\underline v } \end{array}} \right) $$      (2.12)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle \left( {\begin{array}{ccccccccccccccc}  \\    \\ \end{array}} \right) = \left( {\begin{array}{ccccccccccccccc}  { - 6} \\   5 \\   { - 23} \end{array}} \right) $$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * }

4) To find the value of $$\underline d$$


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

$$  {\underline K ^{ - 1}} = \left( {\begin{array}{ccccccccccccccc}  {3.1562}&{0.7187}&{ - 1.0312} \\   {0.7187}&{0.4062}&{ - 0.3437} \\   { - 1.0312}&{ - 0.3437}&{0.4062} \end{array}} \right) $$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * }


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

$$  \displaystyle \underline d = {\underline K ^{ - 1}}\underline F $$ (2.13)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle \underline d = \left( {\begin{array}{ccccccccccccccc}  {8.375} \\   {5.625} \\   { - 4.875} \end{array}} \right) $$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * }

5) Derivation for $$\underline {\overline K } \underline d = \underline {\overline F } $$ where $$\left\{ {{{\underline w }_i},i = 1,2.....n} \right\}$$ is a line independent family of vectors. Consider $${w_i} = {a_i}$$$$\left\{ {{{\underline a }_i},i = 1,2,......n} \right\}$$ is an orthonormal basis.


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

$$  \displaystyle {\underline w _i}.\underline{\underline P} \left( {\underline v } \right) = 0 $$      (2.14)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }

Putting value of $$\underline{\underline{P}}\left( v \right)$$ from equation number (4).


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

$$  \displaystyle {\underline a _i}\sum\limits_{j = 1}^n  = {\underline a _i}.\underline v $$ (2.15)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle \sum\limits_{j = 1}^n {{{\underline a }_i}.{{\underline b }_j}{v_j}} = {\underline a _i}.\underline v $$ (2.16)
 * style="width:95%" |
 * style="width:95%" |
 * 
 * }


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

$$  \displaystyle {\left[ \right]_{n \times n}}{\left[  \right]_{n \times 1}} = {\left[  \right]_{n \times 1}} $$      (2.17)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle \underline {\overline K } \underline d = \underline {\overline F } $$      (2.18)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Where $$\underline{\overline{K}}$$ and $$\underline{\overline{F}}$$ are matrices having following elements.


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

$$  \displaystyle \underline {\overline K } = \left( {\begin{array}{ccccccccccccccc}  {{{\underline a }_1}.{{\underline b }_1}}&{{{\underline a }_1}.{{\underline b }_2}}&{{a_1}.{{\underline b }_3}} \\   {{{\underline a }_2}.{{\underline b }_1}}&{{{\underline a }_2}.\underline  }&{{a_2}.{{\underline b }_3}} \\   {{{\underline a }_3}.{{\underline b }_1}}&{{{\underline a }_3}.{{\underline b }_2}}&{{{\underline a }_3}.{{\underline b }_3}} \end{array}} \right) $$      (2.19)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle \overline {\underline F } = \left( {\begin{array}{ccccccccccccccc}  {{{\underline a }_1}.\underline v } \\   {{{\underline a }_2}.\underline v } \\   {{{\underline a }_3}.\underline v } \end{array}} \right) $$      (2.20)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle \underline {\overline K } = \left( {\begin{array}{ccccccccccccccc}  1&2&3 \\   1&{ - 1}&2 \\   1&3&6 \end{array}} \right) $$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * }


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


 * style="width:95%" |
 * style="width:95%" |

$$\overline{\underline{F}}=\left( \begin{matrix}  5  \\   -7  \\   -4  \\ \end{matrix} \right)$$


 * }
 * }

6) To find $$\underline d $$


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

$$  \displaystyle \underline d = {\underline {\overline K } ^{ - 1}}\underline {\overline F } $$      (2.21)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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


 * style="width:95%" |
 * style="width:95%" |

$${{\overline{\underline{K}}}^{-1}}=\left( \begin{matrix}  1.500 & 0.375 & -0.875  \\   0.500 & -0.375 & -0.125  \\   -0.500 & -0.125 & 0.375  \\ \end{matrix} \right)$$


 * }
 * }


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

$$  \displaystyle \underline d = \left( {\begin{array}{ccccccccccccccc}  {8.375} \\   {5.625} \\   { - 4.875} \end{array}} \right) $$
 * style="width:95%" |
 * style="width:95%" |
 * }
 * }

The value of $$\underline d$$ is same irrespective of method adopted to calculate it.

7) Pros & Cons of Bubnov-Galerkin method

Pros:-
 * The matrix $$\underline{K}$$ is a symmetric matrix.


 * Stiffness matrix is same with gram matrix so by this way we can observe linear independency of our basis vectors.

Cons:-
 * Calculations become more involved.

Pros & Cons of Petrov-Galerkin method

Pros:-
 * The matrix $$\underline{\overline{K}}$$ is not a symmetric matrix.


 * It is clearly seen that the tranpose of basis vectors is equal to Petrov-Galerkin stiffness matrix. $${{\left[ {{b}_{jk}} \right]}^{T}}=\underline{\overline{K}}$$ So it is easy to set up stiffness matrix in this method.

Cons:-


 * In additon to solution we have to construct gram matrix if are not sure about linear independency of our basis vectors.

Eml5526.s11.team2.sandhu

=Problem 2.3:=

Given
The equivalency validation was asked in meeting 8.3. as a second case where there are orthonormal vectors. First case as given:
 * {| style="width:100%" border="0"

$$  \displaystyle \begin{align} &\underline{w}=\sum\limits_{i} &\forall \left\{ {{\alpha }_{1}},......,{{\alpha }_{n}} \right\}\in {{R}^{n}} \end{align} $$      (3.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

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

$$ \displaystyle \begin{align} &\underline{w}=\sum\limits_{i} &\forall \left\{ {{\beta}_{1}},.....,{{\beta}_{n}} \right\}\in {{R}^{n}} \end{align} $$      (3.2)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Where $$ \displaystyle a_{i} $$'s are orthonormal basis functions.We can identify orthonormal basis functions as,


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

$$  \displaystyle {{\underline{a}}_{i}}.{{\underline{a}}_{j}}={{\delta }_{ij}} $$      (3.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle \delta_{ij} =\left\{ \begin{matrix} \begin{matrix} \begin{matrix} 1 & for \\ \end{matrix} & i=j \\ \end{matrix} \\ \begin{matrix} \begin{matrix} 0 & for \\ \end{matrix} & i\ne j \\ \end{matrix} \\ \end{matrix} \right.
 * style="width:95%" |
 * style="width:95%" |

$$      (3.4)
 * <p style="text-align:right">
 * }

The operator of $$\displaystyle \underline{\underline{P}}(\underline{v})$$ was defined as Eq(4) in meeting 7-2. This operator would lead us to conclude with stiffness matrix,unknown matrix and force matrix.
 * {| style="width:100%" border="0"

$$  \displaystyle \underline{\underline{P}}(\underline{v}):=\sum\limits_{j=1}^{n}{{{\underline{b}}_{j}}{{v}_{j}}-\underline{v}=0} $$      (3.5)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle {{\underline{b}}_{i}}.\underline{\underline{P}}(\underline{v})=0 $$      (3.6)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle {{\underline{b}}_{i}}.\sum\limits_{j}{{{\underline{b}}_{j}}{{v}_{j}}={{\underline{b}}_{i}}.\underline{v}} $$      (3.7)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle {{\left[ {{K}_{ij}} \right]}_{n*n}}{{\left\{ {{v}_{j}} \right\}}_{n*1}}={{\left\{ {{F}_{i}} \right\}}_{n*1}} $$      (3.8)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Find
Show $$ \displaystyle \underline{w}.\underline{\underline{P}}(\underline{v})=0$$ is equivalent to $$\displaystyle {{\underline{a}}_{i}}\underline{\underline{P}}(\underline{v})=0 $$

Solution
For i=1,..........n. We have n equations and n unknowns.Since the components of vector w are arbitrary we can decide what they are as our convenience in order to proof.

Choice 1 :$$ \displaystyle \beta _{1}=1,\beta _{2}=......=\beta _{n}=0$$ then we can observe ;


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

$$  \displaystyle \underline{w}={{\underline{a}}_{1}} $$      (3.9)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \left \{ \beta_{1},....,\beta_{n} \right \}=\left \{ \alpha _{1},......,\alpha _{n} \right \}\Rightarrow {{\underline{a}}_{1}} ={{\underline{b}}_{1}}
 * style="width:95%" |
 * style="width:95%" |

$$      (3.10)
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \underline{a}{}_{1}.\underline{\underline{P}}(\underline{v})=0 $$      (3.11) Choice 2 :$$ \displaystyle \left \{ \beta _{1} ,.......,\beta _{n}\right \}=\left \{ 0,1,0,......,0 \right \}$$ then ;
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle \underline{w}={{\underline{a}}_{2}} $$      (3.12)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \left \{ \beta_{1},....,\beta_{n} \right \}=\left \{ \alpha _{1},......,\alpha _{n} \right \}\Rightarrow {{\underline{a}}_{2}} ={{\underline{b}}_{2}}
 * style="width:95%" |
 * style="width:95%" |

$$      (3.13)
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle {{\underline{a}}_{2}}.\underline{\underline{P}}(\underline{v})=0 $$      (3.14)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle \begin{matrix} . \\   .  \\   .  \\ \end{matrix}
 * style="width:95%" |
 * style="width:95%" |

$$
 * }

Choice 3 : $$ \displaystyle \left \{ \beta _{1},....,\beta _{n} \right \}=\left \{ 0,.....0,1 \right \} $$


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

$$  \displaystyle \underline{w}={{\underline{a}}_{n}} $$      (3.15)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \left \{ \beta_{1},....,\beta_{n} \right \}=\left \{ \alpha _{1},......,\alpha _{n} \right \}\Rightarrow {{\underline{a}}_{n}} ={{\underline{b}}_{n}}
 * style="width:95%" |
 * style="width:95%" |

$$      (3.16)
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle {{\underline{a}}_{n}}.\underline{\underline{P}}(\underline{v})=0 $$      (3.17) So we can say that by selecting proper components for vector w we can conclude same equation which was given Eq(3.1).Actually Eq(3.1) is more  general casse than Eq(3.2). Also we can broaden combinations of components of vector w.For example;
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle \left \{ \beta _{1},....,\beta _{n} \right \}=\left \{ 1,1,1,0,...,0 \right \} $$      (3.18)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle {{\underline{w}}_{1}}={{\beta }_{1}}{{\underline{a}}_{1}}+{{\beta }_{2}}{{\underline{a}}_{2}}+{{\beta }_{3}}{{\underline{a}}_{3}}$$ (3.19)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle {{\underline{w}}_{1}}={{\underline{b}}_{1}} $$      (3.20)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle {{\underline{b}}_{1}}={{\beta }_{1}}{{\underline{a}}_{1}}+{{\beta }_{2}}{{\underline{a}}_{2}}+{{\beta }_{3}}{{\underline{a}}_{3}}$$ (3.21)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

This is 'nearly' the same vector for basis $$\displaystyle b_{n}$$. We can validate $$\displaystyle {{\underline{b}}_{n}}\underline{\underline{P}}(\underline{v})=0$$. But after knowing all basis vectors of vector w, then we have to check if their gram matrix is not equal to zero. Then we say that our new vectors are new arbitrary 'linerly independent' family.

Expressing vector b in terms of orthonormal vectors a is exactly same with the case presented in meeting 8-2.Because in this case we had validated that any linearly independent fuctions scalar product with $$\displaystyle \underline{\underline{P}}(\underline{v})$$ is equal zero. Therefore we can always express linearly independent basis 'vector b' with our orthonormal vectors.

Eml5526.s11.team2.oztekin (talk) 00:01, 2 February 2011 (UTC)

=Problem 2.4 General 1-D Model of Elastic Bar with Nonuniform Cross-Section and Simple BC's=

Background Information
We wish to solve the second order differential equation for elastic bar problem for the static case which was introduced in the Meeting 5-6 and further discussed in Meeting 9-2. The general case has the following form

Where the essential boundary conditions and the natural boundary conditions are



Systematic Approach
Step 1: Define a domain,

Step 2: Define the a function $$ a_2(x) $$ for the elasticity,

Step 3: Define the axially distributed force,

Step 4: Define the essential boundary conditions

Step 5: Define the necessary boundary conditions

Concise Formulation of Problem
Specifically we want to determine $$ u(x) $$ by solving to following second order differential equation subject to the boundary conditions defined in (4.0.4) and (4.0.5).

Problem Statement
Do the following problems which will aid in the determination of $$ \displaystyle u(x) $$

2.4.1) Show $$\int{ln(x) }dx = xln|x| - x $$

2.4.2) Show $$\int{x ln(x)}dx = \frac{1}{2}x^2\left[ln|x|-\frac{1}{2}\right]$$

2.4.3) Find $$\int{\frac{x^2}{1+cx}}dx$$

2.4.4) Find $$\int{\frac{x^2}{a+bx}}dx$$

2.4.5) Find the exact solution of $$ \displaystyle u(x) $$

2.4.6) Plot $$ \displaystyle u(x) $$

Solution to 2.4.1
Show $$\int{ln(x) }dx = xln(x) - x $$

Recall the general form for Integration By Parts

Let $$\displaystyle I_{1} $$ correspond to the integral shown above

Then using using integration by parts as shown in (4.1) we can let

Which provides us with the following integral

Where $$\displaystyle c_{1} $$ is the constant of integration and where the natural logarithm restricts $$ x $$ to only having positive values, i.e. $$ x \in \left(0,\infty\right) $$.

Solution to 2.4.2
Show $$\int{x ln(x)}dx = \frac{1}{2}x^2\left[ln(x)-\frac{1}{2}\right]$$

Let $$\displaystyle I_{2} $$ correspond to the integral shown above

Then using using integration by parts as shown in (4.1) we can let

Which provides us with the following integral

Where $$\displaystyle c_{2} $$ is the constant of integration and where the natural logarithm restricts $$ x $$ to only having positive values, i.e. $$ x \in \left(0,\infty\right) $$.

Solution to 2.4.3
Find $$\int{\frac{x^2}{1+cx}}dx$$

Method 1: Polynomial Division(Preferred Approach)
Let $$\displaystyle I_{3} $$ correspond to the integral shown above Given a polynomial P(x) where the numerator N(x), denominator D(x), quotient Q(x), and remainder R(x) such that P(x) has degree(D(x)) < degree(N(x)), then P(x) can be written as

This means that the integrand of (4.7) can be simplified using long division

The polynomial in the integrand can therefore be written as

Now the integration becomes trivial since it can be written as a sum of three easily evaluated integrals

Integrating (4.14) results in the following

Where $$\displaystyle c_{3} $$ is the constant of integration and where the natural logarithm restricts $$ x $$ to only having values greater than $$ \frac{-1}{c} $$, i.e. $$ x \in \left(\frac{-1}{c},\infty\right) $$.

Method 2: Integration By Parts (Doing it the Hard Way)
The next method uses integration by parts and is presented here because we were asked to complete this problem using this method. It should be noted that Method 1, rewriting the integrand in a simpler for by using long division is preferred over integration by parts. Integration by parts as shown in (4.1) we can let

Which provides us with the following integral

Integrating by parts again and letting

Here the integration of $$ dv $$ to get $$ v $$ was carried using (4.5). Integrating by parts using (4.18) gives

Distributing the terms and rewriting as sum of integrals and defining them as $$ {\color{blue}I_{a}} $$, $$ {\color{red}I_{b}} $$, $$ {\color{cyan}I_{c}} $$ and $$ {\color{magenta}I_{d}} $$

Evaluate each of the integrals $$ {\color{blue}I_{a}} $$, $$ {\color{red}I_{b}} $$, $$ {\color{cyan}I_{c}} $$ and $${\color{magenta}I_{d}} $$ one at a time.

$$ \displaystyle \begin{align} {\color{blue}I_a}   & = {\color{blue}2\int{\frac{x^2}{c}ln|1+cx|}\ dx} && = \frac{2x^3}{3c}\ln|1+cx|+\frac{2}{3c^4}\ln|1+cx|-\frac{2x^3}{9c}+\frac{x^2}{3c^2} -\frac{2x}{3c^3}\\ {\color{red}I_b}    & = {\color{red}-2\int{\frac{1}{c^3}ln|1+cx|}\ dx} && = -\frac{2x}{c^3}ln|1+cx| - \frac{2}{c^4}ln|1+cx| + \frac{2x}{c^3} \\ {\color{cyan}I_c}   & = {\color{cyan}\int{\frac{x^2}{c}}\ dx}          && = \frac{x^3}{3c} \\ {\color{magenta}I_d} & = {\color{magenta}2\int{\frac{x}{c^2}}\ dx}     && = \frac{x^2}{c^2} \end{align} $$

Making the appropriate substitutions gives

Combining like terms and canceling several results in the final solution of

Where $$\displaystyle c_{3} $$ is the constant of integration and where the natural logarithm restricts $$ x $$ to only having values greater than $$ \frac{-1}{c} $$, i.e. $$ x \in \left(\frac{-1}{c},\infty\right) $$.

Solution to 2.4.4
Find $$\int{\frac{x^2}{a+bx}}dx$$

Method 1: Polynomial Division(Preferred Approach)
Let $$\displaystyle I_{4} $$ correspond to the integral shown above Given a polynomial P(x) where the numerator N(x), denominator D(x), quotient Q(x), and remainder R(x) such that P(x) has degree(D(x)) < degree(N(x)), then P(x) can be written as

This means that the integrand of (4.23) can be simplified using long division

The polynomial in the integrand can therefore be written as

Now the integration becomes trivial since it can be written as a sum of three easily evaluated integrals

Integrating (4.27) results in the following

Where $$\displaystyle c_{4} $$ is the constant of integration and where the natural logarithm restricts $$ x $$ to only having values greater than $$ \frac{-a}{b} $$, i.e. $$ x \in \left(\frac{-a}{b},\infty\right) $$.

Method 2: Integration By Parts (Doing it the Hard Way)
The next method uses integration by parts and is presented here because we were asked to complete this problem using this method. It should be noted that Method 1, rewriting the integrand in a simpler for by using long division is preferred over integration by parts. Integration by parts as shown in (4.1) we can let

Which provides us with the following integral

Integrating by parts again and letting

Here the integration of $$ dv $$ to get $$ v $$ was carried out using (4.5). Integrating by parts using (4.30) gives

Distributing the terms and rewriting as sum of integrals and defining them as $$ {\color{blue}I_{a}} $$, $$ {\color{red}I_{b}} $$ and $$ {\color{cyan}I_{c}} $$

Evaluate each of the integrals $$ {\color{blue}I_{a}} $$, $$ {\color{red}I_{b}} $$ and $$ {\color{cyan}I_{c}} $$ one at a time.

$$ \displaystyle \begin{align} {\color{blue}I_a} & = {\color{blue}\frac{2}{b}\int{xln|a+bx|}dx}   && = \frac{x^2}{b}\ln|a+bx|-\frac{a^2}{b^3}\ln|a+bx|-\frac{x^2}{2b}+\frac{ax}{b^2} \\ {\color{red}I_b}  & = {\color{red}\frac{2a}{b^2}\int{ln|a+bx|}dx}  && = \frac{2ax}{b^2}ln|1+cx|+\frac{2a^2}{b^3}ln|a+bx| - \frac{2ax}{b^2} \\ {\color{cyan}I_c} & = {\color{cyan}\frac{2}{b}\int{x}dx}           && = -\frac{x^2}{b} \end{align} $$

Making the appropriate substitutions gives

Combining like terms and canceling several results in the final solution of

Where $$\displaystyle c_{4} $$ is the constant of integration and where the natural logarithm restricts $$ x $$ to only having values greater than $$ \frac{-a}{b} $$, i.e. $$ x \in \left(\frac{-a}{b},\infty\right) $$.

Remarks
It is clear that it is sufficient to only solve problem 2.4.4 since 2.4.3 is a special case of 2.4.4. This can be seen by letting

This implies that

Because the problem was posed as needing to evaluate four integrals in class, it was therefore rigorously done so here.

Solution to 2.4.5
Find the exact solution of $$ \displaystyle u(x) $$

As presented in (4.0.6) we will solve the following ODE

Rearranging the ODE provided in (4.0.6) and integrating once gives

Next we must satisfy the essential boundary conditions

Therefore the first order separable ODE has the form

To solve for $$ u(x) $$ in (4.40) we must evaluate the following integral

Recall from (4.24) that a polynomial P(x) with a numerator N(x), denominator D(x), quotient Q(x), and remainder R(x) such that P(x) has degree(D(x)) < degree(N(x)), then P(x) can be written as

Next we will use the preferred method previously shown in problem (2.4.3) and (2.4.4) which involves long division.

The polynomial in the integrand can therefore be written as

Now the integration becomes trivial since it can be written as a sum of three easily evaluated integrals

Then if we integrate using u-substitution for the first integral in (4.44) by letting We get the following result

To determine the $$ c_{5} $$, we must apply the necessary boundary conditions to the result obtained in (4.47)

Solving for $$ c_{5} $$ gives the following algebraic expression

Now $$ c_{5} $$ in (4.49) can be substituted into (4.47) where $$ u(x) $$ can explicitly be expressed as

As with the previous problems involving an integration resulting in a logarithmic solution we must restrict $$ x $$ to only having values greater than $$ -\frac{2}{3} $$, i.e. $$ x \in \left(-\frac{2}{3},\infty\right) $$.

Solution to 2.4.6
Plot $$ \displaystyle u(x) $$

Matlab code:
 * {| style="width:100%" border="0" align="left"


 * style="width:30%; padding:10px; border:1px solid #888888" align="center" |
 * style="width:30%; padding:10px; border:1px solid #888888" align="center" |
 * }
 * }
 * }

=Problem 2.5: "Proof of Equivalent Equations"=

Problem Statement:
Complete part B of proof of equation

Such that:

Proof:
Equation 2 from Lecture 7-2 states that:

Choice 1: $$\displaystyle \alpha_1=1$$
Therefore:

Choice 2: $$\displaystyle \alpha_2=1$$
Therefore:

Choice n: $$\displaystyle \alpha_n=1$$
Therefore:

Identity
Multiplying equation 5.9 through by $$\alpha_n$$:

Repeating for $$\alpha_1$$ and $$\alpha_2$$, etc and adding their respective equations:

Since equation 5.2 states that $$\underline w$$ is the sum of the product of $$\alpha _i$$ and $$\underline b _i$$, the following is proven:

=Problem 2.6: Determination of orthogonal functions=

Given
Problem was stated in meeting 10-2. . Consider the family of functions on the interval [0,T], where T=$$2\Pi/\omega$$

Find
A) Construct $$\Gamma (\Im )$$ and observe its properties B) Find $$\det [\Gamma (\Im )]$$ C) Is $$\Im$$ an orthogonal basis

Solution to 2.6.1
Construct $$\Gamma (\Im )$$:

where

In order to construct the matrix we must first define $$ < {b_i}, {b_j} > $$

Because multiplication of continuous functions is communicative it can be shown from equation 4.3 that

And therefore $$\Gamma (\Im )$$ is a symmetric matrix

We must now evaluate the terms of the matrix All values were checked with Wolframalpha The Gram matrix then becomes

As we can see the Gram matrix based constructed from this set of functions is a diagonal matrix

Solution to 2.6.2
Finding $$\det [\Gamma (\Im )]$$

The determinant of a diagonal matrix is Where Based on equation 4.6

Solution to 2.6.3
Comment

For the set to be an orthogonal basis it must satisfy the kronecker delta: with the exception that if $$i=j$$ the value can be $$\Re$$ except 0. Therefore the Gram matrix must be a diagonal matrix with a non-zero determinant. As we can see from equations 4.5 and 4.7 the kronecker delta criteria is satisfied. Thus the set of functions is an orthogonal basis.

=Problem 2.7:Determining orthogonality of family of functions=

Given
Problem was stated in meeting 10-3. . Our family of equations are :


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

$$  \displaystyle F=\left \{ 1,x,x^{2},x^{3},x^{4} \right \} $$     (7.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Test of linear independency of family of equations can be done by setting up 'Gram Matrix'.Gram Matrix If the linear independency exists between functions of the family their gram matrix's determinant must be non-zero.


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

$$  \displaystyle \mathbf{\Gamma } \left ( b_{1}(x),.....,b_{n}(x) \right )=\left [< b_{i},b_{j} >\right ]_{n\times n} $$ (7.2)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle \mathbf{\Gamma_{ij}}=<b_{i},b_{j}>=\int_{\Omega }b_{i}(x)b_{j}(x)dx $$     (7.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

We can identify our basis functions as :


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

$$  \displaystyle b_{1}(x)=1 $$     (7.4)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle b_{2}(x)=x $$     (7.5)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle b_{3}(x)=x^{2} $$     (7.6)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle b_{4}(x)=x^{3} $$     (7.7)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle b_{5}(x)=x^{4} $$     (7.8)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Find
Find if the family of these basis functions are orthogonal over the domain $$\displaystyle\Omega =\left [ 0,1 \right ] $$

Solution
First we have to set up our gram matrix.


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

$$  \displaystyle \mathbf{\Gamma } =\begin{bmatrix} b_{11} & b_{12} & b_{13} & b_{14} &b_{15} \\ b_{21} & b_{22} & b_{23} & b_{24} &b_{25} \\ b_{31} & b_{32} & b_{33} & b_{34} &b_{35} \\ b_{41} &b_{42} & b_{43} & b_{44} &b_{45} \\ b_{51} &b_{52} & b_{53} &b_{54}  & b_{55} \end{bmatrix} $$     (7.9)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Now we can look at the components of this matrix. Since 'scalar product' is symmetric the components which are symmetric about the diagonal of this matrix will be same each other.


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

$$  \displaystyle b_{11}=<b_{1},b_{1}>=\int_{0}^{1}1.1dx=1 $$     (7.10)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle b_{22}=<b_{2},b_{2}>=\int_{0}^{1}x.xdx=\frac{1}{3} $$     (7.11)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle b_{33}=<b_{3},b_{3}>=\int_{0}^{1}x^{2}x^{2}dx=\frac{1}{5} $$     (7.12)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle b_{44}=<b_{4},b_{4}>=\int_{0}^{1}x^{3}x^{3}dx=\frac{1}{7} $$     (7.13)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle b_{55}=<b_{5},b_{5}>=\int_{0}^{1}x^{4}x^{4}dx=\frac{1}{9} $$     (7.14)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle b_{12}=b_{21}=<b_{1},b_{2}>=\int_{0}^{1}xdx=\frac{1}{2} $$     (7.15)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle b_{13}=b_{31}=<b_{1},b_{3}>=\int_{0}^{1}x^{2}dx=\frac{1}{3} $$     (7.16)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle b_{14}=b_{41}=<b_{1},b_{4}>=\int_{0}^{1}x^{3}dx=\frac{1}{4} $$     (7.17)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle b_{15}=b_{51}=<b_{1},b_{5}>=\int_{0}^{1}x^{4}dx=\frac{1}{5} $$     (7.18)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle b_{23}=b_{32}=<b_{2},b_{3}>=\int_{0}^{1}x.x^{2}dx=\frac{1}{4} $$     (7.19)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle b_{24}=b_{42}=<b_{2},b_{4}>=\int_{0}^{1}x.x^{3}dx=\frac{1}{5} $$     (7.20)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle b_{34}=b_{43}=<b_{3},b_{4}>=\int_{0}^{1}x^{2}.x^{3}dx=\frac{1}{6} $$     (7.21)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle b_{54}=b_{45}=<b_{3},b_{4}>=\int_{0}^{1}x^{3}.x^{4}dx=\frac{1}{8} $$     (7.22)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle b_{52}=b_{25}=<b_{2},b_{5}>=\int_{0}^{1}x.x^{4}dx=\frac{1}{6} $$     (7.23)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle b_{53}=b_{35}=<b_{3},b_{5}>=\int_{0}^{1}x^{2}.x^{4}dx=\frac{1}{7} $$     (7.24)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

We can conlude with :


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

$$  \displaystyle \mathbf{\Gamma }=\begin{bmatrix} 1 & \frac{1}{2} & \frac{1}{3} &\frac{1}{4} &\frac{1}{5} \\ \frac{1}{2}& \frac{1}{3} & \frac{1}{4} &\frac{1}{5} &\frac{1}{6} \\ \frac{1}{3} & \frac{1}{4} & \frac{1}{5} & \frac{1}{6} &\frac{1}{7} \\ \frac{1}{4}& \frac{1}{5} & \frac{1}{6} & \frac{1}{7} & \frac{1}{8}\\ \frac{1}{5} & \frac{1}{6}&\frac{1}{7}  & \frac{1}{8} & \frac{1}{9} \end{bmatrix} $$     (7.25)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

We can easily take the determinant of gram matrix by using a solver. Matlab Mathworks gives the solution of determinant as :$$\displaystyle 3.7493e(-12)$$ The gram matrix is 'symmetric' so its transpose will be same with itself but for orthogonality matrix transpose has to be same as its inverse.The inverse of gram matrix can easly get from matlab as:


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

$$  \displaystyle \mathbf{\Gamma ^{-1}}= 1.0e0.005\times \left[ \begin{matrix} \begin{matrix} \begin{matrix} \begin{matrix} 0.0002 \\   -0.003  \\ \end{matrix}  \\ 0.0105 \\   -0.014  \\   0.0063  \\ \end{matrix} & \begin{matrix} \begin{matrix} -0.003 \\   0.0480  \\ \end{matrix}  \\ -0.189 \\   0.2688  \\   -0.126  \\ \end{matrix}  \\ \end{matrix} & \begin{matrix} \begin{matrix} 0.0105 \\   -0.189  \\ \end{matrix}  \\ 0.7938 \\   -1.176  \\   0.5670  \\ \end{matrix} & \begin{matrix} \begin{matrix} -0.014 \\   0.2688  \\ \end{matrix}  \\ -1.176 \\   1.792  \\   -0.882  \\ \end{matrix} & \begin{matrix} \begin{matrix} 0.0063 \\   -0.126  \\ \end{matrix}  \\ 0.5670 \\   -0.8820  \\   0.4410  \\ \end{matrix}  \\ \end{matrix} \right]
 * style="width:95%" |
 * style="width:95%" |

$$     (7.26)
 * <p style="text-align:right">
 * }

The inverse of the matrix is not similar with its transpose. So it is not orthogonal. Eml5526.s11.team2.oztekin (talk) 00:01, 2 February 2011 (UTC)

=Problem 2.8: =

Given
Equations provided below can be found in Eqn (1) & (2) mtg. 10-4

Find
Show that 2.8.1 and 2.8.2 are equivalent.

Ensure that $$\displaystyle {u^h}(x) $$ satisfies the essential and natural boundary conditions.

where 2.8.4 is the essential boundary condition and 2.8.5 is the natural boundary condition

Solution
Begin by demonstrating that (8.2.1) is equivalent to (8.2.2). Assume the following finite approximation for the weighting function $$\displaystyle {w^h}(x) $$ which can be found in   Eqn (1) mtg. 10-3

Substituting (2.8.6) into (2.8.1) leads to the following expression

Expanding the right hand side of the summation found in (2.8.7) leads to the following form

(2.8.8) can be represented as a sum of integrals on $$\displaystyle \Omega $$

Next unexpand the summation of integrals in (2.8.9) and group the coefficients of $$\displaystyle \sum\limits_{i = 1}^n $$

Enforcing the elimination of the trivial solution requires that $$\displaystyle c_i \ne 0 $$. This leads to the following which satisfies (2.8.2).

Recall the requirement for the weighting function to be zero, which is as follows

Making use of the Bubnov-Galerkin Method we can construct a trial solution $$\displaystyle u^h(x) $$ of the form

Taking into account (2.8.13) and the requirement that the weighting function satisfy $$\displaystyle w^h(x=1) = 0 $$ (2.8.13) reduces

Thereby satisfying (2.8.4) which is the requirement of the essential boundary condition.

Continue by demonstrating that (8.2.2) is equivalent to (8.2.1).

Multiple (8.2.2) by $$\displaystyle \sum\limits_{i = 1}^n $$ which provides the following

Reorganize (8.2.13) as follows

Per (2.8.6) substitute (2.8.16 ) into (2.8.15) which results in the following

Expand (2.8.17) to a difference of integrals $$\displaystyle \int_{\Omega} $$

Using (2.8.8) and (2.8.21) $$\displaystyle g(x) $$ can also be represented by

Substituting (2.8.19) into (2.8.18) provides the following

Assume the following finite approximation for the trial solution $$\displaystyle {w^h}(x) $$ which can be found in   Eqn (2) mtg. 10-3

Which modifies (2.8.19) into the following

substituting (2.8.6) into (2.8.22) satifies the proof.

The $$ \displaystyle P({u^h}(x)) $$ term captures the Natural Boundary Condition.

=Problem 2.9=

Given

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

$$  \displaystyle 2\frac{d^2u}{dx^2}+3=0 $$     (9.1)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle u(x=1)=0 $$     (9.2)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle -\frac{du}{dx}(x=0)=4 $$     (9.3)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle cos\left(jx+\frac{\pi}{4}\right) \qquad j=0,1,...,n $$     (9.4)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

Find
Consider the second-order differential equation above numbered (9.1). Using a Discrete Weighted Residual Form of equation (9.1), solve for a $$u(x)$$ bounded by conditions prescribed in equations (9.2) and (9.3). To approximate the weighting function and the function $$u(x),$$ use the given set of equations in (9.4). Then compare the approximated $$u^h(x)$$ with the exact $$u(x).$$

1) First solve for $$u^h(x)$$ for $$n=2$$ 2) Then solve for $$u^h(x)$$ for $$n=4$$ 3) Finally solve for $$u^h(x)$$ for $$n=6$$

n=2 Case

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

$$  \displaystyle b_0=cos\left(\frac{\pi}{4}\right) $$     (9.5)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle b_1=cos\left(x+\frac{\pi}{4}\right) $$     (9.6)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle b_2=cos\left(2x+\frac{\pi}{4}\right) $$     (9.7) Equations (9.5), (9.6) and (9.7) are the functions we are going to use to approximate $$u(x)$$ for the case $$n=2$$. These functions are known as basis functions and represented by $$b_j(x).$$We use the following general expansion for the approximation for $$u(x)$$.
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle u(x)\backsimeq u^h(x)=\sum_{j=0}^2 d_jb_j(x) $$     (9.8) Introducing the differential operator
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle P=2\frac{d^2}{dx^2}+3, $$ we can restate equation (9.1) in the following form.
 * style="width:95%" |
 * style="width:95%" |
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle P\left(u^h(x)\right)=0 $$     (9.9) Plugging equations (9.5) through (9.7) into (9.8) gives:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle u^h(x)=\frac{\sqrt{2}}{2}d_0+cos\left(x+\frac{\pi}{4}\right)d_1+cos\left(2x+\frac{\pi}{4}\right)d_2 $$     (9.10) We require $$u^h(x)$$, equation (9.10) to satisfy both boundary conditions in equations (9.2) and (9.3).
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 0.70711d_0-0.21296d_1-0.93723d_2=0 $$ ref1 ref2 ref3 (9.11)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{du^h}{dx}=-sin\left(x+\frac{\pi}{4}\right)d_1-2sin\left(2x+\frac{\pi}{4}\right)d_2 $$     (9.12)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle 0.70711d_1+\sqrt{2}d_2=4 $$ ref1 ref2 (9.13) Now we have 2 equations and 3 unknowns. We need one more equation which is linearly independent of equations (9.10) and (9.11) to solve for the coefficients $$d_j$$. The $$3^{rd}$$ relation is found taking the inner product between the basis functions and equation (9.9). The inner product is defined as
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \left \langle b_k(x), P\Big(u^h(x)\Big)\right \rangle=\int_{\Omega}b_k(x)P\Big(u^h(x)\Big)\,dx\,=0 $$     (9.14) Let $$k$$ go from 0 to 2 and plug equation (9.10) into (9.9), then (9.9) into (9.14) give the follow definite integral.
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \int_0^1b_0(x)\left[2\frac{d^2}{dx^2}\Big(u^h(x)\Big)+3\right]\,dx\,=0 $$     (9.15)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle \int_0^1\frac{\sqrt(2)}{2}\left[-2\Big(cos(x+\frac{\pi}{4})d_1+4cos(2x+\frac{\pi}{4})d_2\Big)+3\right]\,dx\,=0 $$     (9.16)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle -\sqrt{2}\left[\int_0^1cos(x+\frac{\pi}{4})\,dx\,d_1+4\int_0^1cos(2x+\frac{\pi}{4})\,dx\,d_2\right]-\frac{3\sqrt{2}}{2}\int_0^1\,dx\,=0 $$     (9.17) Integrated and rounded values using wolframalpha. I integrated and evaluated each term separately and each link is labeled below with the appropriate term number, i.e. the first term is ref1.
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle -\sqrt{2}\left[\frac{cos(1)+sin(1)-1}{\sqrt{2}}d_1+\Big(2sin(2+\frac{\pi}{4})-\sqrt{2}\Big)d_2\right]-\frac{3\sqrt{2}}{2}=0 $$ ref1 ref2 (9.18)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle 0.38177d_1-1.0137d_2=\frac{3\sqrt{2}}{2} $$ ref1 ref2 (9.19) We now have 3 equations and 3 unknowns. We can form a matrix equation to solve for the unknown $$d_j's$$.
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \begin{bmatrix} 0.70711 & -0.21296 & -0.93723\\ 0 & 0.70711 & 1.4142\\ 0 & 0.38177 & -1.0137\\ \end{bmatrix} \begin{bmatrix} d_0\\ d_1\\ d_2\\ \end{bmatrix}=\begin{bmatrix} 0\\ 4\\ \frac{3\sqrt{2}}{2}\\ \end{bmatrix}
 * style="width:95%" |
 * style="width:95%" |

$$     (9.20) We see by inspection our basis set is not orthogonal due to the lack of symmetry seen in the Matrix in equation (9.20) Plugging the value into MATLAB and solving for our knowns we arrive at the following solution.
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \begin{bmatrix}d_0\\ d_1\\ d_2\\ \end{bmatrix}= \begin{bmatrix}0\\ 3.6383\\3.5064 \\ \end{bmatrix} $$     (9.21) Now we may construct equation (9.10) with our known coefficients.
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle u^h(x)=3.6383cos\left(x+\frac{\pi}{4}\right)+3.5064cos\left(2x+\frac{\pi}{4}\right) $$     (9.22) Now let's solve equation (9.1) analytically to obtain an exact solution.
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{d^2u}{dx^2} = \frac{-3}{2} $$     (9.23)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle u(x)=\frac{-3}{2}x^2+C_1x+C_2 $$     (9.24) Apply the boundary conditions in equations (9.2) and (9.3).
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle u(x=1)=\frac{-3}{2}+C_1+C_2 $$     (9.25)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle C_2=\frac{3}{2}-C_1 $$     (9.26)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle u(x)=\frac{-3}{2}x^2+C_1(x-1)+\frac{3}{2} $$     (9.27)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{du}{dx}(x=0)\Rightarrow C_1=-4 $$     (9.28)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle u(x)=\frac{-3}{2}x^2-4x+\frac{11}{2} $$     (9.29) We can now plot the approximate solution against the exact solutions and see if we have similarity between the 2 plots.
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

Now let's calculate $$u_2^h(x=0.5)$$
 * {| style="width:100%" border="0"

$$  \displaystyle u_2^h(x=0.5)=0.2776 $$     (9.30) While the exact solution is:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle u(x=0.5)=3.1250 $$     (9.31) This gives us an error of:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle e_2(0.5) =3.1250-0.2776\approx 2.85 $$     (9.32) This is horrible. Let's see if it gets any better with increasing n.
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

n=4 Case

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

$$  \displaystyle b_3=cos\Big(3x+\frac{\pi}{4}\Big) $$     (9.33)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle b_4=cos\Big(4x+\frac{\pi}{4}\Big) $$     (9.34) And now equation (9.10) becomes:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle u^h(x)=\frac{\sqrt{2}}{2}d_0+cos\left(x+\frac{\pi}{4}\right)d_1+cos\left(2x+\frac{\pi}{4}\right)d_2+cos\left(3x+\frac{\pi}{4}\right)d_3+cos\left(4x+\frac{\pi}{4}\right)d_4 $$     (9.35) Requiring equation (9.35) to satisfy the given boundary conditions in equations (9.2) and (9.3).
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle u^h(x=1)=\frac{\sqrt{2}}{2}d_0+cos\left(1+\frac{\pi}{4}\right)d_1+cos\left(2+\frac{\pi}{4}\right)d_2+cos\left(3+\frac{\pi}{4}\right)d_3+cos\left(4+\frac{\pi}{4}\right)d_4=0 $$     (9.36) Approximating the values using Wolframalpha:
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 0.70711d_0-0.21296d_1-0.93723d_2-0.77982d_3+0.072944d_4=0 $$ref3 ref4 (9.37)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{-du^h}{dx}(x=0)= 0.70711d_1+\sqrt{2}d_2+2.1213d_3+2.8284d_4 $$ref3 ref4 (9.38)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle 0.70711d_1+\sqrt{2}d_2+2.1213d_3+2.8284d_4=4 $$     (9.39) Again, following the same procedure as we did before in equation (9.14), i.e. taking the inner product of our approximated function with our basis functions we get the following expression.
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \int_0^1\frac{\sqrt{2}}{2}\Bigg[2\Big(\frac{d^2}{dx^2}cos(\frac{\pi}{4})d_0+\frac{d^2}{dx^2}cos(x+\frac{\pi}{4})d_1+\frac{d^2}{dx^2}cos(2x+\frac{\pi}{4})d_2+\frac{d^2}{dx^2}cos(3x+\frac{\pi}{4})d_3+\frac{d^2}{dx^2}cos(4x+\frac{\pi}{4})d_4\Big)+3\Bigg]\,dx\,=0 $$     (9.40)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle -\sqrt{2}\left[\int_0^1\Big(cos(x+\frac{\pi}{4})\,dx\,d_1+4\int_0^1cos(2x+\frac{\pi}{4})\,dx\,d_2+9\int_0^1cos(3x+\frac{\pi}{4})\,dx\,d_3+16\int_0^1cos(4x+\frac{\pi}{4})\,dx\,d_4\Big)\right]-\frac{3\sqrt{2}}{2}\int_0^1\,dx\,=0 $$ ref3 ref4 (9.41)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle -\sqrt{2}\left[\frac{cos(1)+sin(1)-1}{\sqrt{2}}d_1+\Big(2sin(2+\frac{\pi}{4})-\sqrt{2}\Big)d_2\right]-\frac{3}{\sqrt{2}}\left[2sin(3+\frac{\pi}{4})-\sqrt{2}\right]d_3- \left[4\sqrt{2}sin(4+\frac{\pi}{4})+4\right]d_4-\frac{3\sqrt{2}}{2}=0 $$ref3 ref4 (9.42)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle 0.38177d_1-1.0137d_2-5.5466d_3-1.6418d_4 =\frac{3\sqrt{2}}{2} $$ ref3 ref4 (9.43) Again, we have 3 equations, but 5 unknowns. Therefore we need to take the inner product again with $$b_1$$ and $$b_2.$$
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{0}^{1}b_{1}(x)P(u^{h}(x))dx=0 $$     (9.44)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle -\sqrt{2}\left[\int_0^1\Big(cos^2(x+\frac{\pi}{4})\Big)\,dx\,d_1+4\int_0^1cos(x+\frac{\pi}{4})cos(2x+\frac{\pi}{4})\,dx\,d_2+9\int_0^1cos(x+\frac{\pi}{4})cos(3x+\frac{\pi}{4})\,dx\,d_3+16\int_0^1cos(x+\frac{\pi}{4})cos(4x+\frac{\pi}{4})\,dx\,d_4\Big)\right]-\frac{3\sqrt{2}}{2}\int_0^1cos(x+\frac{\pi}{4})\,dx\,=0 $$     (9.45)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 0.2064d_1+0.50386d_2+0.26244d_3-1.0887d_4=0.57265 $$ ref1 ref2 ref3 ref4 ref5 (9.46)
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{0}^{1}b_{2}(x)P(u^{h}(x))dx=0 $$     (9.47)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 0.12596d_1+1.6591d_2+4.4422d_3+5.0687d_4=0.38014 $$ref1 ref2 ref3 ref4 ref5 (9.48) Now we have 5 equations along with 5 unknowns. We can organize as before into a Matrix equation and then solve for our unknowns.
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \begin{bmatrix} 0.70711 & -0.21296 & -0.93723 & 0.77982 & 0.072944\\ 0 & 0.70711 & \sqrt{2} & 2.1213 & 2.8284\\ 0 & 0.38177 & -1.0137 & -5.5466 & -1.6418\\ 0 & 0.2064 & 0.50386 & 0.26244 & -1.0887\\ 0 & 0.12596 & 1.6591 & 4.4422 & 5.0687\\ \end{bmatrix} \begin{bmatrix} d_0\\ d_1\\ d_2\\ d_3\\ d_4\\ \end{bmatrix}= \begin{bmatrix} 0\\ 4\\ 3\frac{\sqrt{2}}{2}\\ 0.57265\\ 0.38014\\ \end{bmatrix} $$     (9.49) Now, plugging this equation into MATLAB we solved for the following unknown coefficients.
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \begin{bmatrix} d_0\\ d_1\\ d_2\\ d_3\\ d_4\\ \end{bmatrix}= \begin{bmatrix} 0\\ 3.8044\\ 4.4257\\ -1.4420\\ 9.1342\\ \end{bmatrix} $$     (9.50) We can now expression $$u^h(x)$$ up to five terms.
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle u^h(x)=3.8044cos\left(x+\frac{\pi}{4}\right)+4.4257cos\left(2x+\frac{\pi}{4}\right)-1.4420cos\left(3x+\frac{\pi}{4}\right)+9.1342cos\left(4x+\frac{\pi}{4}\right) $$     (9.51) Now let's calculate $$u_4^h(x)$$ at $$x=0.5$$
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle u_4^h(x=0.5)=-7.4873 $$     (9.52) Again, we can calculate the error from our exact solution to see if our answer improved at all.
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle e_4(0.5) =3.1250+7.4873\approx 10.61 $$     (9.53) Here we conclude that there must have been something that went wrong during the problem and the error propagated through the calculations, which allowed the error to increase, with the increased number of calculations. Below, we set the problem up general without solving for the exact coefficient values.
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * <p style="text-align:right">
 * }

n=4

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

$$  \displaystyle u^{h}(x)=d_{o}cos\Phi +d_{1}cos(x+\Phi )+d_{2}cos(2x+\Phi )+d_{3}cos(3x+\Phi )+d_{4}cos(4x+\Phi ) $$     (9.54)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 0=d_{o}cos\Phi +d_{1}cos(1+\Phi )+d_{2}cos(2+\Phi )+d_{3}cos(3+\Phi )+d_{4}cos(4+\Phi ) $$     (9.55)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{du^{h}}{dx}=-4 $$     (9.56)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 4=d_{1}sin\Phi +2d_{2}sin\Phi +3d_{3}sin\Phi +4d_{4}sin\Phi $$     (9.57)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }


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

$$  \displaystyle P(u)=\frac{d}{dx}\left [ 2\frac{d}{dx}\left ( d_{0}cos\Phi +d_{1}cos(x+\Phi )+d_{2}cos(2x+\Phi )+d_{3}cos(3x+\Phi )+d_{4}cos(4x+\Phi ) \right ) \right ]+3 $$     (9.58)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle =-2d_{1}cos(x+\Phi )-8d_{2}cos(2x+\Phi )-18d_{3}cos(3x+\Phi )-32d_{4}cos(4x+\Phi ) $$     (9.59)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{0}^{1}b_{0}(x)P(u^{h}(x))dx=0 $$     (9.60)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{0}^{1}cos\Phi \left [ -2d_{1}cos(x+\Phi )-8d_{2}cos(2x+\Phi )-18d_{3} cos(3x+10)-32d_{4}cos(4x+\Phi )\right ]dx=0 $$     (9.61)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{0}^{1}b_{1}(x)P(u^{h}(x))dx=0 $$     (9.62)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{0}^{1}cos(x+\Phi ) \left [ -2d_{1}cos(x+\Phi )-8d_{2}cos(2x+\Phi )-18d_{3} cos(3x+10)-32d_{4}cos(4x+\Phi )\right ]dx=0 $$     (9.63)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{0}^{1}b_{2}(x)P(u^{h}(x))dx=0 $$     (9.64)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{0}^{1}cos(2x+\Phi ) \left [ -2d_{1}cos(x+\Phi )-8d_{2}cos(2x+\Phi )-18d_{3} cos(3x+10)-32d_{4}cos(4x+\Phi )\right ]dx=0 $$     (9.65)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

n=6

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

$$  \displaystyle u^{h}(x)=d_{o}cos\Phi +d_{1}cos(x+\Phi )+d_{2}cos(2x+\Phi )+d_{3}cos(3x+\Phi )+d_{4}cos(4x+\Phi )+d_{5}cos(5x+\Phi )+d_{6}cos(6x+\Phi ) $$     (9.66)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 0=d_{0}cos\Phi +d_{1}cos(1+\Phi )+d_{2}cos(2+\Phi )+d_{3}cos(3+\Phi )+d_{4}cos(4+\Phi )+d_{5}cos(5+\Phi )+d_{6}cos(6+\Phi ) $$     (9.67)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \frac{du^{h}}{dx}=-4 $$     (9.68)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle 4=d_{1}sin\Phi +2d_{2}sin\Phi +3d_{3}sin\Phi +4d_{4}sin\Phi +5d_{5}sin\Phi +6d_{6}sin\Phi $$     (9.69)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle P(u)=\frac{d}{dx}\left [ 2\frac{d}{dx}\left ( d_{0}cos\Phi +d_{1}cos(x+\Phi )+d_{2}cos(2x+\Phi )+d_{3}cos(3x+\Phi )+d_{4}cos(4x+\Phi )+d_{5}cos(5x+\Phi ) +d_{6}cos(6x+\Phi )\right ) \right ]+3 $$     (9.70)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle =-2d_{1}cos(x+\Phi )-8d_{2}cos(2x+\Phi )-18d_{3}cos(3x+\Phi )-32d_{4}cos(4x+\Phi )-50d_{5}cos(5x+\Phi )-72d_{}cos(6x+\Phi ) $$     (9.71)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{0}^{1}b_{0}(x)P(u^{h}(x))dx=0 $$     (9.72)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{0}^{1}cos\Phi \left [ -2d_{1}cos(x+\Phi )-8d_{2}cos(2x+\Phi )-18d_{3} cos(3x+10)-32d_{4}cos(4x+\Phi )-50d_{5}cos(5x+\Phi )-72d_{6}cos(6x+\Phi )\right ]dx=0 $$     (9.73)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{0}^{1}b_{1}(x)P(u^{h}(x))dx=0 $$     (9.74)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{0}^{1}cos(x+\Phi) \left [ -2d_{1}cos(x+\Phi )-8d_{2}cos(2x+\Phi )-18d_{3} cos(3x+10)-32d_{4}cos(4x+\Phi )-50d_{5}cos(5x+\Phi )-72d_{6}cos(6x+\Phi )\right ]dx=0 $$     (9.75)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{0}^{1}b_{2}(x)P(u^{h}(x))dx=0 $$     (9.76)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{0}^{1}cos(2x+\Phi) \left [ -2d_{1}cos(x+\Phi )-8d_{2}cos(2x+\Phi )-18d_{3} cos(3x+10)-32d_{4}cos(4x+\Phi )-50d_{5}cos(5x+\Phi )-72d_{6}cos(6x+\Phi )\right ]dx=0 $$     (9.77)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{0}^{1}b_{3}(x)P(u^{h}(x))dx=0 $$     (9.78)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }
 * {| style="width:100%" border="0"

$$  \displaystyle \int_{0}^{1}cos(3x+\Phi) \left [ -2d_{1}cos(x+\Phi )-8d_{2}cos(2x+\Phi )-18d_{3} cos(3x+10)-32d_{4}cos(4x+\Phi )-50d_{5}cos(5x+\Phi )-72d_{6}cos(6x+\Phi )\right ]dx=0 $$     (9.79)
 * style="width:95%" |
 * style="width:95%" |
 * <p style="text-align:right">
 * }

=Contributing Members=

= References =