User:Egm6341.s2010.Team1/HW2

=Problem 9-1(1)=

Find
Use Eq. (3) [[media:Egm6341.s10.mtg8.pdf|Lec. 8-3]] and Eq. (1) [[media:Egm6341.s10.mtg8.pdf|Lec. 8-3]] to find expression for $$C_0,C_1,C_2 \,$$ in terms of $$(x_i,f(x_i)), i=0,1,2 \,$$

Given
Eq. (3) [[media:Egm6341.s10.mtg8.pdf|Lec. 8-3]]
 * $$P_2(x)=\sum _{i=0}^{2}l_i(x)f(x_i)$$

Eq. (1) [[media:Egm6341.s10.mtg8.pdf|Lec. 8-3]]
 * $$f_{2}\left ( x \right )=p_{2}\left ( x \right )=C_2 x^2+C_1 x^1+C_0, C_0,C_1,C_2= 3 unknowns \,$$

Solution
From Eq. (2) [[media:Egm6341.s10.mtg7.pdf|Lec. 7-3]]
 * $$l_{i,n}\left ( x \right )=l_{i}\left ( x \right )=\prod_{j=0,j\neq i}^n\frac{x-x_j}{x_i-x_j}$$

Then
 * $$l_{0}\left ( x \right )=\frac{(x-x_1)(x-x_2)}{(x_0-x_1)(x_0-x_2)}$$
 * $$l_{1}\left ( x \right )=\frac{(x-x_0)(x-x_2)}{(x_1-x_0)(x_1-x_2)}$$
 * $$l_{2}\left ( x \right )=\frac{(x-x_0)(x-x_1)}{(x_2-x_0)(x_2-x_1)}$$

Also From Eq. (3) [[media:Egm6341.s10.mtg8.pdf|Lec. 8-3]]
 * $$P_2(x)=\sum _{i=0}^{2}l_i(x)f(x_i)$$


 * $$\Rightarrow P_2(x)=\sum _{i=0}^{2}l_i(x)f(x_i)=l_{0}\left ( x \right )f(x_0)+l_{1}\left ( x \right )f(x_1)+l_{2}\left ( x \right )f(x_2)=C_2 x^2+C_1 x^1+C_0 $$


 * $$\Rightarrow C_2=\frac{f(x_0)}{(x_0-x_1)(x_0-x_2)}+\frac{f(x_1)}{(x_1-x_0)(x_1-x_2)}+\frac{f(x_2)}{(x_2-x_0)(x_2-x_1)}$$
 * $$\Rightarrow C_1=\frac{-f(x_0)(x_1+x_2)}{(x_0-x_1)(x_0-x_2)}+\frac{-f(x_1)(x_0+x_2)}{(x_1-x_0)(x_1-x_2)}+\frac{-f(x_2)(x_0+x_1)}{(x_2-x_0)(x_2-x_1)}$$
 * $$\Rightarrow C_0=\frac{f(x_0)(x_1x_2)}{(x_0-x_1)(x_0-x_2)}+\frac{f(x_1)(x_0x_2)}{(x_1-x_0)(x_1-x_2)}+\frac{f(x_2)(x_0x_1)}{(x_2-x_0)(x_2-x_1)}$$


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


 * style="width:50%; padding:10px; border:2px solid #8888aa" |
 * $$ \displaystyle
 * $$ \displaystyle

C_2=\frac{f(x_0)}{(x_0-x_1)(x_0-x_2)}+\frac{f(x_1)}{(x_1-x_0)(x_1-x_2)}+\frac{f(x_2)}{(x_2-x_0)(x_2-x_1)}$$
 * $$ \displaystyle

C_1=\frac{-f(x_0)(x_1+x_2)}{(x_0-x_1)(x_0-x_2)}+\frac{-f(x_1)(x_0+x_2)}{(x_1-x_0)(x_1-x_2)}+\frac{-f(x_2)(x_0+x_1)}{(x_2-x_0)(x_2-x_1)}$$
 * $$ \displaystyle

C_0=\frac{f(x_0)(x_1x_2)}{(x_0-x_1)(x_0-x_2)}+\frac{f(x_1)(x_0x_2)}{(x_1-x_0)(x_1-x_2)}+\frac{f(x_2)(x_0x_1)}{(x_2-x_0)(x_2-x_1)}$$

$$
 * $$\displaystyle
 * }
 * }

Solution for problem 9-1(1): Egm6341.s10.team1.lei 19:50, 1 March 2010 (UTC)

=Problem 9-2(2)=

Statement
$$f\left( x \right)=\!\frac{e^x-1}{x}\,\,on\,\,[\!\,0,1\,]\!$$

$$x_0=\!a=\!0,\,x_n=\!b=\,1$$

Consider $$n=\!1,2,4,8,16$$

