User:Egm6341.s10.team3.Min/HW2

= (2) Derive the Simple Simpson's rule = Ref: Lecture Notes [[media:Egm6341.s10.mtg9.pdf|p.9-1]]

Problem Statement
Use (4) in [[media:Egm6341.s10.mtg8.pdf|Lecture p.8-3]]to derive the Simple Simpson's rule (2) [[media:Egm6341.s10.mtg7.pdf|Lecture p.7-2]]

Solution
We use (4) in [[media:Egm6341.s10.mtg8.pdf|Lecture p.8-3]] to derive the left side of simple simpson's equation as follows:
 * {| style="width:100%" border="0" align="left"

I_2 & = \int_{a}^{b} P_2(x)\ dx \\ & = \int_{a}^{b} \sum_{i=0}^{2}l_i(x)f(x_i)\ dx \\ & = \int_{a}^{b} l_0(x)f(x_0) + l_1(x)f(x_1) + l_2(x)f(x_2)\ dx \\ & = f(x_0)\int_{a}^{b} l_0(x)\ dx + f(x_1)\int_{a}^{b} l_1(x)\ dx + f(x_2)\int_{a}^{b} l_2(x)\ dx \end{align} $$ $$
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 * $$\displaystyle (Eq. 1)
 * }
 * }

Where $$ x_0 = a, x_1 = \frac{a+b}{2}, x_2 = b $$

Next is to do the integration of $$ {l_0(x), l_1(x),  l_2(x)} $$


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

\int_{a}^{b} l_0(x)\ dx & = \int_{a}^{b}\frac{(x-x_1)(x-x_2)}{(x_0-x_1)(x_0-x_2)}\ dx \\ & = \int_{a}^{b}\frac{(x-\frac{a+b}{2})(x-b)}{(a-\frac{a+b}{2})(a-b)}\ dx \\ & = \frac{2}{(b-a)^2}\left [ \frac{x^3}{3} - \frac{a+3b}{4}x^2 + \frac{b(a+b)}{2}x \right ]_{a}^b \\ & = \frac{2}{(b-a)^2} \left [ \frac{(b-a)(b^2 + ab + a^2)}{3} - \frac{a+3b}{4}(b-a)(b+a) + \frac{b(a+b)}{2}(b-a) \right ] \\ & = \frac{2}{(b-a)} \left [ \frac{(b^2 + ab + a^2)}{3} - \frac{a+3b}{4}(b+a) + \frac{b(a+b)}{2} \right ] \\ & = \frac{(b-a)^2}{6(b-a)} \\ & = \frac{b-a}{6}\\ \end{align} $$ $$
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 * $$\displaystyle (Eq. 2)
 * }
 * }


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

\int_{a}^{b} l_1(x)\ dx & = \int_{a}^{b}\frac{(x-x_0)(x-x_2)}{(x_1-x_0)(x_1-x_2)}\ dx \\ & = \int_{a}^{b}\frac{(x-a)(x-b)}{(\frac{a+b}{2}-a)(\frac{a+b}{2}-b)}\ dx \\ & = \frac{4}{(b-a)(a-b)}\left [ \frac{x^3}{3} - \frac{a+b}{2}x^2 + abx \right ]_{a}^b \\ & = \frac{4}{(b-a)(a-b)}\left [ \frac{(b-a)(b^2+ab+a^2)}{3} - \frac{(a+b)(a+b)(a-b)}{2} + ab(b-a) \right ]_{a}^b \\ & = \frac{4}{(a-b)}\left [ \frac{(b^2+ab+a^2)}{3} - \frac{(a+b)(a+b)}{2} + ab \right ]_{a}^b \\ & = \frac{2(b-a)^2}{3(b-a)} \\ & = \frac{2(b-a)}{3}\\ \end{align} $$ $$
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 * $$\displaystyle (Eq. 3)
 * }
 * }


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

\int_{a}^{b} l_2(x) \ dx & = \int_{a}^{b}\frac{(x-x_0)(x-x_1)}{(x_2-x_0)(x_2-x_1)}\ dx \\ & = \int_{a}^{b}\frac{(x-a)(x-\frac{a+b}{2})}{(b-a)(b-\frac{a+b}{2})}\ dx \\ & = \frac{2}{(b-a)^2}\left [ \frac{x^3}{3} - \frac{3a+b}{4}x^2 + \frac{a(a+b)}{2}x \right ]_{a}^b \\ & = \frac{2}{(b-a)^2} \left [ \frac{(b-a)(b^2 + ab + a^2)}{3} - \frac{3a+b}{4}(b-a)(b+a) + \frac{b(a+b)}{2}(b-a) \right ] \\ & = \frac{2}{(b-a)} \left [ \frac{(b^2 + ab + a^2)}{3} - \frac{3a+b}{4}(b+a) + \frac{b(a+b)}{2} \right ] \\ & = \frac{(b-a)^2}{6(b-a)} \\ & = \frac{b-a}{6}\\ \end{align} $$ $$
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 * $$\displaystyle (Eq. 4)
 * }
 * }

Use Eq.1, Eq.2, Eq.3 and Eq.4, we have:


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

