University of Florida/Egm6341/s11.team1.Gong/Mtg10

Mtg 10: Sat, 22 Jan 11


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


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

page10-1

HW2.9:Use (1) p.8-1 to generate P5(x), and matlabl command"roots"to comp. the roots of P5(x)to check values in table on p. 7-5. Plot the roots on [-1,+1] using  <P>matlab "plot" command (plot dots "." </P> <P>with coordinator (x<SUB>i</SUB>,y<SUB>i</SUB>), i = 1,...,5 : use "markersinge" 15)</P> <P>x<SUB>i</SUB>:<SUB> </SUB>roots of P<SUB>5</SUB>(x)</P> <P>y<SUB>i: </SUB>y<SUB>i </SUB>= 0</P> <P>Plot (x, y, '.', 'markersige', 15)</P> <P>Repeat the above for P<SUB>10</SUB>(x)</P> <P>observe the location of the roots near end points -1 and +1</P> <P>(prepare for Runge phenomenon)</P> <P><U>NOTE: </U></P> <P>Lagrange interp. cont'd p.9-4</P> <P> </P>

page10-2

<P><U>Simpson's rule (simple)</U></P>

$$[a,b] \ x_{0}=a, \ x_{1}=\frac{a+b}{2}, \ x_{2}=b \ \color{red} (1)$$

$$ {\color{blue} { \underline {Method 1:}}} \ f_{2 }(x)=P_{2}(x) \overset{=}c_{2}x^{2}+c_{1}x+c_{0}$$

<P>c<SUB>0</SUB>, c<SUB>1</SUB>,  c<SUB>2</SUB>   unknowns</P> <P>p<SUB>2</SUB>=(x<SUB>i</SUB>) = f(x<SUB>i</SUB>)   i= 0, 1, 2               (3)</P> <P>3 equations for 3 unknowns {c<SUB>i</SUB>}</P> <P><U>Method 2:</U>Use lagrangeinterp.(2) p.8-3(1) p.9-2</P> <P> </P>

$$ {\color{red} {(4)}} = \sum_{i=0}^  {\color{blue} \underset{l_{i}(x)}{ \underbrace}}f(x_{i})$$

<P>Equiv. of meth1 and meth 2:           (3)</P> <P> </P>

$$p_{2}(x_{j})= \sum_{i=0}^{2} \color{blue} \underset{ \delta_{ij}}{ \underbrace}f(x_{i})=f{x_j} \ \color{red}(5)$$

page10-3

$$l_{0{\color{blue},2}}=l_{0{\color{blue},2}}= \prod_{j=0 {\color{red}j \neq i}}^{n=2} \frac{x-x_{j}}{x_{0}-x_{j}}= \frac{(x-x_{1})(x-x_{2})}{(x_{0}-x_{1})(x_{0}-x_{2})} \ {\color{blue} \in P_{2}}$$

<P>It can be verified that </P> <P>l<SUB>0</SUB>(x<SUB>0</SUB>)=1, l<SUB>0</SUB>(x<SUB>1</SUB>) = l<SUB>0</SUB>(x<SUB>2</SUB>) = 0</P> <P>l<SUB>i</SUB>(x<SUB>j</SUB>) = δ<SUB>ij                 </SUB>i,j = 0. 1. 2</P>

$$  {\color{blue} \underset{ \underbrace{\color{black}l_{1{\color{blue}(i=1),2(n=2)}}(x)}}}= \prod_{j=0, {\color{red}{j \neq 1}}}^{2 {\color{blue}(n=2)}}\frac{x-x_{j}}{x_{i{\color{blue}(i=1)}}-x_{j}}=\frac{(x-x_{0})(x-x_{2})} \ {\color{blue} \in P_{2}}$$

$$l_{1}(x_{1})=1 \, \ l_1(x_{0})=l_{1}(x_{2})=0$$

page10-4

$${l}^{''}_{1}(x_{1})<0$$

<P><U>HW</U><SUP>*</SUP><U>2.10: </U>Use(2) &amp; (3)p.10-2 to find</P> <P>expression for {c<SUB>i</SUB>} in terms (x<SUB>i</SUB>, f(x<SUB>i</SUB>)) i=0,1,2.</P> <P><U>HW</U><SUP>*</SUP><U>2.11: </U>Use (4) p.10-2 to</P> <P>derive simple Simpson's rule </P> <P><U>HW</U><SUP>*</SUP><U>2.11:</U>f(x)-e<SUP>x</SUP>1/x on [o,1] S10and on [-1,1]S11</P> <P>x<SUB>0</SUB>=-1, x<SUB>n</SUB>=+1</P> <P>Consider n=1(Trap), 2(Simp), 4, 8, 16</P> <P> </P>

page10-5

<P>Constrast f<SUB>n</SUB>(x) as in (2) p.8-3.</P> <P>Plot f, f<SUB>n</SUB> , n= 1, 2, 4, 8, 16</P> <P>Compare </P>$$ {I}_{n}= \int_{a}^{b}f_{n}(x)dx $$ n=1, 2, 4, 8

<P>and compare to I (use WA with more digits)</P> <P>For n=5 plot l<SUB>0</SUB>, l<SUB>1</SUB>, l<SUB>2</SUB> How would l<SUB>3</SUB>, l<SUB>4</SUB>, l<SUB>5</SUB> look like?</P>

<U>HW</U><SUP>*</SUP><U>2.13:</U>show

$$ \underset{Simple \ Trap.}{ \underbrace} \Rightarrow  \underset{Compare \ Trap.}{ \underbrace}$$

$$\underset{Simple \ Trap.}{ \underbrace} \Rightarrow  \underset{Compare \ Trap.}{ \underbrace} $$
 * }