Constr. $$f_n\left( x \right)=\,\sum_{i=0}^{n}l_{i,n}\left ( x \right)f\left ( x_i \right)$$

Plot $$f.\!\,\, f_n, n=\!1,\,2,\,4,\,8,\,16$$

Comp. $$ I_n=\!\int_{a}^{b}f_n\left ( x \right)dx,\,n=\!1,2,4,8\,$$ and compare to $$ I\!$$

For $$ n=\!4\,$$, plot $$\,l_0,\,l_1,\,l_2 $$ why not $$\,l_3,\,l_4,\,$$ also $$2\,$$

Solution

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


 * Ref: Lecture Notes [[media:Egm6341.s10.mtg7.pdf|P7-3]]
 * }
 * }

MATLAB
Plot $$f.\!\,\, f_n, n=\!1,\,2,\,4,\,8,\,16:\!$$



For $$ n=\!4\,$$, plot $$\,l_0,\,l_1,\,l_2 $$ why not $$\,l_3,\,l_4,\,$$



For $$ n=\!2\,$$, plot $$\,l_0,\,l_1,\,l_2 \,$$



Solution for problem 9-2(2): EGM6341.s10.Team1.Ya-Chiao Chang19:24, 10 February 2010 (UTC)

Proofread problem 9-2(2):

= Problem 9-3(1): Simple to Composite Trapezoidal and Simpson Rules =

Given
Given the simple Trapezoidal:


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle I_1=\dfrac{b-a}{2}[f(a)+f(b)]


 * }
 * }

Find
Find the Composite Trapezoidal rule


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle I_n=\dfrac{b-a}{n}[\dfrac{1}{2}f_1+f_2+f_3+...+f_{n-1}+\dfrac{1}{2}f_n]


 * }
 * }

Where:



f_1=f(a), $$



f_n=f(b) $$

Solution
Simple trapezoidal rule uses only one trapezoid to calculate area underneath a function extending this principle to more than one trapezoid leads to the composite function.

The area of a trapezoid is:


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle Area=(b-a)\dfrac{h_1+h_2}{2}


 * }
 * }

Where $$h_1$$ and $$h_2$$ would be $$f(a)$$ and $$f(b)$$ respectively

Assuming five equal width trapezoids the base of each would be $$\dfrac{b-a}{5}$$:


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle \Rightarrow I_5=\dfrac{b-a}{5}(\dfrac{f_1+f_2}{2}+\dfrac{f_2+f_3}{2}+\dfrac{f_3+f_4}{2}+\dfrac{f_4+f_5}{2})


 * }
 * }

Collecting like terms


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle I_5=\dfrac{b-a}{5}(\dfrac{1}{2}f_1+f_2+f_3+f_4+\dfrac{1}{2}f_5)


 * }
 * }

Which displays a recognizable patter


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle I_n=\dfrac{b-a}{n}(\dfrac{1}{2}f_1+f_2+...+f_{n-1}+\dfrac{1}{2}f_n)

--Egm6341.s10.team1.toddmock 19:57, 1 March 2010 (UTC)
 * }.
 * }.

= Problem 9-3(2): Simple to Composite Trapezoidal and Simpson Rules =

Given
The simple Simpson's rule:


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle I_2=\dfrac{h}{3}[f_0+4f_1+f_2]


 * }.
 * }.

where $$h=\dfrac{b-a}{n}$$ in this case $$n=2$$

Find
Find the composite Simpson's rule known to be


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle I_2=\dfrac{h}{3}[f_0+4f_1+2f_2+4f_3+2f_4+...2f_{n-2}+4f_{n-1}+f_n]


 * }.
 * }.

where $$h=\dfrac{b-a}{n}$$

Solution
The simple Simpson's rule comes from calculation of the area underneath a polynomial using two sections

Repeating the pattern of the simple Simpson's rule will yield the composite rule. So if the same function from above is instead split into 5 equal sections then we have the following.



calculation for 2 sets of the sections $$[x_0,x_2]$$ and $$[x_2,x_4]$$ we will obtain


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle I([x_0,x_2])=\dfrac{h}{3}[f_0+4f_1+f_2]


 * }
 * }

and


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle I([x_2,x_4])=\dfrac{h}{3}[f_2+4f_3+f_4]
 * }
 * }

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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle I([x_0,x_4])=\dfrac{h}{3}[f_0+4f_1+2f_2+4f_3+f_4]
 * }
 * }

Thus producing the obvious pattern


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

$$ $$ --Egm6341.s10.team1.toddmock 19:57, 1 March 2010 (UTC)
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle I_n=\dfrac{h}{3}[f_0+4f_1+2f_2+4f_3+...+2f_{n-2}+4f_{n-1}+f_n]
 * }
 * }

=Problem 11-1=

--Egm6341.s10.team1.andrewdugan 20:26, 1 March 2010 (UTC)

=Problem 12-2=

