text:
User:Egm6341.s11.team5/HW6

= Problem 6.1 - Proof of Trapezoidal error = From [[media:Nm1.s11.mtg31.djvu|Mtg 31-1,2]]

Given

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

$$  \displaystyle \boldsymbol{E=\left[P_2(t)g^{(1)}(t)+P_4(t)g^{(3)}(t) \right]_{-1}^{+1}- \int_{-1}^{+1}P_5(t)g^{(5)}(t)dt} $$
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * }
 * }

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

$$  \displaystyle P_4(t)=c_1(\frac{t^4}{4!})+c_3(\frac{t^2}{2!})+c_5$$
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

$$

P_5(t)=c_1(\frac{t^5}{5!})+c_3(\frac{t^3}{3!})+c_5(t) $$

$$

c_1=-1, \qquad c_3 = \frac{1}{6}, \qquad c_5 = - \frac{7}{360} $$
 * }
 * }

Find
 Do steps 4ab to find (P6, P7) and E.

Solution
''' Step 4a. Using int. by parts '''

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

E = [P_2 g^{(1)} + P_4 g^{(3)}]_{-1}^{+1} +[P_6 g^{(5)}]_{-1}^{+1} - \int_{-1}^{+1} P_6(t)g^{(6)}(t) dt $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 * $$\displaystyle (1-1)
 * }

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

P_6(t) = \int P_5(t) dt = c_1 \cdot \frac{t^6}{6!} + c_3 \cdot \frac{t^4}{4!} + c_5 \cdot \frac{t^2}{2!} + c_7 $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 * $$\displaystyle (1-2)
 * }

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

 * }
 * }

''' Step 4b. Using int. by parts '''

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

E = [P_2 g^{(1)} + P_4 g^{(3)} + P_6 g^{(5)}]_{-1}^{+1} +[P_7 g^{(6)}]_{-1}^{+1} - \int_{-1}^{+1} P_7(t)g^{(7)}(t) dt $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 * $$\displaystyle (1-3)
 * }

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

P_7(t) = \int P_6(t) dt = c_1 \cdot \frac{t^7}{7!} + c_3 \cdot \frac{t^5}{5!} + c_5 \cdot \frac{t^3}{3!} + c_7 \cdot t + c_8 $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 * $$\displaystyle (1-4)
 * }

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

 * }
 * }

 Similar to [[media:Nm1.s11.mtg30.djvu|(1) p. 30-7]]

Consider $$\displaystyle P_7(t), \qquad P_7(0) = P_7(\pm 1) = 0 $$

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

P_7(0) = c_1 \cdot \frac{0}{7!} + c_3 \cdot \frac{0}{5!} + c_5 \cdot \frac{0}{3!} + c_7 \cdot (0) + c_8 = 0 $$
 * $$ \displaystyle
 * $$ \displaystyle

$$ \displaystyle \therefore c_8 = 0 $$ $$
 * $$\displaystyle (1-5)
 * }

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

P_7(\pm 1) = c_1 \cdot \frac{1}{7!} + c_3 \cdot \frac{1}{5!} + c_5 \cdot \frac{1}{3!} + c_7 \cdot (1) = 0 $$
 * $$ \displaystyle
 * $$ \displaystyle

$$ \displaystyle \therefore c_7 = \frac{31}{15120} \qquad \rightarrow$$ (WA result) $$
 * $$\displaystyle (1-6)
 * }

 Therefore
 * {| style="width:60%" border="0"

$$  \displaystyle P_6(t)=c_1 \cdot \frac{t^6}{6!} + c_3 \cdot \frac{t^4}{4!} + c_5 \cdot \frac{t^2}{2!} + c_7 $$
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

$$\displaystyle

P_7(t)=c_1 \cdot \frac{t^7}{7!} + c_3 \cdot \frac{t^5}{5!} + c_5 \cdot \frac{t^3}{3!} + c_7 \cdot t $$

$$

c_1 = -1, \ c_3 = \frac{1}{6}, \ c_5 = - \frac{7}{360}, \ c_7 = \frac{31}{15120} $$
 *
 * }

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

$$  \displaystyle \boldsymbol{E=\left[P_2(t)g^{(1)}(t)+P_4(t)g^{(3)}(t) + P_6(t)g^{(5)}(t) \right]_{-1}^{+1}- \int_{-1}^{+1}P_7(t)g^{(7)}(t)dt} $$
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * }
 * }

Given

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

$$ $$
 * $$\displaystyle x(t) := \frac{x_k+x_{k+1}}{2} + t \cdot \frac{h}{2}, \qquad t \in [-1,+1], \ h = x_{k+1} - x_k
 * $$\displaystyle x(t) := \frac{x_k+x_{k+1}}{2} + t \cdot \frac{h}{2}, \qquad t \in [-1,+1], \ h = x_{k+1} - x_k
 * $$\displaystyle (1-7)
 * }
 * }

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

 * }.
 * }.
 * }.

Find

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

 * $$\displaystyle t_k(x) $$
 * }
 * }
 * }
 * }

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

 * }.
 * }.
 * }.

Solution

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

$$
 * $$\displaystyle (1-7) \rightarrow \ x(t_k) = \frac{x_k+x_{k+1}}{2} + t_k \cdot \frac{h}{2}$$
 * $$\displaystyle (1-8)
 * $$\displaystyle (1-8)
 * }
 * }

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

$$
 * $$\displaystyle t_k = \frac{2}{h} \left( x(t_k) - \frac{x_k+x_{k+1}}{2} \right) $$
 * $$\displaystyle (1-9)
 * $$\displaystyle (1-9)
 * }
 * }

.

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

$$\displaystyle t_k(x) = \frac{2}{h} \left( x - \frac{x_k+x_{k+1}}{2} \right) $$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |

 * style= |

 * }
 * }

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

 * }
 * }
 * }

 Proof (1)

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

$$
 * $$\displaystyle x(t_k=-1) = x_k  \Longleftrightarrow \ t_k(x=x_k) = -1 $$
 * $$\displaystyle (1-10)
 * $$\displaystyle (1-10)
 * }
 * }

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

$$
 * $$\displaystyle t_k(x_k) = \frac{2}{h} \left( x_k - \frac{x_k + x_{k+1}}{2} \right) = \frac{2}{h} \left( \underbrace{\frac{x_{k+1} - x_k}{2}}_{= \frac{h}{2}} \right) \cdot (-1) = -1 $$
 * $$\displaystyle (1-11)
 * $$\displaystyle (1-11)
 * }
 * }

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

 * }
 * }
 * }

 Proof (2)

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

$$
 * $$\displaystyle x(t_k=0) = \frac{x_k + x_{k+1}}{2}  \Longleftrightarrow \ t_k(x=\frac{x_k + x_{k+1}}{2}) = 0 $$
 *
$$\displaystyle (1-12)
 *
$$\displaystyle (1-12)
 * }
 * }

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

$$
 * $$\displaystyle t_k(\frac{x_k + x_{k+1}}{2}) = \frac{2}{h} \left( \frac{x_k + x_{k+1}}{2} - \frac{x_k + x_{k+1}}{2} \right) = 0  $$
 *
$$\displaystyle (1-13)
 *
$$\displaystyle (1-13)
 * }
 * }

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

 * }
 * }
 * }

 Proof (3)

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

$$
 * $$\displaystyle x(t_k=+1) = x_{k+1} \Longleftrightarrow \ t_k(x=x_{k+1}) = +1 $$
 *
$$\displaystyle (1-14)
 *
$$\displaystyle (1-14)
 * }
 * }

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

$$.
 * $$\displaystyle t_k(x_{k+1}) = \frac{2}{h} \left( x_{k+1} - \frac{x_k + x_{k+1}}{2} \right) = \frac{2}{h} \left( \underbrace{ \frac{ x_{k+1} - x_k }{2}}_{= \frac{h}{2}} \right) = +1 $$
 *
$$\displaystyle (1-15)
 *
$$\displaystyle (1-15)
 * }
 * }

Given

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

d_{r} = \bar{d_{2r}} = \frac{P_{2r}(1)}{2^{2r}} $$ $$ .

 * $$\displaystyle
 * $$\displaystyle
 *
$$\displaystyle (1-16)
 * }
 * }

Find
$$\displaystyle d_1, \ d_2, \ d_3 $$

Solution
 We already knew that

$$\displaystyle

P_2(t)=c_1 \cdot \frac{t^2}{2!} + c_3 $$

$$\displaystyle

P_4(t)=c_1 \cdot \frac{t^4}{4!} + c_3 \cdot \frac{t^2}{2!} + c_5 $$

$$  \displaystyle P_6(t)=c_1 \cdot \frac{t^6}{6!} + c_3 \cdot \frac{t^4}{4!} + c_5 \cdot \frac{t^2}{2!} + c_7 $$

$$

c_1 = -1, \ c_3 = \frac{1}{6}, \ c_5 = - \frac{7}{360}, \ c_7 = \frac{31}{15120} $$

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

$$\displaystyle d_{1} = \bar{d_{2}} = \frac{P_{2}(1)}{2^2}=\frac{1}{4} \cdot \left( \frac{-1}{2!} + \frac{1}{6} \right) = -\frac{1}{12}$$ (WA result)
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = |
 * }
 * }

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

$$\displaystyle d_{2} = \bar{d_{4}} = \frac{P_{4}(1)}{2^4}=\frac{1}{16} \cdot \left( \frac{-1}{4!} + \frac{1}{6} \cdot \frac{1}{2!} + \left( - \frac{7}{360} \right) \right)=\frac{1}{720} $$ (WA result)
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = |
 * }
 * }

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

$$\displaystyle d_{3} = \bar{d_{6}} = \frac{P_{6}(1)}{2^6}=\frac{1}{64} \cdot \left( \frac{-1}{6!} + \frac{1}{6} \cdot \frac{1}{4!} + \left( - \frac{7}{360} \cdot \frac{1}{2!} \right) + \frac{31}{15120} \right) = -\frac{1}{30240} $$ (WA result)
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = |
 * }
 * }

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

 * style = |
 * }
 * }

Author and proof-reader
[Author] Oh

[Proof-reader]

= Problem 6.2 - Derive equations (1) and (2) from p31-1 = From [[media:Nm1.s11.mtg31.djvu|Mtg 31-3]]

Given
The following equations: $$E=\int_{-1}^{+1} p_{1}(t)g^{(1)}(t)dt = \left[ p_{2}(t)g^{(1)}(t)\right]_{-1}^{+1}- \int_{-1}^{+1} p_{2}(t)g^{(2)}(t)dt$$

Find
Derive: $$E_{n}^{T}=\sum_{r=1}^{l}h^{2r}\bar{d_{2r}}\left[ f^{(2r-1)}(b)-f^{(2r-1)}(a)\right]-\left(\frac{h}{2} \right)^{2l}\sum_{k=0}^{n-1}\int_{x_{k}}^{x_{k+1}}p_{2l}(t_{k}(x))f^{(2l)}(x)dx $$ And: $$\bar{d_{2r}}=\frac{p_{2r}(1)}{2^{2r}}$$

