User:RjorjorjoHW2

EGM6341 HW 2

=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 \,$$



=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 \, $$
 * $$\displaystyle\!$$
 * }
 * }

=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\!$$
 * }
 * }

=Problem 15-2=

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\!$$
 * }
 * }