Statement
Why :$$E_{n}^{n+1}\left ( x \right )=F^{n+1}\left ( x \right)-0$$

Solution

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


 * Ref: Lecture Notes [[media:Egm6341.s10.mtg6.pdf|P6-4]], [[media:Egm6341.s10.mtg7.pdf|P7-3]]
 * }
 * }

From [[media:Egm6341.s10.mtg6.pdf|P6-4]]

\begin{align} \\E_{n} &= I-I_{n}\; \\ &= \int_{0}^{1}f\left ( x \right )dx-\int_{0}^{1}f_{n}\left ( x \right )dx\,. \end{align} $$

the first derivative of $$E_{n}\,$$ is


 * $$E_n^{1}=\int_{0}^{1}f^{1}\left ( x \right )dx-\int_{0}^{1}f_{n}^{1}\left ( x \right )dx\,$$

the second derivative of $$E_{n}\,$$ is


 * $$E_n^{2}=\int_{0}^{1}f^{2}\left ( x \right )dx-\int_{0}^{1}f_{n}^{2}\left ( x \right )dx\,$$


 * {| style=text-align:center


 * width=2% | $$.\,$$
 * width=2% | $$.\,$$
 * width=2% | $$.\,$$
 * }
 * width=2% | $$.\,$$
 * }
 * }
 * }


 * $$E_n^{n}=\int_{0}^{1}f^{n}\left ( x \right )dx-\int_{0}^{1}f_{n}^{n}\left ( x \right )dx\,$$


 * $$E_n^{n+1}=\int_{0}^{1}f^{n+1}\left ( x \right )dx-\int_{0}^{1}f_{n}^{n+1}\left ( x \right )dx\,$$

From [[media:Egm6341.s10.mtg7.pdf|P7-3]]
 * $$f_{n}\left ( x \right )=\sum _{i=0}^{n}l_{i,n}\left ( x \right ) f\left ( x_i \right)\,$$


 * (i)where $$l_{i,n}\left ( x \right)=l_{i}\left ( x \right)=\prod_{j=0,i \neq j}^{n}\frac{x-x_{j}}{x_{0}-x_{j}}\,$$


 * when $$i=0\,$$
 * {| style=text-align:center

\begin{align} \\n=1, \rightarrow & l_i\left ( x \right)=\frac{x-x_{1}}{x_{0}-x_{1}} \rightarrow l_{0}=l\left ( x^{1}\right)\; \\n=2, \rightarrow & l_i\left ( x \right)=\frac{x-x_{1}}{x_{0}-x_{1}}\frac{x-x_{2}}{x_{0}-x_{2}} \rightarrow l_{0}=l\left ( x^{2}\right)\; \\.\, \\.\, \\.\, \\n=n, \rightarrow & l_i\left ( x \right)=\frac{x-x_{1}}{x_{0}-x_{1}}\frac{x-x_{2}}{x_{0}-x_{2}}...\frac{x-x_{n-1}}{x_{0}-x_{n-1}}\frac{x-x_{n}}{x_{0}-x_{n}} \rightarrow l_{0}=l\left ( x^{n}\right)\, \end{align} $$
 * }
 * }


 * (ii)$$f\left( x_{i} \right)\,$$ is constant, so $$f_n\left( x \right)\,$$ is $$x^{n}\,$$'s function


 * $$f_n^{n+1}\left ( x \right)=0\,$$


 * $$E_n^{n+1}=\int_{0}^{1}f^{n+1}\left ( x \right )dx-\int_{0}^{1}f_{n}^{n+1}\left ( x \right )dx\,$$


 * $$\rightarrow E_n^{n+1}=\int_{0}^{1}f^{n+1}\left ( x \right )dx-\int_{0}^{1} 0 dx\,$$


 * $$\rightarrow E_n^{n+1}=\!F^{n+1}\left ( x \right )dx- 0 \,$$


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


 * style="width:50%; padding:10px; border:2px solid #8888aa" |
 * $$ \displaystyle
 * $$ \displaystyle

\ E_n^{n+1}=\!F^{n+1}\left ( x \right )dx- 0 \, $$ $$ Solution for problem 12-2: EGM6341.s10.Team1.Ya-Chiao Chang 19:27, 10 February 2010 (UTC) Proofread problem 12-2:
 * $$\displaystyle
 * }
 * }

=Problem 12-3(1)=

Find
Prove $$P_{n+1}^{(n+1)}\left ( x \right )={(n+1)}!$$

Given

 * $$q_{n+1}\left ( x \right ):=(x-x_{0})(x-x_{1})(x-x_{2})...(x-x_{n})$$