Solution
Starting with the integral: $$E=\int_{-1}^{+1}p_{1}(t)g^{1}(t)dt = \left[p_{2}(t)g^{(1)}(t)+p_{4}(t)g^{(3)}(t)+...+p_{2l}(t)g^{(2l-1)}(t)\right]_{-1}^{+1}- \int_{-1}^{+1}p_{2l}(t)g^{(2l)}(t)dt$$ When evaluating, the even polynomials can be simplified as: $$p_{2}(-1)=p_{2}(+1)$$, $$p_{4}(-1)=p_{4}(+1)$$, ..., $$p_{2l}(-1)=p_{2l}(+1)$$. Therefore, $$E=\sum_{r=1}^{l}p_{2r}(+1)\left[ g^{(2r-1)}(+1)-g^{(2r-1)}(-1) \right] - \int_{-1}^{+1}p_{2l}(t)g^{(2l)}(t)dt$$ Changing the variable: $$g^{(2r-1)}(+1)=\left(\frac{h}{2}\right)^{2r-1}f^{(2r-1)}(b)$$ $$g^{(2r-1)}(-1)=\left(\frac{h}{2}\right)^{2r-1}f^{(2r-1)}(a)$$ Putting it back into the equation, we have: $$E=\sum_{r=1}^{l}p_{2r}(+1)\left(\frac{h}{2}\right)\left(\frac{h}{2}\right)^{2r-1}\left[ f^{(2r-1)}(b)-f^{(2r-1)}(a) \right] - \sum_{k=1}^{n-1}\int_{-1}^{+1}p_{2l}(t)g^{(2l)}(t)dt$$ $$E=\sum_{r=1}^{l}p_{2r}(+1)\left(\frac{h}{2}\right)^{2r}\left[ f^{(2r-1)}(b)-f^{(2r-1)}(a) \right] - \sum_{k=1}^{n-1}\int_{-1}^{+1}p_{2l}(t_{k}(x))f^{(2l)}(x)dx$$ Letting
 * {| style="width:60%" border="0"

$$\bar{d_{2r}}=\frac{p_{2r}(+1)}{2^{2r}}$$
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * }
 * }

We then get:

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

$$E=\sum_{r=1}^{l}\bar{d_{2r}}h^{2r}\left[ f^{(2r-1)}(b)-f^{(2r-1)}(a) \right] - \sum_{k=1}^{n-1}\int_{-1}^{+1}p_{2l}(t_{k}(x))f^{(2l)}(x)dx$$
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * }
 * }

Author and proof-reader
[Author]cavalcanti

[Proof-reader]

=''' Problem 6.3 - Verify Bernauli number & compare it with end point of HORTE. '''= From [[media:Nm1.s11.mtg31.djvu|Mtg 31-3]]

Given
Bernoulli numbers: $$\displaystyle \frac{x}{{{e}^{x}}-1}=\sum\limits_{r=0}^{\infty }{\underbrace{\frac{(2r)!}}_{-{{{\bar{d}}}_{2r}}}{{x}^{2r}}} $$

Find
1)Verify $${{\bar{d}}_{2}},{{\bar{d}}_{4}},{{\bar{d}}_{6}}$$ 2)Find $${{\bar{d}}_{8}},{{\bar{d}}_{10}}$$ using above given expression, compare it to $${{\bar{d}}_{2r}}=\frac{{{P}_{2r}}(1)}$$, where $${{P}_{2r}}(1)$$ is the polynomial of HOTRE evaluated at $$x=1$$.

Solution
Using Taylor Series to expand $$\frac{1}{{{e}^{x}}-1}$$ at $${{x}_{0}}=0$$. We have $$\displaystyle\frac{1}{{{e}^{x}}-1}=\frac{1}{x}-\frac{1}{2}+\frac{x}{12}-\frac{720}+\frac{30240}-\frac{1209600}+\frac{4700160}-\frac{691{{x}^{11}}}{130767436800}+\cdots $$ Verified with[WA] Thus,

$$\displaystyle \frac{x}{{{e}^{x}}-1}=1-\frac{x}{2}+\frac{12}-\frac{720}+\frac{30240}-\frac{1209600}+\frac{4700160}-\frac{691{{x}^{12}}}{130767436800}+\cdots ={{B}_{0}}+{{B}_{1}}x+\frac{2!}{{x}^{2}}+\frac{4!}{{x}^{4}}+\frac{6!}{{x}^{6}}+\frac{8!}{{x}^{8}}+\frac{10!}{{x}^{10}}+\frac{12!}{{x}^{12}}+\cdots $$ Comparing it to the above equation, we get the following : $$\displaystyle {{B}_{2}}=\frac{1}{6} $$ $$\displaystyle {{B}_{4}}=-\frac{1}{30} $$ $$\displaystyle{{B}_{6}}=\frac{1}{42} $$ $$\displaystyle {{B}_{8}}=-\frac{1}{30}$$ $$\displaystyle {{B}_{10}}=\frac{5}{66}$$

Thus, $$\displaystyle {{{\bar{d}}}_{2}}=-\frac{1}{12}$$ $$\displaystyle {{{\bar{d}}}_{4}}=\frac{1}{720}$$ $$\displaystyle {{{\bar{d}}}_{6}}=-\frac{1}{30240}$$ $$\displaystyle {{{\bar{d}}}_{8}}=\frac{1}{1209600} $$ $$\displaystyle{{{\bar{d}}}_{10}}=-\frac{1}{\text{47900160}} $$

We alreeady know the following from higher order trapezoidal rule error theorm: $$\displaystyle {{P}_{2}}=-\frac{2!}+\frac{1}{6}$$ $$\displaystyle {{P}_{4}}=-\frac{4!}+\frac{1}{6}\frac{2!}-\frac{7}{360}$$ $$\displaystyle {{P}_{6}}=-\frac{6!}+\frac{1}{6}\frac{4!}-\frac{7}{360}\frac{2!}+\frac{31}{15120}$$ $$\displaystyle {{P}_{8}}=-\frac{8!}+\frac{1}{6}\frac{6!}-\frac{7}{360}\frac{4!}+\frac{31}{15120}\frac{2!}-\frac{5}{23811} $$ $$\displaystyle {{P}_{10}}=-\frac{10!}+\frac{1}{6}\frac{8!}-\frac{7}{360}\frac{6!}+\frac{31}{15120}\frac{4!}-\frac{5}{23811}\frac{2!}+\frac{11}{171629} $$

Therefore, $$\displaystyle {{{\bar{d}}}_{2}}=\frac{{{P}_{2}}(1)}=\frac{-\frac{1}{2!}+\frac{1}{6}}{4}=-\frac{1}{12}$$ $$\displaystyle {{{\bar{d}}}_{4}}=\frac{{{P}_{4}}(1)}=\frac{-\frac{1}{4!}+\frac{1}{6}\frac{1}{2!}-\frac{7}{360}}{16}=\frac{1}{720}$$ $$\displaystyle {{{\bar{d}}}_{6}}=\frac{{{P}_{6}}(1)}=\frac{-\frac{1}{6!}+\frac{1}{6}\frac{1}{4!}-\frac{7}{360}\frac{1}{2!}+\frac{31}{15120}}{64}=-\frac{1}{30240}$$ $$\displaystyle {{{\bar{d}}}_{8}}=\frac{{{P}_{8}}(1)}=\frac{-\frac{1}{8!}+\frac{1}{6}\frac{1}{6!}-\frac{7}{360}\frac{1}{4!}+\frac{31}{15120}\frac{1}{2!}-\frac{5}{23811}}{256}=\frac{1}{1209600} $$ $$\displaystyle {{{\bar{d}}}_{10}}=\frac{{{P}_{10}}(1)}=\frac{-\frac{1}{10!}+\frac{1}{6}\frac{1}{8!}-\frac{7}{360}\frac{1}{6!}+\frac{31}{15120}\frac{1}{4!}-\frac{5}{23811}\frac{1}{2!}+\frac{11}{171629}}{1024}=-\frac{1}{\text{47900160}} $$

Author and proof-reader
[Author] | Raghunathan

[Proof-reader]

= Problem 6.4 - Proof of High Order Trapezoidal Rule Error by cancelling terms with odd order of derivative of g = From [[media:Nm1.s11.mtg31.djvu|Mtg 31-4]]

Given
From the lecture notes [[media:Nm1.s11.mtg30.djvu|p.30-2]], the composite trapezoidal error is given as below.
 * {| style="width:100%" border="0"

$$\begin{align} E_n^T=\frac{h}{2}\sum_{k=0}^{n-1} \left[ \underbrace{\int_{-1}^{+1} \! g_k(t) \, \mathrm{d}t - \left\{ g_k(-1)+g_k(+1) \right\}}_{E} \right] \end{align}$$ (4-1)$$ $$\displaystyle E $$ can be written as below.
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$ E = \int_{-1}^{+1} \! p_1(t)g^{(1)}(t) \, \mathrm{d}t $$     (4-2)$$ where
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$ \displaystyle p_1(t) = -t $$     (4-3)$$
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }

Find
Derive the High Order Trapezoidal Rule Error by cancelling terms with odd order of derivative of $$\displaystyle g(t) $$