$$ \displaystyle \begin{align} \Rightarrow \ I_2 & = \frac{b-a}{6}f(x_0)+\frac{2(b-a)}{3}f(x_1)+\frac{b-a}{6}f(x_2)\\ & = \frac{b-a}{6}[f(x_0)+4f(x_1)+f(x_2)]\\ & = \frac{h}{3}[f(x_0)+4f(x_1)+f(x_2)] \end{align} $$ Where $$h = \frac{b-a}{2}$$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = |
 * }

= (7) Show Derivation of $$q_{n+1}^{(n+1)}(x)$$ = Ref: Lecture Notes [[media:Egm6341.s10.mtg12.pdf|p.12-3]]

Problem Statement
Show derivation that
 * {| style="width:100%" border="0" align="left"

$$ 
 * $$\displaystyle q_{n+1}^{(n+1)}(x) = (n+1)!
 * $$\displaystyle q_{n+1}^{(n+1)}(x) = (n+1)!
 * }

Solution
From (4) in [[media:Egm6341.s10.mtg10.pdf|p.10-1]]we have:


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

$$ $$ q_{n+1} $$ is a n+1 polynomial, for simplicity, we express $$q_{n+1}(x)$$ as follows:
 * $$\displaystyle q_{n+1}(x) = (x-x_0)(x-x_1)\ldots (x-x_n)
 * $$\displaystyle q_{n+1}(x) = (x-x_0)(x-x_1)\ldots (x-x_n)
 * }
 * {| style="width:100%" border="0" align="left"

$$ Then the derivation of $$q_{n+1}$$ from (1) to (n+1) is shown as follows:
 * $$\displaystyle q_{n+1}(x) = x^{n+1}+c_n x^{n}+c_{n-1}x^{n-1}\ldots+ c_{1}x + c_0
 * $$\displaystyle q_{n+1}(x) = x^{n+1}+c_n x^{n}+c_{n-1}x^{n-1}\ldots+ c_{1}x + c_0
 * }
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle q_{n+1}^{(1)}(x) = (n+1)x^n + nc_nx^{n-1} + (n-1)c_{n-1}x^{n-2}\ldots+c_1+0
 * $$\displaystyle q_{n+1}^{(1)}(x) = (n+1)x^n + nc_nx^{n-1} + (n-1)c_{n-1}x^{n-2}\ldots+c_1+0
 * }
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle q_{n+1}^{(2)}(x) = (n+1)(n)x^{n-1} + n(n-1)c_nx^{n-2} + (n-1)(n-2)c_{n-1}x^{n-3}\ldots+0+0
 * $$\displaystyle q_{n+1}^{(2)}(x) = (n+1)(n)x^{n-1} + n(n-1)c_nx^{n-2} + (n-1)(n-2)c_{n-1}x^{n-3}\ldots+0+0
 * }
 * {| style="width:100%" border="0" align="left"


 * $$\displaystyle \dots \dots$$
 * }
 * }
 * {| style="width:100%" border="0" align="left"


 * $$\displaystyle \dots \dots$$
 * }
 * }
 * {| style="width:100%" border="0" align="left"


 * $$\displaystyle \dots \dots$$
 * }
 * }
 * {| style="width:100%" border="0" align="left"

q_{n+1}^{(n)}(x) = (n+1)(n)(n-1)\ldots (2)x + 0 + \ldots+0+0 $$ 
 * $$\displaystyle
 * $$\displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle \Rightarrow \ q_{n+1}^{(n+1)}(x) = (n+1)(n)(n-1)\ldots (2)(1) + 0 + \ldots+0+0 = (n+1)! $$ 
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = |
 * }

= (12) Show Derivation of $$\alpha^{(1)}(t) $$= Ref: Lecture Notes [[media:Egm6341.s10.mtg15.pdf|p.15-1]]

Problem Statement
Show derivation that
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle \alpha^{(1)}(t)= F(-t) + F(t)
 * $$\displaystyle \alpha^{(1)}(t)= F(-t) + F(t)
 * style = |
 * }

Solution
From (4) in [[media:Egm6341.s10.mtg14.pdf|p.14-2]], we can write down the expression of $$ \alpha(t) $$
 * {| style="width:100%" border="0" align="left"

\alpha(t)& = \int_{-t}^k f(x(t))\, dt + \int_{k}^{+t} f(x(t))\,dt\\ & = \int_{-t}^k F(t)\, dt + \int_{k}^{+t} F(t)\,dt\\ & = \left [ \frac{F^2(t)}{2} \right ]_{-t}^k + \left [ \frac{F^2(t)}{2} \right ]_k^t \\ & = \frac{F^2(k)-F^2(-t)}{2}+\frac{F^2(t)-F^2(k)}{2}\\ & = \frac{1}{2}[F^2(t)-F^2(-t)]\\ \end{align} $$ The first derivation of $$\alpha(t)$$ is as follows:
 * $$\displaystyle \begin{align}
 * $$\displaystyle \begin{align}
 * }


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

$$\displaystyle \Rightarrow \ \alpha^{(1)}(t) = \frac{1}{2}[2F(t)-2F(-t)(-1)] = F(t)+F(-t) $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = |
 * }