Solution

 * $$n=0 \,$$
 * $$q_{1}\left ( x \right ):=(x-x_{0})$$


 * $$q_{1}^{(1)}\left ( x \right )=1$$


 * $$n=1 \,$$
 * $$q_{2}\left ( x \right ):=(x-x_{0})(x-x_{1})$$


 * $$q_{2}^{(2)}\left ( x \right )=2\times 1=2!$$


 * $$n=2 \,$$
 * $$q_{3}\left ( x \right ):=(x-x_{0})(x-x_{1})(x-x_{2})$$


 * $$q_{3}^{(3)}\left ( x \right )=3\times 2\times 1=3!$$


 * $$n=3 \,$$
 * $$q_{4}\left ( x \right ):=(x-x_{0})(x-x_{1})(x-x_{2})(x-x_{3})$$


 * $$q_{4}^{(4)}\left ( x \right )=4\times 3\times 2\times 1=4!$$

...


 * $$n=n \,$$
 * $$q_{n+1}\left ( x \right ):=(x-x_{0})(x-x_{1})(x-x_{2})(x-x_{3}...(x-x_{n})$$


 * $$q_{n+1}^{(n+1)}\left ( x \right )=n\times (n-1)\times (n-2)...\times 1=(n+1)!$$


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


 * style="width:50%; padding:10px; border:2px solid #8888aa" |
 * $$ \displaystyle
 * $$ \displaystyle

\Rightarrow P_{n+1}^{(n+1)}\left ( x \right )={(n+1)}!$$ $$
 * $$\displaystyle
 * }
 * }

Solution for problem 12-3(1): Egm6341.s10.team1.lei19:52, 1 March 2010 (UTC)

= Problem 12-3(2) =

Given
Given the function:


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

$$ $$
 * $$\displaystyle f(x)=log(x)
 * $$\displaystyle f(x)=log(x)
 * $$\displaystyle


 * }
 * }

and


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

$$ $$
 * $$\displaystyle t=2, x_0=3, x_1=4, ..., x_6=9
 * $$\displaystyle t=2, x_0=3, x_1=4, ..., x_6=9
 * $$\displaystyle


 * }
 * }

Find
Plot 3 figures like those on slide [[media:Egm6341.s10.mtg11.pdf|11-2]] for the functions

$$\displaystyle f(x),f_n(x), l_{i,n}(x), q_{n+1}(x)$$

for $$\displaystyle i=3 (x_3=6)$$

and

$$\displaystyle x=5.5$$

Solution
The function f(x) and approximated function are defined as:


 * $$\displaystyle

f(x)=log(x) $$



f_n(x)=\sum_{i=0}^6 l_{i,n}(x)f(x_i)=\sum_{i=0}^6 l_{i,n}(x)log(x_i) $$

Where the Lagrange equation for i=3:



l_{i,n}(x)=\prod_{i=1}^{n} \dfrac{x-x_j}{x_i-x_j} $$

therefore



l_{3,6}(x)=\Big(\frac{x-x_0}{x_3-x_0}\Big)\Big(\dfrac{x-x_1}{x_3-x_1}\Big)\Big(\dfrac{x-x_2}{x_3-x_2}\Big)\Big(\dfrac{x-x_4}{x_3-x_4}\Big)\Big(\dfrac{x-x_5}{x_3-x_5}\Big)\Big(\dfrac{x-x_6}{x_3-x_6}\Big) $$


 * $$\displaystyle

q_{n+1}(t)=(t-x_0)(t-x_1)(t-x_2)...(t-x_n) $$

--Egm6341.s10.team1.toddmock 19:58, 1 March 2010 (UTC)

=Problem 13-2(1)=

Find

 * $$\left | E_{1} \right |\leq \frac{(b-a)^{3}}{12}M_2=\frac{h^{3}}{12}M_2)$$

Given

 * $$n=1, \, q_{2}\left ( x \right )=(x-a)(x-b)$$
 * $$h:=b-a\,$$

Solution
Let:$$M_2:= max f^{(2)} (\xi), \xi \in [a,b]$$
 * $$\left | E_{1} \right |\leq \frac{M_2}{2!}\int_{a}^{b}\left |q_{2}\left ( x \right )\right |dx $$
 * $$=\frac{M_2}{2!}\int_{a}^{b}\underbrace{\left ( x-a \right )}_{\geq 0}\underbrace{\left ( b-x \right )}_{\geq 0}dx $$
 * $$=\frac{M_2}{2!}\int_{a}^{b}[(b+a)x-ab-x^2] dx$$
 * $$=\frac{M_2}{2!}[\frac{1}{2}(b+a)x^2-ab x-\frac{1}{3}x^3]|_{a}^{b}$$
 * $$=\frac{M_2}{2!}\times \frac{1}{6}(b^3-3ab^2+3a^2b-a^3) $$
 * $$=\frac{M_2}{2!}\times \frac{1}{6}(b^2-2ba+a^2)(b-a) $$
 * $$=\frac{M_2}{2!}\times \frac{1}{6}(b-a)^2(b-a) $$
 * $$=\frac{M_2}{2!}\times \frac{1}{6}(b-a)^3 $$
 * $$=\frac{M_2}{12}(b-a)^3 $$