Solution
STEP 1: After integrating the equation (4-2) by part, the following is obtained.
 * {| style="width:100%" border="0"

$$ E = \underbrace{\left[ p_2(t)g^{(1)}(t) \right]_{-1}^{+1}}_{A1}-\int_{-1}^{+1} \! p_2(t)g^{(2)}(t) \, \mathrm{d}t $$     (4-4)$$ where
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$ p_2(t) = \int \! p_1(t) \, \mathrm{d}t = -\frac{t^2}{2}+ \alpha \mbox{ } (\alpha \mbox{ is integration constant}) $$     (4-5)$$ In order to cancel terms with $$\displaystyle g^{(1)}(t)$$ i.e, make $$\displaystyle A1=0 $$, consider the following.
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$ \begin{align} p_2(-1)=p_2(1)=0 \end{align} $$     (4-6)$$ From the equation (4-5),
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$ \begin{align} p_2(-1) & =-\frac{1}{2}+\alpha = 0 \\ &\rightarrow \alpha = \frac{1}{2} \end{align} $$     (4-7)$$  STEP 2: After applying the two times of integration by part to the equation (4-4), the following is obtained.
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$ E= -\left[ p_3(t)g^{(2)}(t) \right]_{-1}^{+1}+ \underbrace{\left[ p_4(t)g^{(3)}(t) \right]_{-1}^{+1}}_{A2}- \underbrace{\int_{-1}^{+1} \! p_4(t)g^{(4)}(t) \, \mathrm{d}t}_{B2} $$     (4-8)$$ where
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$ \begin{align} p_3(t) &= \int \! p_2(t) \, \mathrm{d}t = -\frac{t^3}{3!}+ \frac{1}{2} t + \beta \\ p_4(t) &= \int \! p_3(t) \, \mathrm{d}t = -\frac{t^4}{4!}+ \frac{t^2}{4} +\beta t + \gamma \mbox{ } (\beta,\gamma \mbox{ are integration constants}) \end{align} $$     (4-9)$$ In order to make the term in the equation (4-8) $$\displaystyle A2=0 $$, consider the following.
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$ \begin{align} p_4(-1)=p_4(1)=0 \end{align} $$     (4-10)$$ From the equation (4-9),
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$ \begin{align} p_4(-1) & =-\frac{1}{4!}+\frac{1}{4}-\beta+\gamma = 0 \\ p_4(1) & =-\frac{1}{4!}+\frac{1}{4}+\beta t+\gamma = 0 \\ \rightarrow \beta &= 0 \\ \gamma &= -\frac{5}{24} \end{align} $$     (4-11)$$ Summary,
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$ \begin{align} p_2(t) &= -\frac{t^2}{2!}+\frac{1}{2} \\ p_3(t) &= -\frac{t^3}{3!}+\frac{t}{2} \\ p_4(t) & =-\frac{t^4}{4!}+\frac{t^2}{4} - \frac{5}{24} \end{align} $$     (4-11)$$  STEP 3: After integrating the term $$\displaystyle B2 $$ in the equation (4-8) by part, the following is true.
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$ \begin{align} E &= -\left[ p_3(t)g^{(2)}(t) \right]_{-1}^{+1}-\left[ p_5(t)g^{(4)}(t) \right]_{-1}^{+1} +\int_{-1}^{+1} \! p_5(t)g^{(5)}(t) \, \mathrm{d}t \\ &= -\left[ p_3(t)g^{(2)}(t) + p_5(t)g^{(4)}(t) \right]_{-1}^{+1} +\int_{-1}^{+1} \! p_5(t)g^{(5)}(t) \, \mathrm{d}t \end{align} $$     (4-12)$$ where
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * $$\displaystyle

p_5(t) = \int \! p_4(t) \, \mathrm{d}t $$ By continuing the similar steps above, the general expression of E can be computed as follows.
 * {| style="width:100%" border="0"

$$ \begin{align} E &= -\left[ p_3(t)g^{(2)}(t) + p_5(t)g^{(4)}(t) \right]_{-1}^{+1} +\int_{-1}^{+1} \! p_5(t)g^{(5)}(t) \, \mathrm{d}t \\ &= -\left[ p_3(t)g^{(2)}(t) + p_5(t)g^{(4)}(t)++ p_7(t)g^{(6)}(t) + \cdots + + p_{2l+1}(t)g^{(2l)}(t) \right]_{-1}^{+1} +\int_{-1}^{+1} \! p_{2l+1}(t)g^{(2l+1)}(t) \, \mathrm{d}t \\ &= \sum_{r=1}^{l} \left[ -p_{2r+1}(t)g^{2r}(t) \right]_{-1}^{+1} +\int_{-1}^{+1} \! p_{2l+1}(t)g^{(2l+1)}(t) \, \mathrm{d}t \\ &= \sum_{r=1}^{l} \left[ -p_{2r+1}(+1)g^{2r}(+1)+p_{2r+1}(-1)g^{2r}(-1) \right] +\int_{-1}^{+1} \! p_{2l+1}(t)g^{(2l+1)}(t) \, \mathrm{d}t \\ & p_{2r+1}(+1) = -p_{2r+1}(-1) \\ &= \sum_{r=1}^{l} p_{2r+1}(-1) \left[ g^{2r}(+1)+g^{2r}(-1) \right] +\int_{-1}^{+1} \! p_{2l+1}(t)g^{(2l+1)}(t) \, \mathrm{d}t \end{align} $$     (4-13)$$  STEP 4: From the equation (5) in the lecture notes [[media:Nm1.s11.mtg30.djvu|p.30-2]],
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$ \begin{align} E_n^T &= \frac{h}{2} \sum_{k=0}^{n-1} \left[ \underbrace{\int_{-1}^{+1} \! g_k(t) \, \mathrm{d}t - \left\{ g_k(-1)+g_k(+1) \right\}}_{=E} \right] \\ &=\frac{h}{2}\sum_{r=1}^{l} \sum_{k=0}^{n-1} p_{2r+1}(-1) \left[ g_k^{2r}(+1)+g_k^{2r}(-1) \right] +\int_{-1}^{+1} \! p_{2l+1}(t)g_k^{(2l+1)}(t) \, \mathrm{d}t \end{align} $$     (4-14)$$ Also, from the lecture notes [[media:Nm1.s11.mtg30.djvu|p.30-3]],
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$ g_k^{(i)}(t) = (\frac{h}{2})^i f^{(i)}(x(t)) \mbox{,  } x \in \left[ x_k, x_{k+1} \right] $$     (4-15)$$ Using the equation (4-15), the followings can be defined.
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$ \begin{align} &g_k^{(2r)}(+1)=\left(\frac{h}{2}\right)^{2r}f^{(2r)}(x_{k+1}),\\ &g_k^{(2r)}(-1)=\left(\frac{h}{2}\right)^{2r}f^{(2r)}(x_{k}),\\ &g_k^{(2l+1)}(t)=\left(\frac{h}{2}\right)^{2l+1}f^{(2l+1)}(x_{t}) \end{align} $$     (4-16)$$ Substitute the equations (4-16) into the equation (4-14).
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }

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

$$ \begin{align} E_n^T &= \sum_{r=1}^{l} \sum_{k=0}^{n-1} \left( \frac{h}{2} \right)^{2r+1} p_{2r+1}(-1) \left[f^{(2r)}(x_{k+1})+f^{(2r)}(x_{k})\right] - \left(\frac{h}{2}\right)^{2l+2}\sum_{k=0}^{n-1} \int_{x_k}^{x_{k+1}} \! p_{2l+1}(t_k(x))f^{(2l+1)}(x) \, \mathrm{d}x \\ &= \sum_{r=1}^{l} \left( \frac{h}{2} \right)^{2r+1} p_{2r+1}(-1) \sum_{k=0}^{n-1}\left[f^{(2r)}(x_{k+1})+f^{(2r)}(x_{k})\right] - \left(\frac{h}{2}\right)^{2l+2}\sum_{k=0}^{n-1} \int_{x_k}^{x_{k+1}} \! p_{2l+1}(t_k(x))f^{(2l+1)}(x) \, \mathrm{d}x \end{align} $$     (4-17)$$ In the equation (4-17), it is seen that a summation of the high order derivatives at different points in the square brackets increases the complexity of the computation. The term in the first summation is not cancelled out and cannot be reduced to a simpler form. As a result, the equation (4-17) is computationally cumbersome since it requires the derivatives calculated at all points.
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }

Author and proof-reader
[Author] Shin

[Proof-reader]

= Problem 6.5 - Determine the polynomials P8(t) and P9(t) = From [[media:Nm1.s11.mtg32.djvu|Mtg 32-2]]

Given

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

P_{2j} (t) = \sum_{j=0}^{i} c_{2j+1} \cdot \frac{t^{2(i-j)}}{[2(i-j)]!} $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (1-1)
 * }

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

P_{2j+1} (t) = \sum_{j=0}^{i} c_{2j+1} \frac{t^{2(i-j)+1}}{[2(i-j)+1]!} $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (1-2)
 * }

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

\sum_{j=0}^{i} \frac{c_{2j+1}}{[2(i-j)+1]!} = 0 $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (1-3)
 * }

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

P_1 (t) = -t, \qquad \rightarrow c_1 = -1 $$ $$.
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (1-4)
 * }

Find
$$\displaystyle (P_8, P_9) $$

Solution
 According to (1-1) and (1-2)

$$  \displaystyle P_8(t)=c_1 \cdot \frac{t^8}{8!} + c_3 \cdot \frac{t^6}{6!} + c_5 \cdot \frac{t^4}{4!} + c_7 \cdot \frac{t^2}{2!} + c_9$$

$$\displaystyle

P_9(t)=c_1 \cdot \frac{t^9}{9!} + c_3 \cdot \frac{t^7}{7!} + c_5 \cdot \frac{t^5}{5!} + c_7 \cdot \frac{t^3}{3!} + c_9 \cdot t $$

 And we already knew that the values of

$$\displaystyle c_1 = -1, \ c_3 = \frac{1}{6}, \ c_5 = - \frac{7}{360}, \ c_7 = \frac{31}{15120} $$

 in problem 6.1 Therefore all we have to find is only  $$\displaystyle c_9 $$

 Using (1-3)

$$\displaystyle \frac{c_1}{9!} + \frac{c_3}{7!} + \frac{c_5}{5!} + \frac{c_7}{3!} + c_9 = 0 $$

$$\displaystyle \therefore c_9 = - \frac{127}{604800} $$

(WA result)

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

$$  \displaystyle P_8(t)=c_1 \cdot \frac{t^8}{8!} + c_3 \cdot \frac{t^6}{6!} + c_5 \cdot \frac{t^4}{4!} + c_7 \cdot \frac{t^2}{2!} + c_9$$
 * style="width:92%; padding:10px; border:2px solid #8888aa" |
 * style="width:92%; padding:10px; border:2px solid #8888aa" |

$$\displaystyle

P_9(t)=c_1 \cdot \frac{t^9}{9!} + c_3 \cdot \frac{t^7}{7!} + c_5 \cdot \frac{t^5}{5!} + c_7 \cdot \frac{t^3}{3!} + c_9 \cdot t $$

$$\displaystyle c_1 = -1, \ c_3 = \frac{1}{6}, \ c_5 = - \frac{7}{360}, \ c_7 = \frac{31}{15120}, \ c_9 = - \frac{127}{604800} $$
 * }
 * }

Author and proof-reader
[Author] Oh

[Proof-reader]

= Problem 6.6 - Kessler's Code = From [[media:Nm1.s11.mtg32.djvu|Mtg 32-3]]

Given
Kessler's code:

Find
Use $$(p_{2i}, p_{2i+1}), i=1, 2,3$$ to understand Kessler's code line by line, starting with the best of S10.

Solution
We will be using $$(p_{2},p_{3}),(p_{4},p_{5}),$$ and $$(p_{6},p_{7})$$. Also, the code is explained by adding comments line by line:

Author and proof-reader
[Author] cavalcanti

= Problem 6.7 - Computing the Circumference of an ellipse and bifolium = From [[media:Nm1.s11.mtg33.djvu|Mtg 33-1]]

''' This problem was solved using the matlab code from team 4 spring 2010, HW5 and  HW4, as a guide. The circumference of the bifolium was calculated ourselves '''

Given
An Ellipse as given by:

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

$$\begin{align} r(\theta ) &= \frac\\ e&={\left( {1 - \frac} \right)^{1/2}}\\ a&=10\\ b&=3 \end{align}$$ (7-1)$$ For the ellipse
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }

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

$$\begin{align} C &= \int_0^{2\pi } {dl} = 4aE(e)\\ where\\ E(e) &= {\int_0^{\frac{\pi }{2}} {\left[ {1 - {e^2}\sin (\theta )} \right]} ^{\frac{\pi }{2}}}d\theta \end{align}$$ (7-2)$$
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }

A bifolium is given by:
 * {| style="width:100%" border="0"

$$\begin{align} r(\theta ) = 2\sin (\theta ){\cos ^2}(\theta ) \end{align}$$ (7-3)$$
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }

Also given is the equation for arc length given on [[media:Nm1.s11.mtg32.djvu|Mtg 32-4]],
 * {| style="width:100%" border="0"

$$\begin{align} \widehat{PQ} =\int_^ {{{\left[ {{r^2} + {{\left( {\frac{{dr}}{{d\theta }}} \right)}^2}} \right]}^{1/2}}d\theta } \end{align}$$ (7-4)$$
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }

Find
1) Using the parameterization of an ellipse, given on [[media:Nm1.s11.mtg34.djvu|Mtg 34-5]], determine $$dl$$ for an ellipse and show that eq 7-2 is valid 2) Using $$C=\int_0^{2\pi } {dl}$$, find the circumference of the ellipse using Comp Trap Rule, Romberg, Clenshaw-Curtis quad (clencurt code), and Clenshaw-Curtis quad (Fast CC). 3) Using $$C=4aE(e)$$, to find the exact circumference of the ellipse. 4) Using equations 7-3 and 7-4, find the circumference of the bifolium using Comp Trap Rule, Romberg, Clenshaw-Curtis quad (clencurt code), and Clenshaw-Curtis quad (Fast CC).