and
 * $$h:=b-a\,$$
 * $$=\frac{M_2}{12}h^3 $$
 * {| style="width:100%" border="0" align="left"


 * style="width:50%; padding:10px; border:2px solid #8888aa" |
 * $$ \displaystyle
 * $$ \displaystyle

\Rightarrow \left | E_{1} \right |\leq \frac{(b-a)^{3}}{12}M_2=\frac{h^{3}}{12}M_2$$ $$
 * $$\displaystyle
 * }
 * }

Solution for problem 13-2(1): Egm6341.s10.team1.lei19:54, 1 March 2010 (UTC)

=Problem 13-2(2)=

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

\begin{align} n=2, \\ & q_3(x)=(x-x_o)(x-x_1)(x-x_2)\\ \end{align} $$
 * $$\displaystyle
 * $$\displaystyle

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

\begin{align} \\ & x_o=a, x_2=b, x_1=\frac{a+b}{2} \end{align} $$
 * $$\displaystyle
 * $$\displaystyle


 * }.
 * }.

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

\left | E_2 \right | = \frac{M_3}{3!}\int_{a}^{b}\left|(x-a)(x-\frac{a+b}{2})(x-b) \right |\, dx = \frac{(b-a)^4}{192}M_3 $$
 * $$\displaystyle
 * $$\displaystyle


 * }.
 * }.

Solution
To capture positive region it is necessary to change the limits and multiply by two


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

\begin{align} \int_{a}^{b}\left|(x-a)(x-\frac{a+b}{2})(x-b) \right |\, dx &= 2\int_{a}^{\frac{a+b}{2}}(x-a)\Big(x-\frac{a+b}{2}\Big)(x-b)\, dx\\ &=2\int_{a}^{\frac{a+b}{2}}x^3-\frac{a^2b}{2}-\frac{ab^2}{2}+\frac{a^2x}{2} + 2abx + \frac{b^2x}{2}-\frac{3ax^2}{2}-\frac{3bx^2}{2}, dx\\ &=\frac{1}{2}x^4-(a+b)x^3+\frac{1}{2}(a^2+4ab+b^2)x^2 - ab(a+b)x\, \Big |^{\frac{a+b}{2}}_a\\
 * $$\displaystyle
 * $$\displaystyle

\end{align} $$
 * }.
 * }.

Evaluating at the limits gives


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

\begin{align} &=\frac{1}{2}\Bigg(\Big(\frac{a+b}{2}\Big)^4-a^4\Bigg)-(a+b)\Bigg(\Big(\frac{a+b}{2}\Big)^3-a^3\Bigg)+\frac{1}{2}(a^2+4ab+b^2)\Bigg(\Big(\frac{a+b}{2}\Big)^2-a^2\Bigg) - ab(a+b)\Bigg(\Big(\frac{a+b}{2}\Big)-a\Bigg)\
 * $$\displaystyle
 * $$\displaystyle

\end{align} $$
 * }.
 * }.

Simplifying leads to


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

= \frac{1}{32}(b-a)^4 $$
 * $$\displaystyle
 * $$\displaystyle


 * style= |
 * }.
 * }.

Thus the solution becomes


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

$$\displaystyle \left | E_2 \right | = \frac{M_3}{3!}\Bigg(\frac{1}{32}(b-a)^4\Bigg) = \frac{(b-a)^4}{196}M_3 $$ --Egm6341.s10.team1.toddmock 19:56, 1 March 2010 (UTC)
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }.
 * }.

=Problem 13-3=

Find
$$I \,$$ and $$I_2 \,$$ on $$[0,1] \,$$

Given

 * $$I=\int_{0}^{1}f_3(x)dx$$
 * $$f_3(x)=3+8x-2x^2+6x^3 \,$$
 * $$I_2=\frac{h}{3}[f(0)+4f(0.5)+f(1)]$$

Solution
Solving for $$I \,$$ is straightforward integration,
 * $$I=\int_{0}^{1}3+8x-2x^2+6x^3dx=\left [ 3x+4x^2-\frac{2}{3}x^3+\frac{3}{2}x^4 \right ]_0^1=\frac{47}{6}$$

Solving for $$I_2 \,$$ by plugging into the formula
 * $$I_2=\frac{1/2}{3}\left [ 3+4(\frac{12}{4}+\frac{16}{4}-\frac{2}{4}+\frac{3}{4})+3+8-2+6 \right ]=\frac{47}{6}$$

Therefore $$I=I_2 \,$$

Solved by EGM6341.s10.Team1.Kumanchik 22:11, 2 March 2010 (UTC)

=Problem 15-1=

Statement
Prove why $$\alpha^{1}\left ( t \right )=F\left ( -t \right)+F\left ( t \right)\,$$