For all of these use Wolfram Alpha as a reference for the exact solution and state the computation time.

7.1: Parameterization of an Ellipse
Starting from the parameters that $$x=acos(\theta)$$ and $$y=bsin(\theta)$$ we have the equation for the ellipse
 * {| style="width:100%" border="0"

$$\begin{align} 1 &= {\underbrace {\left( {\frac{y}{b}} \right)}_{{{\cos }^2}t}^2} + {\underbrace {\left( {\frac{x}{a}} \right)}_{{{\sin }^2}t}^2}\\ dx&=-asin(\theta)d\theta\\ dy&=bcos(\theta)d\theta \end{align}$$ (7-5)$$ Also
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$\begin{align} dl = {\left[ {d{x^2} + d{y^2}} \right]^{\frac{1}{2}}} \end{align}$$ (7-6)$$ Substituting 8-5 into 8-6 we get
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$\begin{align} dl = {\left[ {{a^2}{{\sin }^2}(\theta ) + {b^2}{{\cos }^2}(\theta )} \right]^{\frac{1}{2}}}d\theta \end{align}$$ (7-7)$$ Pulling out $$a^{2}$$
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$\begin{align} dl = a{\left[ {{{\sin }^2}(\theta ) + \frac{{\cos }^2}(\theta )} \right]^{\frac{1}{2}}}d\theta \end{align}$$ (7-8)$$
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$\begin{align} dl &= a{\left[ {1 - {{\cos }^2}(\theta ) + \frac{{\cos }^2}(\theta )} \right]^{\frac{1}{2}}}d\theta\\ &=a{\left[ {1 - \underbrace {\left( {1 - \frac} \right)}_{{\cos }^2}(\theta )} \right]^{\frac{1}{2}}}d\theta\\ \Rightarrow dl &= a{\left[ {1 - {e^2}{{\cos }^2}(\theta )} \right]^{\frac{1}{2}}}d\theta \end{align}$$ (7-9)$$
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }

Equation 7-9 gives us our $$dl$$ to calculate the circumference using method 1. Now we must show that the transform is valid.

Figure out transformation of variables

7.2: Circumference using $$C=\int_0^{2\pi } {dl}$$
To start we must find out what the eccentricity equals.

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

$$\begin{align} e &= {\left( {1 - \frac} \right)^{\frac{1}{2}}}\\ &={\left( {1 - \frac} \right)^{\frac{1}{2}}}\\ &={\left( {.91} \right)^{\frac{1}{2}}}\\ &=0.953939 \end{align}$$ (7-10)$$ From here the Matlab code below was used. It is based on code developed by Running this code produces the following solutions for the circumference and the time the calculations took. From the table we can see that the fast Clenshaw-Curtis quadrature was indeed very fast at solving for the circumference. The biggest issue with the Clenshaw-Curtis quadratures is that the user must select the number of steps before computation. As opposed to the other two methods, in which the user can specify the accuracy desired and the program will run for the desired number of steps. You could rework the code to allow for the Clenshaw-Curtis operators to act in this manner but you would end up sacrificing the speed that was the primary pro.
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }

7.3: Circumference using 4aE(e)
Because E(e) is a simple function
 * {| style="width:100%" border="0"

$$ E(e) = {\int_0^{\frac{\pi }{2}} {\left[ {1 - {e^2}\sin (\theta )} \right]} ^{\frac{1}{2}}}d\theta $$     (7-2)$$ the exact value can easily be computed either by hand or using matlab. Here it was calculated using matlab.
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }

Giving us a solution of $$43.85910069568$$ in a time of $$0.005292s$$

7.4: Circumference of a Bifolium
From [WA] we find that the arc length of a bifolium is equal to 7.1555...a. Where
 * {| style="width:100%" border="0"

$$\begin{align} r = 4a{\cos ^2}(\theta )\sin (\theta ) \end{align}$$ (7-11)$$ Therefore in this problem $$a=\frac{1}{2}$$.
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }

Using this information the circumference of the bifolium is calculated using similar matlab code as for the ellipse. The calculations returned values as follows

As we can see, for the bifolium the matlab code did not return the same degree of accuracy. In fact it is many orders of magnitude less than for the ellipse. As we might expect for this more difficult, periodic, curve the comp trap rule was both the most accurate and the quickest run. In order for the Clenshaw-Curtis quadrature to get reasonable accuracy they number of steps had to be greatly increased causing a large increase in time required to run.

Author and proof-reader
[Author]

= Problem 6.8 = From [[media:Nm1.s11.mtg33.djvu|Mtg 33-2]]

 We solved on our own

Given

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

$$\begin{align} \widehat{PQ} =\int_^ {{{\left[ {{r^2} + {{\left( {\frac{{dr}}{{d\theta }}} \right)}^2}} \right]}^{1/2}}d\theta } \end{align}$$ (8-1)$$
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }

Find
Given the triangle OAB in the above figure, use the law of cosines to derive equation 8-1

Solution
The law of cosines is given as
 * {| style="width:100%" border="0"

$$\begin{align} {c^2} = {a^2} + {b^2} - 2ab\cos (\gamma ) \end{align}$$ (8-2)$$
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }

Using the above triangle and setting
 * {| style="width:100%" border="0"

$$\begin{align} \overline {AA'} &= rd\theta \\ \overline{A'B}&=dr \end{align}$$ (8-3)$$ The law of cosines then becomes
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$\begin{align} {\overline {AB} ^2} &= {\overline {AA'} ^2} + {\overline {A'B} ^2} - 2\overline {AA'} \overline {A'B} \cos (\gamma )\\ where \\ \rightarrow \gamma &=0 \end{align}$$ (8-4)$$
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }

Thus the equation becomes
 * {| style="width:100%" border="0"

$$\begin{align} {\overline {AB} ^2} &= {\overline {AA'} ^2} + {\overline {A'B} ^2}\\ \end{align}$$ (8-5)$$ Substituting
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$\begin{align} {\overline {AB} ^2} = r{(\theta )^2}d{\theta ^2} + d{r^2} \end{align}$$ (8-6)$$ We can approximate $$dr$$ by
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$\begin{align} dr &\cong r(\theta + d\theta ) - r(\theta )\\ &= \fracd\theta + h.o.t \end{align}$$ (8-7)$$ Neglecting the higher order terms and substituting
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$\begin{align} {\overline {AB} ^2} &= r{(\theta )^2}d{\theta ^2} + {\left( {\fracd\theta } \right)^2}\\ &=\left[ {r{{(\theta )}^2} + {{\left( {\frac} \right)}^2}} \right]d{\theta ^2} \end{align}$$ (8-8)$$ As we can see from the figure $$\overline{AB}=dl$$ so therefore
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$\begin{align} dl = {\left[ {r{{(\theta )}^2} + {{\left( {\frac} \right)}^2}} \right]^{\frac{1}{2}}}d\theta \end{align}$$ (8-9)$$ Taking the integral over the arc $$\widehat{PQ}$$ we come to eq 8-1 as expected.
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$\begin{align} \int\limits_^ {dl} &= \int\limits_^ {{{\left[ {r{{(\theta )}^2} + {{\left( {\frac{{dr(\theta )}}{{d\theta }}} \right)}^2}} \right]}^{\frac{1}{2}}}d\theta } \\ \widehat {PQ} &= \int\limits_^ {{{\left[ {r{{(\theta )}^2} + {{\left( {\frac{{dr(\theta )}}{{d\theta }}} \right)}^2}} \right]}^{\frac{1}{2}}}d\theta } \end{align}$$ (8-10)$$
 * style="width:95%" |
 * style="width:95%" |
 *
$$\displaystyle
 * }

Author and proof-reader
[Author]Egm6341.s11.team5.reiss 09:36, 5 April 2011 (UTC)Reiss

= Problem 6.9 Determine Shape Funcitons = From [[media:Nm1.s11.mtg32.djvu|Mtg 37-2]]

Given

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

Z(s)=c0+c1 s+c2 s^2+c3 s^3$$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-1)
 * }

Find
$$\mathbf{A},\mathbf{A^{-1}},\mathbf{N}$$  Where

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

\mathbf{A}.c=z, c=\left( \begin{array}{c} c0 \\ c1 \\ c2 \\ c3 \end{array} \right), z=\left( \begin{array}{c} z_i \\ z'_i \\ z_{i+1} \\ z'_{i+1} \end{array} \right),Z(s)=\mathbf{N}.\left( \begin{array}{c} d1 \\ d2 \\ d3 \\ d4 \end{array} \right) $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-2)
 * }

Solution
 At i, s=0 and at i+1, s=1

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

Z'(s)=c1+2 c2 s+3 c3 s^2, z_i=Z(0),z_{i+1}=Z(1),z'_i=Z'(0),z'_{i+1}=Z'(1) $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-3)
 * }

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

\left( \begin{array}{c} z_i \\ z'_i \\ z_{i+1} \\ z'_{i+1} \end{array} \right) = \left( \begin{array}{c} c0 \\ c1 \\ c0+c1+c2+c3 \\ c1+2 c2+3 c3 \end{array} \right) $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-4)
 * }

 In coefficient form for c,

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

\left( \begin{array}{c} z_i \\ z'_i \\ z_{i+1} \\ z'_{i+1} \end{array} \right) = \left( \begin{array}{cccc} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 1 & 1 & 1 & 1 \\ 0 & 1 & 2 & 3 \end{array} \right). \left( \begin{array}{c} c0 \\ c1 \\ c2\\ c3 \end{array} \right) $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-5)
 * }

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

\mathbf{A}=\left( \begin{array}{cccc} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 1 & 1 & 1 & 1 \\ 0 & 1 & 2 & 3 \end{array} \right),
 * $$ \displaystyle
 * $$ \displaystyle

\mathbf{A^{-1}}=\left( \begin{array}{cccc} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ -3 & -2 & 3 & -1 \\ 2 & 1 & -2 & 1 \end{array} \right) $$ $$
 *
$$\displaystyle (9-6)
 * }

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

\left( \begin{array}{c} z_i \\ z'_i \\ z_{i+1} \\ z'_{i+1} \end{array} \right)=\left( \begin{array}{c} d1 \\ d2 h \\ d3 \\ d4 h \end{array} \right)$$
 * $$ \displaystyle
 * $$ \displaystyle

$$c=\mathbf{A^{-1}}.z$$

$$c=\left( \begin{array}{c} d1 \\ d2 h \\ -3 d1-2 d2 h+3 d3-d4 h \\ 2 d1+d2 h-2 d3+d4 h \end{array} \right) $$ $$
 *
$$\displaystyle (9-7)
 * }

 Substuting the values for c into (9-1)

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

Z(s)=s^3 (2 d1+d2 h-2 d3+d4 h)+s^2 (-3 d1-2 d2 h+3 d3-d4 h)+d1+d2 h s $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-8)
 * }

 In coefficient form for d,

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

Z(s)=\left( \begin{array}{c} 2 s^3-3 s^2+1 \\ h s^3-2 h s^2+h s \\ 3 s^2-2 s^3 \\ h s^3-h s^2 \end{array} \right)^{T} .\left( \begin{array}{c} d1 \\ d2 \\ d3 \\ d4 \end{array} \right)$$
 * $$ \displaystyle
 * $$ \displaystyle

$$\mathbf{N}=\left( \begin{array}{c} 2 s^3-3 s^2+1 \\ h s^3-2 h s^2+h s \\ 3 s^2-2 s^3 \\ h s^3-h s^2 \end{array} \right)$$

$$
 *
$$\displaystyle (9-8)
 * }

 The following is the plot of $$\mathbf{N}$$ with $$h=1$$:

Author and proof-reader
[Author] J Davis 18:23, 1 April 2011 (UTC)

= References =

= Contributing members =

title: User:Egm6341.s11.team5/HW6


text:
User:Egm6341.s11.team5/HW7

=Problem 7.0 - Redo HW 5.2 and 5.4= From [[media:Nm1.s11.mtg39.djvu|Mtg 39-2]]

Problem 5.2 - Linear State Space Model with Random Noise
From [[media:Nm1.s11.mtg25.djvu|Mtg 25-2]]

Given

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

$$ $$ Where
 * $$ \mathbf{x_{k+1}}= \mathbf{F} \mathbf{x_{k}}+\mathbf{G} \mathbf{w_{k+1}}
 * $$ \mathbf{x_{k+1}}= \mathbf{F} \mathbf{x_{k}}+\mathbf{G} \mathbf{w_{k+1}}
 * $$\displaystyle (5-1)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\mathbf{F}&= \left[ \mathbf{I} +\Delta \mathbf{A} \right]\\ &= \left( {\begin{array}{*{20}{c}} 1&0\\ 0&1 \end{array}} \right) + .02\left( {\begin{array}{*{20}{c}} {-0.2}&1\\ { - 1}&{-0.2} \end{array}} \right)\end{align} $$ $$
 * $$\begin{align}
 * $$\begin{align}
 * $$\displaystyle (5-2)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

1\\ 1\end{array}} \right) $$ $$
 * $$G =\alpha \left( {\begin{array}{*{20}{c}}
 * $$G =\alpha \left( {\begin{array}{*{20}{c}}
 * $$\displaystyle (5-3)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

{x_{k}^1}\\ {x_{k}^2}\end{array}} \right), \mathbf{x_{0}} =  \left( {\begin{array}{*{20}{c}} {3}\\ {-2}\end{array}} \right) $$ $$
 * $$\mathbf{x_{k}} = \left( {\begin{array}{*{20}{c}}
 * $$\mathbf{x_{k}} = \left( {\begin{array}{*{20}{c}}
 * $$\displaystyle (5-4)
 * }
 * }

And$$ \mathbf{w_{k}}$$ is a series of random values according to some given distribution

Find
Find and Plot $$\mathbf{x_{k}}$$ for $$k=1,2,3...N$$ with $$\alpha=0.5,1,2$$. With no noise, Gaussian random noise, and Cauchy random noise. Highlighting the initial condition and equlibrium point.

Solution

Matlab code used to generate the data and plots.

The Cauchy random variable generating equation was found using the Mathematica command:

In: InverseCDF[CauchyDistribution[m,b],y]

Out: $$b \tan \left(\pi \left(y-\frac{1}{2}\right)\right)+m$$

where m is the mean, b is the half height, and y is the random variable.

The Equlibrium point was found by:

$$\lim_{k\to \infty } \, F^k.x = \left( \begin{array}{c} 0. \\ 0. \end{array} \right)$$

Author and proof-reader
[Author] J Davis 20:17, 20 April 2011 (UTC) [Proof-reader]

Problem 5.4 - Mass, Spring, Damper Analysis (Cauchy Analysis)
From [[media:Nm1.s11.mtg29.djvu|Mtg 29-1]] And User:Egm6341.s11.team5/HW5

Given
Diagram of the mass, spring, damper under consideration From [[media:Nm1.s11.mtg29.djvu|Mtg 29-1]]

Also the step size, h, equals 0.02

Find
For u=0.5 cauchy noise and $$c=\frac{3}{2}{c_{cr}}$$, plot $$\mathbf{x_{k}}$$

Solution
Using Cauchy noise as the forcing function for this system and again using the over damped value for c, the plot of x becomes

The heavy tails cause the system to react to much greater changes in input, which causes the large magnitude spikes seen in figure 3. As we can see the system never settles down to an equilibrium. The drastic spikes in the noise cause wild oscillations. Because the Cauchy distribution does not have a constant mean value, each time the matlab code was run a different graph was produced.

Author and proof-reader
[Author]

[Proof-reader]

=Problem 7.1 - Integrating the Verhulst Equation= From [[media:Nm1.s11.mtg40.djvu|Mtg 40-1]]

Given
The Verhulst equation as follows: $$\frac{dx}{dt}= rx\left( 1 - \frac{x}{x_{max}} \right)$$

Find
1. Use HS to integrate the Verhulst equation, st $$AbsTol=O(10^{-6})$$, using: $$x_{max}=15$$ and $$r=1.4$$. Case 1: $$x_{0}=3$$ Case 2: $$x_{0}=9$$

2. Develop Forward Euler method for step size $$h = 2^{k}h$$.

3. Develop Backwards Euler method for step size $$h = 2^{k}h$$.

Solution
1. HS Integration The logistics equation is integrated using the octave code at the end. The graphs are as follows: At $$x_{0}=3$$:  At $$x_{0}=9$$:

2. Forward Euler Method, with $$h=2^{k}\hat{h}$$. $$\frac{dx}{dt}=r\bar{x}(1-\bar{x})$$ $$\frac{\bar{x}_{i+1}-\bar{x}_{i}}{h}=r\bar{x}(1-\bar{x})$$ $$\bar{x}_{i+1}-\bar{x}_{i}=hr\bar{x}(1-\bar{x})$$ $$\bar{x}_{i+1}-\bar{x}_{i}=2^{k}\hat{h}r\bar{x}(1-\bar{x})$$ $$\bar{x}_{i+1}=2^{k}\hat{h}r\bar{x}(1-\bar{x})+\bar{x}_{i}$$ Applying the octave code, we get the following graph: Case 1: $$x_{0}=3$$, at $$k=1$$. $$x_{0}=3$$, at $$k=2$$. $$x_{0}=3$$, at $$k=3$$. Case 2: $$x_{0}=9$$, at $$k=1$$. $$x_{0}=9$$, at $$k=$$. $$x_{0}=9$$, at $$k=3$$. 3. Backwards Euler Method The Backwards Euler Method is found by solving for $$ \bar{x}_{i+1}$$ as follows: $$ \frac{d\bar{x}}{dt}=r\bar{x}_{i+1}(1-\bar{x}_{i+1})$$ $$ \frac{\bar{x}_{i+1}-\bar{x}_{i}}{h}=r\bar{x}_{i+1}(1-\bar{x}_{i+1})$$ $$ \bar{x}_{i+1}-\bar{x}_{i}=hr\bar{x}_{i+1}(1-\bar{x}_{i+1})$$ $$ \bar{x}_{i+1}-\bar{x}_{i}=hr\bar{x}_{i+1}-hr\bar{x}_{i+1}^{2}$$ $$ \bar{x}_{i+1}-\bar{x}_{i}-hr\bar{x}_{i+1}+hr\bar{x}_{i+1}^{2}=0$$ $$ \bar{x}_{i+1}-\bar{x}_{i}-hr\bar{x}_{i+1}+hr\bar{x}_{i+1}^{2}=0$$ $$hr\bar{x}_{i+1}^{2}+\bar{x}_{i+1}(1-h)-\bar{x}_{i}=0$$ $$\bar{x}_{i+1}=\frac{(hr-1)+ \sqrt{(hr-1)^{2}+4hr\bar{x}_{i}}}{2hr}$$ $$\bar{x}_{i+1}=\frac{(hr-1)- \sqrt{(hr-1)^{2}+4hr\bar{x}_{i}}}{2hr}$$ Applying the octave code, we get the following graph: Case 1: $$x_{0}=3$$, at $$k=1$$. $$x_{0}=3$$, at $$k=2$$. $$x_{0}=3$$, at $$k=3$$. Case 2: $$x_{0}=9$$, at $$k=1$$. $$x_{0}=9$$, at $$k=$$. $$x_{0}=9$$, at $$k=3$$.

Author and proof-reader
[Author]Cavalcanti

[Proof-reader]

=Problem 7.2 - Hermite-Simpson Algorithm = From [[media:Nm1.s11.mtg40.djvu|Mtg 40-1]]

Given
Use the Hermite-Simpson algorithm to determine the trajectory of an interceptor given the following inputs.

 * $$T(t)=\left\{\begin{matrix}

6000 N, & 0\leq t< 27, & 33\leq t\leq 40\\ 1000 N, & 27\leq t< 33 & \end{matrix}\right.$$

For part 1
 * $$\alpha(t)=\left\{\begin{matrix}

0.03 rad & 0\leq t< 21\\ \frac{0.13-0.09}{27-21}(t-21)+0.09 rad & 21\leq t< 27\\ \frac{-0.2+0.13}{33-27}(t-27)-0.13 rad & 27\leq t< 33\\ \frac{-0.13+0.2}{40-33}(t-33)-0.2 rad & 33\leq t\leq 40 \end{matrix}\right.$$

For part 2
 * $$\alpha(t)=\left\{\begin{matrix}

0.03 \; rad, & 0\leq t < 21 \\ \frac{0.13-0.03}{27-21}(t-21) + 0.03 \; rad, & 21\leq t < 27 \\ \frac{-0.2+0.13}{33-27}(t-27) - 0.13 \; rad, & 27\leq t < 33 \\ - 0.2\; rad, & 33 \leq t \leq 40 \end{matrix}\right.$$

 * $$\mathbf{f}=

\begin{bmatrix} \dot{\gamma}\\ \dot{v}\\ \dot{x}\\ \dot{y} \end{bmatrix}=\begin{bmatrix}

\frac{T-D}{mv}sin(\alpha)+\frac{L}{mv}cos(\alpha)-\frac{g}{v}cos(\gamma)\\ \frac{T-D}{m}cos(\alpha)+\frac{L}{m}sin(\alpha)-gsin(\gamma)\\ vcos(\gamma)\\ vsin(\gamma) \end{bmatrix}$$

 * $$\mathbf{z}=\begin{bmatrix}

\gamma\\ v\\ x\\ y \end{bmatrix}$$

 * $$DL=\left\{\begin{matrix}

D(\alpha,v,y)=0.5C_d\rho v^2S_{ref}\\ L(\alpha,v,y)=0.5C_c\rho v^2S_{ref} \end{matrix}\right. $$

 * $$\left\{\begin{matrix}

C_d(\alpha)=A_1\alpha^2+A_2\alpha+A_3\\ C_l(\alpha)=B_1\alpha+B_2\\ \rho(y)=C_1y^2+C_2y+C_3 \end{matrix}\right.$$

 * $$\left\{\begin{matrix}

m=1005 kg\\ g=9.81 \frac{m}{s^2}\\ S_{ref}=0.3376 m^2\\ A_1=-1.9431\\ A_2=-0.1499\\ A_3=0.2359\\ B_1=21.9\\ B_2=0\\ C_1=3.312e^{-9} \frac{kg}{m^5}\\ C_2=-1.142e^{-4} \frac{kg}{m^4}\\ C_3=1.224 \frac{kg}{m^3} \end{matrix}\right.$$

 * $$t\in [0,40]$$ seconds
 * $$h=1$$ seconds

Find
1.Reproduce results of spring 2010 using the same $$T(t)$$ and $$\alpha(t)$$.Compute $$J_1=\int_{0}^{t_f}y(t)dt$$ and show that $$y(t_f)=0$$. 2.Use the same $$T(t)$$ and $$\alpha(t)$$ to plot all quantities(state variables) versus time(t).Compute $$J_2=\int_{0}^{t_f}y(t)dt$$ and show that $$y(t_f)=0$$.Also compare $$J_2$$ and $$J_1$$

Solution
The solution will be very similar to to the ones used in last term.There is however a difference,being input of alpha function.

From equation(1) on Lecture-[[media:nm1.s11.mtg38.djvu|38-3]] we get:

$$\displaystyle \mathbf{z}_{i+1} = \mathbf{z}_{i} + \frac{h/2}{3}[\mathbf{f}(\mathbf{z}_{i})+4\mathbf{f}(\mathbf{g}(\mathbf{z}_{i},\mathbf{z}_{i+1}))+\mathbf{f}(\mathbf{z}_{i+1})]$$ where, $$\displaystyle \mathbf{g}(\mathbf{z}_{i},\mathbf{z}_{i+1}) = \mathbf{z}_{i+1/2} = \frac{1}{2}\left(\mathbf{z}_{i} + \mathbf{z}_{i+1}\right) + \frac{h}{8}(\mathbf{f}(\mathbf{z}_{i}) - \mathbf{f}(\mathbf{z}_{i+1})$$

F(zi+1) can then be defined: $$
 * $$\displaystyle \mathbf{F}(\mathbf{z}_{i+1}) = \mathbf{z}_{i+1} - \mathbf{z}_{i} + \frac{h/2}{3}[\mathbf{f}(\mathbf{z}_{i})+4\mathbf{f}(\mathbf{g}(\mathbf{z}_{i},\mathbf{z}_{i+1}))+\mathbf{f}(\mathbf{z}_{i+1})] = \mathbf{0}

From Lecture [[media:nm1.s11.mtg39.djvu|39-1]] we get: $$\displaystyle \mathbf{z}_{i+1}^{(k+1)} = \mathbf{z}_{i+1}^{(k)} - [\frac{\partial \mathbf{F}(\mathbf{z}_{i+1}^{(k)})}{\partial \mathbf{z}}]^{-1}\mathbf{F}(\mathbf{z}_{i+1}^{(k)}) $$

The Jacobian is as follows: $$\displaystyle \frac{\partial \mathbf{F}}{\partial \mathbf{z}} = [\frac{\partial F_i}{\partial z_j}] $$

Matlab code for the Jacobian is as follows:

For initial values of alpha Computing $$\ J_1$$ $$ \ J_1 = 1.68*10^4 $$(for s10 values, obtained from code with alpha=1)

For Modified values of alpha Computing$$\ J_2$$. $$ \ J_2 = 9.0246*10^3 $$(for s11 values, obtained from code with alpha=2) $$ \ J_1 > J_2 $$ So, better results are obtained by using s11 values. The codes for sub functions:

Author and proof-reader
[Author] | Raghunathan

[Proof-reader]

=Problem 7.3 - Solve logistic equation using Inconsistent Trapezoidal-Simpson algorithm= From [[media:Nm1.s11.mtg41.djvu|Mtg 41-2]]

Given
The logistic equation for population dynamics is defined as follows.

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

$$ \dot{x}(t) = f(x) = rx \left(1-\frac{x}{x_{\text{max}}}\right) $$     (7-1)$$ ,where $$\displaystyle x_{\text{max}}=15;\ r = 1.4,\ $$ and $$\displaystyle t \in [0,20] $$ The analytical solution to the equation is given as follows.
 * style="width:95%" |
 * style="width:95%" |
 * $$\displaystyle
 * }

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

$$ x(t) = \frac{x_0x_{\text{max}}e^{rt}}{x_{\text{max}} + x_0(e^{rt}-1)} $$     (7-2)$$
 * style="width:95%" |
 * style="width:95%" |
 * $$\displaystyle
 * }

Find
Solve the logistic equation defined in Eq (7-1) for two initial conditions, $$\displaystyle x_0=3$$ and $$\displaystyle x_0=9 $$ using Inconsistent Trapezoidal-Simpson algorithm defined in Eq.(7-3).
 * {| style="width:100%" border="0"

$$ z_{i+1} = z_{i} + \frac{h/2}{3} \left[f_i + 4f_{(i+1/2)} +f_{i+1}\right] $$     (7-3)$$
 * style="width:95%" |
 * style="width:95%" |
 * $$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$ z_{i+1/2} = \frac{1}{2} [z_{i} + z_{i+1}] $$     (7-4)$$
 * style="width:95%" |
 * style="width:95%" |
 * $$\displaystyle
 * }

Solution
Consider the Eq.(7-1) in which $$\displaystyle f_{i+1/2}$$ is a function of $$\displaystyle z_{i}$$ and $$\displaystyle z_{i+1}$$, where $$\displaystyle z_i, z_{i+1} \rightarrow$$ values of $$\displaystyle x$$ at $$\displaystyle t = t_i$$ and $$\displaystyle t = t_{i+1}$$.

Since, this is an initial value problem, $$\displaystyle z_i$$ is known. So, Eq. (7-3) as a whole becomes a function of $$\displaystyle z_{i+1}$$ given by,
 * {| style="width:100%" border="0"

$$ \displaystyle F(z_{i+1})=0 $$     (7-5)$$ The solution to Eq. (7-5) is found using Newton-Raphson methon.
 * style="width:95%" |
 * style="width:95%" |
 * $$\displaystyle
 * }
 * {| style="width:100%" border="0"

$$ z_{i+1}^{(k+1)} = z_{i+1}^{(k)} - \left[\frac{dF(z_{i+1}^{(k)})}{dz}\right]^{-1} F(z_{i+1}^{(k)}) $$     (7-6)$$ The iteration in Newton-Raphson algorithm starts with an initial guess as $$\displaystyle z_{i+1}^{0} = z_{i}$$, is stopped when the absolute tolerance condition is satisfied as expressed in Eq. (7-7).
 * style="width:95%" |
 * style="width:95%" |
 * $$\displaystyle
 * }

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

$$ \displaystyle \text{AbsTol} = ||z_{i+1}^{(k+1)} - z_{i+1}^{(k)}|| \le 10^{-6} $$     (7-7)$$  FIRST CASE : $$\displaystyle x_0 = 3$$ Matlab code:
 * style="width:95%" |
 * style="width:95%" |
 * $$\displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

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

SECOND CASE : $$\displaystyle x_0 = 9$$ Matlab code:
 * {| style="width:100%" border="0" align="left"

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

Author and proof-reader
[Author] Shin [Proof-reader]

=References=

=Contributing members=

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: User:Egm6341.s11.team5/HW7


text:
User:Egm6341.s11.team5.oh/HW1

=Problem 1 - L'Hôpital's rule= From (meeting 3 page 1)

Given

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

f(x) = \frac{e^{x}-1}{x} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (1-1)
 * }
 * }

Find
1. Find $$\displaystyle \lim \ f(x) $$ as $$\displaystyle \ x -> 0$$

2. Plot $$\displaystyle \ f(x) \ ; \ x \in [ 0,1 ]$$

1. Find $$\displaystyle \lim \ f(x) $$ as $$\displaystyle \ x -> 0$$
 We solved this on our own

[Background Knowledge] L'Hôpital's rule

According to L'Hôpital's rule,

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

$$
 * $$\displaystyle \lim_{x\rightarrow 0} \frac{e^{x}-1}{x} \ = \ \lim_{x\rightarrow 0} \frac{e^{x}}{1} \ = \ e^{0} \ = \ 1$$
 * $$\displaystyle (1-2)
 * $$\displaystyle (1-2)
 * }
 * }

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

 * }
 * }
 * }

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

Therefore,  $$\displaystyle \ \lim_{x\rightarrow 0} \frac{e^{x}-1}{x} \ = \ 1 $$
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }

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

 * }
 * }
 * }