Given
$$\alpha\left ( t \right )=\int_{-t}^{k}f\left ( x\left ( t \right) \right)dt+\int_{k}^{t}f\left ( x\left ( t \right) \right)dt, k\in\![-t,t]\, $$

Solution

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


 * Ref: Lecture Notes [[media:Egm6341.s10.mtg14.pdf|P14-2]]
 * }
 * }

(i)$$\int_{k}^{t}F\left ( x\left ( t \right) \right)dt=\mathbb{F}\!\left ( x\left ( t \right) \right)-\mathbb{F}\!\left ( x\left ( k \right) \right)\, $$


 * $$\frac{d}{dt}(\int_{k}^{t}F\left ( x\left ( t \right) \right)dt)=\frac{d}{dt}(\mathbb{F}\!\left ( x\left ( t \right) \right))-\frac{d}{dt}(\mathbb{F}\!\left ( x\left ( k \right) \right))\, $$


 * since$$k=constant\,\rightarrow\mathbb{F}\!\left ( x\left ( k \right) \right)\, $$ is constant



\begin{align} \\\frac{d}{dt}(\mathbb{F}\!\left ( x\left ( t \right) \right)dt)-\frac{d}{dt}(constant) &=F\left ( t \right)-0\; \\ &= F\left ( t \right)\, \end{align} $$

(ii)$$\int_{-t}^{k}F\left ( x\left ( t \right) \right)dt=\mathbb{F}\!\left ( x\left ( k \right) \right)-\mathbb{F}\!\left ( x\left ( -t \right) \right)\, $$


 * $$\frac{d}{dt}(\int_{-t}^{k}F\left ( x\left ( t \right) \right)dt)=\frac{d}{dt}(\mathbb{F}\!\left ( x\left ( k \right) \right))+\frac{d}{dt}(\mathbb{F}\!\left ( x\left ( -t \right) \right))\, $$
 * P.S. Chain rule :$$\frac{d}{dt}(\int_{-t}^{k}F\left ( x\left ( t \right) \right)dt)=\frac{d}{dt}(\mathbb{F}\!\left ( x\left ( k \right) \right))-(\frac{d(-t)}{dt})\frac{d}{dt}(\mathbb{F}\!\left ( x\left ( -t \right) \right))\, $$


 * since$$k=constant\,\rightarrow\mathbb{F}\!\left ( x\left ( k \right) \right)\, $$ is constant



\begin{align} \\\frac{d}{dt}(constant)+\frac{d}{dt}(\mathbb{F}\!\left ( x\left ( -t \right) \right)dt) &=0+F\left ( t \right)+0\; \\ &=F\left ( -t \right)\, \end{align} $$

From (i) and (ii)



\begin{align} \\\alpha^{1}\left ( t \right ) &= \frac{d}{dt}(\int_{-t}^{k}F\left ( x\left ( t \right) \right)dt)+\frac{d}{dt}(\int_{k}^{t}F\left ( x\left ( t \right) \right)dt)\; \\ &= F\left ( -t \right)+F\left ( t \right)\, \end{align} $$
 * {| style="width:100%" border="0" align="left"


 * style="width:50%; padding:10px; border:2px solid #8888aa" |
 * $$ \displaystyle
 * $$ \displaystyle

\alpha^{1}\left ( t \right )=\! F\left ( -t \right)+F\left ( t \right) \, $$ $$
 * $$\displaystyle
 * }
 * }

Solution for problem 15-1: EGM6341.s10.Team1.Ya-Chiao Chang 19:28, 10 February 2010 (UTC)

Proofread problem 15-1:

=Problem 15-2(1)=

Statement
Prove why $$G^{(2)}\left ( 0 \right )=0\,$$

Given
$$G^{(1)}\left ( 0 \right )=0\,$$ and $$G^{(1)}\left ( \xi_1 \right )=0\,$$ Apply Rolle's theorem
 * $$ \exists\!\,\,\,\,\xi_2\,\,\,\,\in\!\,\,\,\,[\,0,\xi_1\,]:\,\,\,\,\!G^{(2)}\left ( \xi_2 \right)=0\,$$

Solution

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


 * Ref: Lecture Notes [[media:Egm6341.s10.mtg15.pdf|P15-1]],[[media:Egm6341.s10.mtg14.pdf|P14-2]]
 * }
 * }

From [[media:Egm6341.s10.mtg14.pdf|P14-2]]

$$G\left( t \right):=\!\,e\left( t \right)-\!t^{5}G\left( 1 \right)\,$$

Do [[media:Egm6341.s10.mtg15.pdf|P15-1]] again to find out $$G^{(2)}\left ( 0 \right)=\!0$$

$$G^{(1)}\left( t \right)=\!\,e^{(1)}\left( t \right)-\!5t^{4}e\,$$

$$G^{(2)}\left( t \right)=\!\,e^{(2)}\left( t \right)-\!20t^{3}e\,$$