2. Plot
 We refered to s10.team3 matlab code but we improved obtaining range from 0 to 10

[Matlab code]

$$\displaystyle 1. \ x \ \in \ [0,1]$$ Plot.jpg

$$\displaystyle 2. \ x \ \in \ [0,10]$$ Plot2.jpg

=Problem 2 - Taylor Series Expansion= From (meeting 3 page 4)

Solution

Author and proof-reader
[Author]

[Proof-reader]

=Problem 3 - Prove IMVT= From (meeting 4 page 3)

Solution

Author and proof-reader
[Author]

[Proof-reader]

=Problem 4 - Plot and find max norm of Functions= From (meeting 5 page 3)

Solution

Author and proof-reader
[Author]

[Proof-reader]

=References=

title: User:Egm6341.s11.team5.oh/HW1


text:
Complex socio-ecological systems/Other resources

Resources and links on Resilience and Socio-Ecological Systems

Santa Fe Institute - http://santafe.edu/

Resilience Alliance website - http://www.resalliance.org/

Resilience 2011 Conference - http://resilience2011.org/

Resilient Cities Conference - http://resilient-cities.iclei.org/bonn2010/

Journal Ecology and Society - http://www.ecologyandsociety.org/

MIT website - http://web.mit.edu/research/

Systems Dynamics Society - http://www.systemdynamics.org/

Complexity Digest - networking the complexity community - http://comdig.unam.mx/

Center for the Complex Study of Systems - University of Michigan - http://www.cscs.umich.edu/

National Science Foundation Program - Dynamics of Coupled Natural and Human Systems - http://www.nsf.gov/funding/pgm_summ.jsp?pims_id=13681

Beijer International Institute for Ecological Economics - http://www.beijer.kva.se/

Intergovernmental Panel on Climate Change - http://www.ipcc.ch/

Millennium Ecosystem Assessment - http://www.millenniumassessment.org/en/Index.aspx

Encyclopedia of Life Support Systems - http://www.eolss.net/ebooklib/

Sustainable Development Institute - Wyoming University (Neil Harrison) - http://www.sd-institute.org/

John Marshall - Film A Kalahari Family on socio-ecological resilience of the Ju/'hoansi tribe http://en.wikipedia.org/wiki/John_Marshall_%28filmmaker%29

Social Networks - Wikipedia - http://en.wikipedia.org/wiki/Social_network

International Network for Social Network Analysis - http://www.insna.org/

Stockholm Resilience Centre - http://www.stockholmresilience.org/

Masters Program in Social-Ecological Resilience for Sustainable Development - Stockholm University - http://www.stockholmresilience.org/download/18.25b4e5ee12d09d118fd80008353/master-soc-eco-resilience-s-d.pdf

Revisiting Urban Resilience - lessons from the past - interesting article by Stockholm Resilience Centre on Urban Resilience looking at Constantinopla http://www.stockholmresilience.org/research/researchnews/revisitingurbanresilience.5.52012ccf12dfed3d5b480008604.html

Tyndall Centre for Climate Change Research - http://www.tyndall.ac.uk/

Stephen R. Carpenter - resilience of lakes, resilience of what to what - http://limnology.wisc.edu/personnel/carpenter/

South American Institute for Resilience and Sustainability Studies - http://www.saras-institute.org/

Elinor Ostrom wikipedia site - http://en.wikipedia.org/wiki/Elinor_Ostrom

Center for the Study of Institutional Diversity - Arizona State University - http://csid.asu.edu/

CIPEC - Center for the Study of Institutions, Population and Environmental Change- Indiana University (Bloomington) - http://www.cipec.org/about_us/index.php

The Black Swan - Dr. Nassim Taleb's webpage - http://www.fooledbyrandomness.com/

Department of Economics, University of Wisconsin (William Brock) - http://ideas.repec.org/e/pbr142.html