We need $$ e^{(2)}\left ( t \right)$$


 * $$e\left( t \right):=\!\alpha\left ( t \right)-\!\alpha_2\left ( t \right)\,$$


 * $$\alpha\left ( t \right)=\!\int_{-t}^{k}F\left ( -t \right)+\!\int_{k}^{t}F\left ( t \right)\,\,\,\,k\in\!\,\,[\,-t,t\,]\,$$


 * $$\alpha_2\left ( t \right)=\!\frac{t}{3}[\!\,F\left ( -t \right)+\!4F\left ( 0 \right)+\!F\left ( t \right)]\!\,$$

$$\rightarrow e^{(2)}\left( t \right):=\!\alpha^{(2)}\left ( t \right)-\!\alpha_2^{(2)}\left ( t \right)\,$$

We need $$\alpha^{(2)}\left ( t \right)\,\,\,$$ and $$\,\,\, \alpha_2^{(2)}\left ( t \right)\,$$


 * $$\alpha^{(1)}\left ( t \right)=\!F\left ( -t \right)+\!F\left ( t \right)\,$$


 * $$\alpha_2^{(1)}\left ( t \right)=\!\frac{1}{3}[\!\,F\left ( -t \right)+\!4F\left ( 0 \right)+\!F\left ( t \right)]\!+\!\frac{t}{3}[\!\,-F^{(1)}\left ( -t \right)+\! F^{(1)}\left ( t \right)]\!\,$$

$$\alpha^{(2)}\left ( t \right)=\!-\!F^{(1)}\left ( -t \right)+\!F^{(1)}\left ( t \right)\,$$

$$\alpha_2^{(2)}\left ( t \right)=\!\frac{1}{3}[\!\,-\!F^{(1)}\left ( -t \right)+\!\,F^{(1)}\left ( t \right)]\!+\!\,\frac{1}{3}[\!\,-F^{(1)}\left ( -t \right)+\! F^{(1)}\left ( t \right)]\!+\!\frac{t}{3}[\!\,+\!F^{(2)}\left ( -t \right)+\! F^{(2)}\left ( t \right)]\!\,$$

Finally



\begin{align} \\G^{(2)}\left( t \right) &= e^{(2)}\left( t \right)-\!20t^{3}e\; \\ &= \alpha^{(2)}\left ( t \right)-\!\alpha_2^{(2)}\left ( t \right)-\!20t^{3}e\; \\ &= -\!F^{(1)}\left ( -t \right)+\!F^{(1)}\left ( t \right)-\!\frac{1}{3}[\!\,-\!F^{(1)}\left ( -t \right)+\!F^{(1)}\left ( t \right)]\!-\!\frac{1}{3}[\!\,-F^{(1)}\left ( -t \right)+\! F^{(1)}\left ( t \right)]\!-\!\frac{t}{3}[\!\,+\!F^{(2)}\left ( -t \right)+\! F^{(2)}\left ( t \right)]\!-\!20t^{3}e\,. \end{align} $$

When $$t=\!0$$



\begin{align} \\G^{(2)}\left( 0 \right) &= e^{(2)}\left( 0 \right)-\!0\; \\ &= \alpha^{(2)}\left ( 0 \right)-\!\alpha_2^{(2)}\left ( 0 \right)-\!0\; \\ &= -\!F^{(1)}\left ( 0 \right)+\!F^{(1)}\left ( 0 \right)-\!\frac{1}{3}[\!\,-\!F^{(1)}\left ( 0 \right)+\!F^{(1)}\left ( 0 \right)]\!-\!\frac{1}{3}[\!\,-F^{(1)}\left ( 0 \right)+\! F^{(1)}\left ( 0 \right)]\!-\!0-\!0\; \\ &= 0\, \end{align} $$


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


 * style="width:50%; padding:10px; border:2px solid #8888aa" |
 * $$ \displaystyle
 * $$ \displaystyle

G^{(2)}\left ( 0 \right)\,=\!\,0 \, $$ $$
 * $$\displaystyle
 * }
 * }

Solution for problem 15-2(1): EGM6341.s10.Team1.Ya-Chiao Chang 19:29, 10 February 2010 (UTC)

Proofread problem 15-2(1):

=Problem 15-2(2)=

Given
e(t) is given as:


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle e(t)=\int\limits_{-t}^{t} F(t)\, dt-\dfrac{-t}{3}[F(-t)+fF(t)+F(t)]


 * }
 * }

Find
Determine the third derivative of e(t) which is known to be:


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle e^{(3)}(t)=\dfrac{-t}{3}[F^{(3)}(t)-F^{(3)}(-t)]


 * }
 * }

Solution
e(t) is the summation of two terms:


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle e(t)=\alpha(t)-\alpha_2(t)


 * }
 * }

We must use Leibniz integral rule,

For a monovariant function $$g$$:


 * $$ {d\over dx}\, \int_{f_1(x)}^{f_2(x)} g(t) \,dt = g(f_2(x)) {f_2'(x)} - g(f_1(x)) {f_1'(x)} $$

Using a point k that lies somewhere in the interval [-t,t]:

\alpha (t)=\int\limits_{-t}^{k} F(t)\, dt+\int\limits_{k}^{t} F(t)\, dt $$

Then evaluation of the first term is:


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle \alpha^{(1)}(t)=[F(k)+F(-t)]+[F(t)-F(k)]=F(-t)+F(t)
 * }
 * }


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle \alpha^{(2)}(t)=[-F^{(1)}(-t)+F^{(1)}(t)]=F^{(1)}(-t)
 * }
 * }


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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle \alpha^{(3)}(t)=F^{(2)}(t)+F^{(2)}(-t)
 * }
 * }

Evaluation of the second term:



\alpha_2^{(1)}=\dfrac{-1}{3}[F(-t)+4F(0)+F(t)]+\dfrac{t}{3}F^{(1)}(-t)-\dfrac{t}{3}F^{(1)}(t) $$



\alpha_2^{(2)}(t)=\dfrac{1}{3}F^{(1)}(-t)-\dfrac{1}{3}F^{(1)}(t)+\dfrac{1}{3}F^{(1)}(-t)-\dfrac{t}{3}F^{(2)}(-t)-\dfrac{1}{3}F^{(1)}(t)-\dfrac{t}{3}F^{(2)}(t) $$



=\dfrac{2}{3}F^{(1)}(-t)-\dfrac{2}{3}F^{(1)}(t)-\dfrac{-t}{3}F^{(2)}(-t)-\dfrac{t}{3}F^{(2)}(t) $$



\alpha_2^{(3)}(t)=\dfrac{-2}{3}F^{(2)}(-t)-\dfrac{2}{3}F^{(2)}(t)-\dfrac{1}{3}F^{(2)}(-t)+\dfrac{t}{3}F^{(3)}(-t)-\dfrac{1}{3}F^{(2)}(t)-\dfrac{t}{3}F^{(3)}(t) $$



=-F^{(2)}(-t)-F^{(2)}(t)+\dfrac{t}{3}[F^{(3)}(-t)-F^{(3)}(t)] $$

All that remains is to add the two functions $$\alpha_1^{(3)}$$ and $$\alpha_2^{(3)}$$ :



e{(3)}(t)=\alpha^{(3)}(t)+\alpha_2^{(3)}(t)=F^{(2)}(t)+F^{(2)}(-t)-F^{(2)}(-t)-F^{(2)}(t)+\dfrac{t}{3}[F^{(3)}(-t)-F^{(3)}(t)] $$


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

$$ e^{(3)}(t)=\dfrac{-t}{3}[F^{(3)}(t)-F^{(3)}(-t)] $$ --Egm6341.s10.team1.toddmock 19:57, 1 March 2010 (UTC) --Egm6341.s10.team1.andrewdugan 20:27, 1 March 2010 (UTC)
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style= |
 * }.

=Problem 16-1=

Find
Plot $$f \,$$ and $$f_n \,$$ for $$n=1,2,3,8,12 \,$$ Plot $$I_n \,$$ vs $$n \,$$ and observe non-convergence Observe the weights, $$w_{i,n} \,$$

Given

 * $$f(x)=\frac{1}{1+x^2}$$
 * $$f_n(x)=\sum_{i}^{n}l_{i,n}f(x_i)$$
 * $$l_{i,n}(x)=\prod_{j=0,j\neq i}^{n}\frac{x-x_j}{x_i-x_j}$$
 * $$x_i=a+\frac{b-a}{n}i$$
 * $$I_n=\sum_{i=0}^{n}\left (\int_{a}^{b}l_i(x)dx \right )f(x_i)$$
 * $$w_{i,n}=\int_{a}^{b}l_i(x)dx$$

Solution
The solution is just plugging into the equations using MATLAB to plot.

For the plot of the estimated function, the oscillations become more wild for higher order polynomials.

For the plot of the integral estimate, the solution does not converge.

And for the plot of the weights, some weights become negative to compensate for the wild oscillations.

MATLAB
Problem solved by EGM6341.s10.Team1.Kumanchik 22:12, 2 March 2010 (UTC)

=Contributing members= EGM6341.s10.Team1.Kumanchik 21:49, 10 February 2010 (UTC)

EGM6341.s10.Team1.Ya-Chiao Chang 19:30, 10 February 2010 (UTC)

Egm6341.s10.team1.andrewdugan 19:41, 10 February 2010 (UTC)

Egm6341.s10.team1.lei 21:12, 10 February 2010 (UTC)

--Egm6341.s10.team1.toddmock 21:03, 10 February 2010 (UTC)