William Brock's home page: http://www.ssc.wisc.edu/~wbrock/

Arizona State University - Global Institute of Sustainability (Martin Anderies) http://sustainability.asu.edu/people/persbio.php?pid=4165

Debra Davidson University of Alberta - Resilience and Social Sciences - http://www.ales.ualberta.ca/re/StaffDirectory/Academics/Davidson.aspx

Lund University - Sweden (Anne Jerneck, Lennart Olsson and Alf Hornborg) - http://www.lunduniversity.lu.se/

Lennart Olsson - http://www.lucsus.lu.se/html/lennart_olsson.aspx

Santa Fe Institute short Course on Complexisty Science - http://www.santafe.edu/news/item/unm-short-course/

Santa Fe Institute Summer Program - http://www.santafe.edu/education/schools/complex-systems-summer-schools/

BLOGS

Blog Green - New York Times

http://green.blogs.nytimes.com/2011/04/06/the-rich-are-different-they-can-buy-more-sand/?partner=rss&emc=rss

Blog Resilience Alliance

http://rs.resalliance.org/2011/04/14/trend-spotting-network-analysis-is-growing-in-social-ecological-studies/

Videos and Radio Programs

Some videos in You tube:

Dr. Stephen Lansing: http://www.youtube.com/watch?v=1M42I2QgnfU

Dr. Stephen Lansing: Resilience, what is a Complex Systems Approach?

http://www.youtube.com/watch?v=QmrWfRX42ZM&NR=1

Stockholm Resilience Centre - various videos on Resilience

http://www.youtube.com/user/stockholmresilience

What is social network analysis? http://www.stockholmresilience.org/seminarandevents/whiteboardseminars/whiteboardseminarsocialnetworkanalysis.5.5ce3bd8012d79a5929580007835.html

You Tube Channel - Humming-bird group of Brazilian Amazon (interviews and presentations)

http://www.youtube.com/user/BeijaflorAmazonia?feature=mhum

Some videos of interviews with Dr. Massim Taleb - Black Swan author

Interview for the Economist

http://www.youtube.com/watch?v=7IpTpjhVo7I

10 questions - Time magazine

http://www.youtube.com/watch?v=E3bu_7Bfatg&NR=1

Ted Talks: Complex Adaptive Systems by Igor Nikolic

http://www.youtube.com/watch?v=jS0zj_dYeBE&feature=related

CHANS-NET - Video of interview with Dr. Jianguo Liu, International Network for Research on Coupled Human and Natural Systems http://www.youtube.com/watch?v=1rjDBxwnf6o

A Kalahari Family by Jonh Marshall - Trailer - http://www.youtube.com/watch?v=-VqhQPeEarE

Radio Programs in Resilience – available in iTunes Podcasts. Radio Program – A World of Possibilities Resilience: Adaptation and Transformation in Turbulent Times

http://aworldofpossibilities.org/program/resilience-adaptation-and-transformation-in-turbulent-times-0

Resilience: the capacity to absorb shocks to the system without losing the ability to function. Can whole societies become resilient in the face of traumatic change? In April 2008 natural and social scientists from around the world gathered in Stockholm, Sweden for a first-ever global conference applying lessons from nature's resilience to human societies in the throes of unprecedented transition.

Guests: Crawford Stanley (Buzz) Holling, Emeritus Eminent Scholar and Professor in Ecological Sciences, University of Florida Dr. Brian Walker, Honorary Post-retirement Fellow CSIRO Sustainable Ecosystems, Canberra, Australia Dr. Carl Folke, Editor-in-Chief Ecology and Society, Resilience Alliance, Sweden Charles Redman, Director, School of Sustainability, Arizona State University Will Steffan, Director, The Fenner School of Environment and Society, Australian National University Dr.Frances Westley, Chair, Social Innovation Generation (SiG), University of Waterloo, Ontario, Canada

The Penguin and The Leviathan: The Science and Practice of Cooperation by Yochai Benkler, 2010-10-13

Harvard professor and business author Yochai Benkler questions the centuries-old practice of managing people through incentive structures – both rewards and punishment – based on an assumption of individual selfishness. He will review examples of successful institutions – ranging from Toyota to Wikipedia – that have turned to human cooperation rather than behavior modification and control to achieve their desired ends. He shows how recent work in human behavioral and brain sciences and in evolutionary theory is helping us better understand how and why these systems work.

http://www.santafe.edu/research/videos/play/?id=06d53b42-20a9-4234-998e-ac39f676b1e9


text:
User:Xiaxiss

Numerical Methods

Extra Solution
From Taylor series:

$$ e^x = 1 + x + \frac{x^2}{2} + \frac{x^3}{6} + \frac{x^4}{24} + \frac{x^5}{120} + ... $$

Then the original fuction could be expressed as:

$$ f(x) = 1 + \frac{x}{2} + \frac{x^2}{6} + \frac{x^3}{24} + \frac{x^4}{120} + ... $$

$$ \Rightarrow \lim_{x\to 0} f(x) = 1 + \frac{0}{2} + \frac{0^2}{6} + \frac{0^3}{24} + \frac{0^4}{120} + ... =1 $$

title: User:Xiaxiss


text:
User talk:Xiaxiss

 Hello Xiaxiss, and welcome to Wikiversity! If you need help, feel free to visit my talk page, or contact us and ask questions. After you leave a comment on a talk page, remember to sign and date; it helps everyone follow the threads of the discussion. The signature icon in the edit window makes it simple. All users are expected to abide by our Privacy policy, Civility policy, and the Terms of Use while at Wikiversity.

To get started, you may

 * Take a guided tour and learn to edit.
 * Visit a (kind of) random project.
 * Browse Wikiversity, or visit a portal corresponding to your educational level: pre-school, primary, secondary, tertiary, non-formal education.
 * Find out about research activities on Wikiversity.
 * Explore Wikiversity with the links to your left.

 * Read an introduction for teachers and find out how to write an educational resource for Wikiversity.
 * Give feedback about your initial observations
 * Discuss Wikiversity issues or ask questions at the colloquium.
 * Chat with other Wikiversitans on #wikiversity-en.
 * Follow Wikiversity on twitter (http://twiter.com/Wikiversity) and identi.ca (http://identi.ca/group/wikiversity).

You don't need to be an educator to edit. You only need to be bold to contribute and to experiment with the sandbox or your userpage. See you around Wikiversity! Jtneill - Talk - c 23:01, 19 January 2011 (UTC)

 Hello , you can call me Jacob Frank. I'd like to be your mascot and welcome you to Wikiversity. Even though I was a plain and untutored man back in 18th-century Europe, that still didn't stop me from contributing my ideas to the world. Neither should it stop you. As a religious leader who developed the doctrine of "purification through transgression," my advice to you is to be bold and to ignore all rules—yes, these are two of Wikiversity's official policies! Happy editing.

title: User talk:Xiaxiss


text:
Psycholinguistics/Semantic processing of syntactic structure in sentence comprehension

Semantic Processing of Syntactic Structure in Comprehension: The Differences and Similarity of Semantic and Syntactic in Chinese and English

The purpose of this research paper is to explore the differences and similarity of semantic and syntactic in Chinese and English. I will talk about the main differences of Chinese and English. Such as English is alphabetic language and it associates with phonemes. Chinese is morphological language which is structured by graphic units. Also these two languages have very different grammar systems. All these differences can effect how brain processes information. (200 words)

Part 1: I will talk about differences and similarity of semantic and syntactic in Chinese and English. (1200 words).

•	Briefly explain the grammar systems in Chinese, what is the differ from English.

•	How researchers design studies to find the processing in English speakers.

•	How researchers design studies to find the processing in Chinese speakers.

•	Compare the results from these studies, and find what are the differences and similarity.

Part 2: I will briefly talk about brain activation in the processing of Chinese and English. (300words)

•	English: left hemisphere, special for right hand people.

•	Chinese: more activate in right parts of brain. Different part of the right brain work together to process information.

Part 3: Discussion (300 words )

•	Talk about the value of doing these types of research.

•	The limitations of the contemporary studies.

•	Future directions.


text:
User:Eml5526.s11.team4

= EML 5526, Spring 2011, Team 4=

Course WIKI http://en.wikiversity.org/wiki/User:Eml5526.s11

Course Lecture Plan http://en.wikiversity.org/wiki/User:Eml5526.s11/Lecture_plan

Course Report Table http://en.wikiversity.org/wiki/User:Eml5526.s11/Report_table

Google Group http://groups.google.com/group/eml5526s11team4/

= Homework Assignment Table =

Homework problem groups are rotated per assignment.

Homework 1
Homework 1

Homework 2
Homework 2

Homework 3
Homework 3

Homework 4
Homework 4

Homework 5
Homework 5

Homework 6
Homework 6

Homework 7
Homework 7

title: User:Eml5526.s11.team4


text:
User:Eml5526.s11.team4/HW1

= Problem 1.1 - Dynamic Response =

Problem Statement

1.1 Derive the following dynamic response of an elastic bar with variable cross-section such as the one shown in the figure

subject to the boundary conditions

and initial conditions

1.2 Repeat for a rectangular cross section

Solution
Starting with D'Alembert's principle,

where

 * $$\mathbf {F}_i$$ || are the applied forces,
 * $$\delta \mathbf r_i$$ || is the virtual displacement of the system, consistent with the constraints,
 * $$ m_i \scriptstyle$$ || are the masses of the particles in the system,
 * $$\mathbf a_i$$ || are the accelerations of the particles in the system,
 * $$m_i \mathbf a_i$$ || together as products represent the time derivatives of the system momenta, and
 * $$i$$ || is an integer used to indicate (via subscript) a variable corresponding to a particular particle.
 * }
 * $$\mathbf a_i$$ || are the accelerations of the particles in the system,
 * $$m_i \mathbf a_i$$ || together as products represent the time derivatives of the system momenta, and
 * $$i$$ || is an integer used to indicate (via subscript) a variable corresponding to a particular particle.
 * }
 * $$i$$ || is an integer used to indicate (via subscript) a variable corresponding to a particular particle.
 * }

The three force contributions are $$N(x+dx)$$, $$N(x)$$, and $$f(x)dx$$. There is one body, the differential body with a mass $$ A(x) \rho(x) dx$$. Note that the differential body mass is approximated and has an error before the limit is taken.

dividing by $$dx$$

Taking the limit

Noting that $$dx$$ changes from the finite difference as shown in the figure to a differential difference.

Dividing the normal force, $$N(x)$$, by the area, $$A(x)$$, yields the stress $$\sigma(x)$$.

In one dimension the strain is

Bringing in Hooke's law

From (1.7) and (1.9)

Substituting into (1.6)

where $$A(x)\rho(x)=m(x)$$ and $$ m(x) $$ is the linear mass density.

Equation (1.1) has been derived.

Problem Statement

Discuss the specific case where the elastic bar from homework problem 1.1 has a rectangular cross section. The cross section is defined as shown in the figure below, where the height $$h(x)$$ varies with axial position. The base $$b$$ is constant for the entire bar.

Solution
Starting with Equation 1.6 which is in a general form,

the area term $$A(x)$$ can be modified for the more specific case of a rectangular cross section. The cross sectional area is given by:

Using the equation for the area of a trapezoid, the mass per unit length $$m(x)$$ can be written as:

where $$\rho$$ is the density. The mid-point of the differential element is used to approximate the density.

Given that:

It should be noted that the normal force terms $$N(x)$$ and $$N(x+dx)$$ contain an area dependence as shown previously in Equations 1.7-1.9. With this in mind, Equation 1.9 and Equation 2.2 can be substituted together into Equation 1.6 to produce:

which is the force balance for an elastic bar with a rectangular cross section.

Again taking the limit:

produces the following Equation 2.6. As noted previously in problem 1, $$dx$$ changes from the finite difference to a differential difference.

Using Equation 1.7 and Equation 1.12, Equation 2.7 is produced.

A simple back substitution of Equation 2.1 into Equation 2.7 yields:

Where $$ A(x)\rho(x)=m(x)$$, Equation 1.1 has again been derived.

title: User:Eml5526.s11.team4/HW1


text:
Category:Wikiversity projects

ar:تصنيف:مشاريع ويكي الجامعة

title: Category:Wikiversity projects


text:
Category talk:HLA CWD Alleles

Created on 14 Dec 2010. PCano 01:05, 20 January 2011 (UTC)

title: Category talk:HLA CWD Alleles


title: File:DRB1-1117.gif


title: File:DRB1-1119.gif


title: File:DRB1-1139.gif


title: File:DRB1-1201.gif


title: File:DRB1-1202.gif


title: File:DRB1-1301.gif


title: File:DRB1-1302.gif


title: File:DRB1-1303.gif


title: File:DRB1-1304.gif


title: File:DRB1-1305.gif


title: File:DRB1-1306.gif


title: File:DRB1-1307.gif


title: File:DRB1-1310.gif


title: File:DRB1-1311.gif


title: File:DRB1-1312.gif


title: File:DRB1-1315.gif


title: File:DRB1-1320.gif


title: File:DRB1-1331.gif


title: File:DRB1-1336.gif


title: File:DRB1-1401.gif


title: File:DRB1-1402.gif


title: File:DRB1-1403.gif


title: File:DRB1-1404.gif


title: File:DRB1-1405.gif


title: File:DRB1-1406.gif


title: File:DRB1-1407.gif


title: File:DRB1-1408.gif


title: File:DRB1-1411.gif


title: File:DRB1-1412.gif


title: File:DRB1-1413.gif


title: File:DRB1-1414.gif


title: File:DRB1-1415.gif


text:
User talk:Iggy64

 Hello Iggy64, and welcome to Wikiversity! If you need help, feel free to visit my talk page, or contact us and ask questions. After you leave a comment on a talk page, remember to sign and date; it helps everyone follow the threads of the discussion. The signature icon in the edit window makes it simple. All users are expected to abide by our Privacy policy, Civility policy, and the Terms of Use while at Wikiversity.

To get started, you may

 * Take a guided tour and learn to edit.
 * Visit a (kind of) random project.
 * Browse Wikiversity, or visit a portal corresponding to your educational level: pre-school, primary, secondary, tertiary, non-formal education.
 * Find out about research activities on Wikiversity.
 * Explore Wikiversity with the links to your left.

 * Read an introduction for teachers and find out how to write an educational resource for Wikiversity.
 * Give feedback about your initial observations
 * Discuss Wikiversity issues or ask questions at the colloquium.
 * Chat with other Wikiversitans on #wikiversity-en.
 * Follow Wikiversity on twitter (http://twiter.com/Wikiversity) and identi.ca (http://identi.ca/group/wikiversity).

You don't need to be an educator to edit. You only need to be bold to contribute and to experiment with the sandbox or your userpage. See you around Wikiversity! --Abd 03:28, 20 January 2011 (UTC)

title: User talk:Iggy64


text:
User talk:Eml5526.s11.team4

 Hello Eml5526.s11.team4, and welcome to Wikiversity! If you need help, feel free to visit my talk page, or contact us and ask questions. After you leave a comment on a talk page, remember to sign and date; it helps everyone follow the threads of the discussion. The signature icon in the edit window makes it simple. All users are expected to abide by our Privacy policy, Civility policy, and the Terms of Use while at Wikiversity.

To get started, you may

 * Take a guided tour and learn to edit.
 * Visit a (kind of) random project.
 * Browse Wikiversity, or visit a portal corresponding to your educational level: pre-school, primary, secondary, tertiary, non-formal education.
 * Find out about research activities on Wikiversity.
 * Explore Wikiversity with the links to your left.

 * Read an introduction for teachers and find out how to write an educational resource for Wikiversity.
 * Give feedback about your initial observations
 * Discuss Wikiversity issues or ask questions at the colloquium.
 * Chat with other Wikiversitans on #wikiversity-en.
 * Follow Wikiversity on twitter (http://twiter.com/Wikiversity) and identi.ca (http://identi.ca/group/wikiversity).

You don't need to be an educator to edit. You only need to be bold to contribute and to experiment with the sandbox or your userpage. See you around Wikiversity! --Abd 03:31, 20 January 2011 (UTC)

title: User talk:Eml5526.s11.team4


text:
User talk:Tjstewar

 Hello Tjstewar, and welcome to Wikiversity! If you need help, feel free to visit my talk page, or contact us and ask questions. After you leave a comment on a talk page, remember to sign and date; it helps everyone follow the threads of the discussion. The signature icon in the edit window makes it simple. All users are expected to abide by our Privacy policy, Civility policy, and the Terms of Use while at Wikiversity.

To get started, you may

 * Take a guided tour and learn to edit.
 * Visit a (kind of) random project.
 * Browse Wikiversity, or visit a portal corresponding to your educational level: pre-school, primary, secondary, tertiary, non-formal education.
 * Find out about research activities on Wikiversity.
 * Explore Wikiversity with the links to your left.

 * Read an introduction for teachers and find out how to write an educational resource for Wikiversity.
 * Give feedback about your initial observations
 * Discuss Wikiversity issues or ask questions at the colloquium.
 * Chat with other Wikiversitans on #wikiversity-en.
 * Follow Wikiversity on twitter (http://twiter.com/Wikiversity) and identi.ca (http://identi.ca/group/wikiversity).

You don't need to be an educator to edit. You only need to be bold to contribute and to experiment with the sandbox or your userpage. See you around Wikiversity! --Abd 03:33, 20 January 2011 (UTC)

title: User talk:Tjstewar


text:
User talk:Nanepallisrikanth

 Hello Nanepallisrikanth, and welcome to Wikiversity! If you need help, feel free to visit my talk page, or contact us and ask questions. After you leave a comment on a talk page, remember to sign and date; it helps everyone follow the threads of the discussion. The signature icon in the edit window makes it simple. All users are expected to abide by our Privacy policy, Civility policy, and the Terms of Use while at Wikiversity.

To get started, you may

 * Take a guided tour and learn to edit.
 * Visit a (kind of) random project.
 * Browse Wikiversity, or visit a portal corresponding to your educational level: pre-school, primary, secondary, tertiary, non-formal education.
 * Find out about research activities on Wikiversity.
 * Explore Wikiversity with the links to your left.

 * Read an introduction for teachers and find out how to write an educational resource for Wikiversity.
 * Give feedback about your initial observations
 * Discuss Wikiversity issues or ask questions at the colloquium.
 * Chat with other Wikiversitans on #wikiversity-en.
 * Follow Wikiversity on twitter (http://twiter.com/Wikiversity) and identi.ca (http://identi.ca/group/wikiversity).

You don't need to be an educator to edit. You only need to be bold to contribute and to experiment with the sandbox or your userpage. See you around Wikiversity! --Abd 03:36, 20 January 2011 (UTC)

title: User talk:Nanepallisrikanth


text:
User:Eml5526.s11.team6.vork

=Problem 6.5 Solve G2DM1.0/D1 using 2D LIBF(Lagrange Interpolation Basis Function)=

Given
The G2Dm1.0/D1 PDE

where: $$\left[ \right]$$ is an identity matrix The essential boundary condition is $$g(x,t) = 2\ \ \ \ on\ \ \ \ \partial \Omega $$.

Find
1a) Solve G2DM1.0/D1 using 2D LIBF until accuracy $${10^{ - 6}}$$ at center (x,y)=(0,0) for steady state and $$f(x) = 1\ \ \ \ in\ \ \ \ \Omega = \square $$.

1b1) Solve G2DM1.0/D1 using 2D LLEBF with uniform mesh until accuracy $${10^{ - 6}}$$ at center (x,y)=(0,0) for steady state and $$f(x) = 1\ \ \ \ in\ \ \ \ \Omega = \square $$.

1b2) Solve G2DM1.0/D1 using 2D LLEBF with non-uniform mesh until accuracy $${10^{ - 6}}$$ at center (x,y)=(0,0) for steady state and $$f(x) = 1\ \ \ \ in\ \ \ \ \Omega = \square $$.

2a) Solve G2DM1.0/D1 using 2D LIBF until accuracy $${10^{ - 6}}$$ at center (x,y)=(0,0) for transient state and $$f(x) = 0\ \ \ \ in\ \ \ \ \Omega = \square $$.

2b1) Solve G2DM1.0/D1 using 2D LIBF until accuracy $${10^{ - 6}}$$ at center (x,y)=(0,0) for transient state and $$f(x) = 1\ \ \ \ in\ \ \ \ \Omega = \square $$.

2b2a) Solve G2DM1.0/D1 using 2D LLEBF with uniform mesh until accuracy $${10^{ - 6}}$$ at center (x,y)=(0,0) for transient state and $$f(x) = 1\ \ \ \ in\ \ \ \ \Omega = \square $$.

2b2a) Solve G2DM1.0/D1 using 2D LLEBF with non-uniform mesh until accuracy $${10^{ - 6}}$$ at center (x,y)=(0,0) for transient state and $$f(x) = 1\ \ \ \ in\ \ \ \ \Omega = \square $$.

Solution
For Eq.6.5.1, we can write the weak form

1a) 2D LIBF
For 2D LIBF, we choose Lagrange Interpolation Basis Function for each element. For example, we choose n=m=2

 * $$N_{I}(x,y)=L_{i,m}(x)\cdot L_{j,n}(y),\;\; where \;\;I=i+(j-1)m$$

After substituting Eq.7.1.3 into Eq.7.1.2 in which Lagrange Interpolation Basis Function are both trial function and weight function, we integrate over the whole domain to obtain the capacitance, conductance, and flux matrices. These matrices are used to achieve final results for the temperatures at each node using the following Matlab codes.

1b) 2D LLEBF
For the 2D LLEBF case, we choose Linear Lagrange elemental basis functions for each element, i.e.,

After substituting Eq.7.1.4 into Eq.7.1.2 in which Linear Lagrange elemental basis function are both trial function and weight function, we integrate over the whole domain to obtain the capacitance, conductance, and flux matrices. These matrices are used to achieve final results for the temperatures at each node using the following Matlab codes.

1b1) Uniform Mesh
The first solution is calculated using a uniform mesh (a mesh where the nodes are equidistant from each other).

One sign that the solution was correctly coded is that the essential boundary conditions are met in these figures. Notice that along the edges of the temperature distribution graph the temperature is equal to 2. Additionally, because there is a positive heat source within the boundaries of our model we would expect the temperature to rise from the boundaries of the model, which is also apparent. These are good indicators that the solution provided is correct, or at least we are heading in the correct direction.

1b2) Non-Uniform Mesh
The second solution is calculated using a non-uniform mesh (an irregularly shaped mesh that displays the abilities of the robust code adopted from the textbook by Fish and Belytschko).

Similarly, the same boundary conditions are evident, and the rise in temperature in the center of the object is obvious.

title: User:Eml5526.s11.team6.vork