User:Egm6341.s10.team3.sa/Mtg7

Mtg 7: Thu, 14 Jan 10 [[media: Egm6341.s10.mtg7.djvu | Page 7-1]] 


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

HW:
 * style="width:100%; padding:10px; border:2px solid #8888aa" |
 * style="width:100%; padding:10px; border:2px solid #8888aa" |


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

f(x) = \frac{e^{x}-1}{x}=\frac{1}{x}\left[e^{x}-1\right] $$
 * $$\displaystyle \color{blue}
 * $$\displaystyle \color{blue}
 * }
 * }

(i)Expand $$\displaystyle \color{blue} e^{x} $$ in Taylor series with remainder,
 * {| style="width:100%" border="0" align="left"

R(x) = \frac{(x-0)^{n+1}}{(n+1)!}e^{\xi(x)}. $$
 * $$\displaystyle \color{blue}
 * $$\displaystyle \color{blue}
 * }
 * }

(ii) Find Taylor series expansion and remainder of $$\displaystyle \color{blue} f(x) $$ to get (4) [[media:Egm6341.s10.mtg6.djvu|Page 6-3]],
 * {| style="width:100%" border="0" align="left"

f(x)-f_{n}(x)=R_{n}(x)=\frac{(x-0)^{n}}{(n+1)!}e^{\xi(x)},\quad \xi\in[0,x]. $$
 * $$\displaystyle \color{blue}
 * $$\displaystyle \color{blue}
 * }
 * }


 * style = |
 * }
 * }

TRAPEZOIDAL RULE: SIMPLE TRAPEZOIDAL RULE:

As shown in the figure above, we connect approximate the function f by a straight line. This is accomplished by connecting the end points the function. Then we drop perpendiculars from the end points onto the X-axis thus forming a trapezium. The area of this trapezium is said to be the approximate value of $$\displaystyle \int_{a}^{b} f(x) \,dx $$  The formula for simple trapezoidal rule is given by,

$$\displaystyle I_1 = \frac{b-a}{2} \bigg [ f(a) + f(b)\bigg ] $$  $$\displaystyle (Eq. 1) $$ Note: The subscript denotes the number of intervals. Here the subscript is 1 because there is only in interval in case of Simple Trapezoidal Rule.  

COMPOSITE TRAPEZOIDAL RULE: In this case, the entire domain is divided into n sub-divisions. We apply the simple trapezoidal rule to each sub-division/panel. The formula for simple trapezoidal rule is given by,

$$\displaystyle I_n = h \bigg [ \frac{1}{2}f_0 + f_1 + \dots +f_{n-1} + \frac{1}{2}f_n \bigg ] $$  $$\displaystyle (Eq. 2) $$ where, h denotes the interval size.(i.e, size of one panel). 

[[media: Egm6341.s10.mtg7.djvu | Page 7-2]]  $$ f_i := f(x_i), i=0,1,2 \dots $$  $$\displaystyle (Eq. 1) $$ SIMPSON'S RULE:

As against trapezoidal rule, we use 2nd order polynomial(i.e, parabola) to approximate the function f Similar to Trapezoidal rule, here also we have 2 types of Simpson's rule namely 1.Simple Simpson's rule and 2.Composite Simpson's rule. 

SIMPLE SIMPSON'S RULE: The formula is given by,

$$\displaystyle I_2 = \frac{h}{3} \bigg [ f(x_0) + 4f(x_1) + f(x_2)\bigg ] $$  $$\displaystyle (Eq. 2) $$ where, $$\displaystyle h := \frac{b-a}{2}$$ and the two intervals being $$\displaystyle [x_0 ,x _1] \;and\; [x_1,x_2] $$ <br\>

COMPOSITE SIMPSON'S RULE: The formula is given by,

$$\displaystyle I_n = \frac{h}{3} \bigg [ f_0 + 4f_1 + 2f_2 + 4f_3 +2f_4 + \dots +2f_{n-2} + 4f_{n-1} + f_n\bigg ] $$ <p style="text-align:right;"> $$\displaystyle (Eq. 3) $$ where, $$\displaystyle n =2k \; and \; k=1,2,\dots $$<br\><br\>

NEWTON-COTES FORMULA: This is a more general form used to approximate a function. The Trapezoidal and Simpson's rule are a subset of Newton-Cotes formula.

The procedure here is simple : Step 1 : Approximate the function $$ f(\cdot) $$ using Lagrange interpolation function $$ f_n(\cdot)$$ Step 2: Integrate the function $$ f_n(\cdot) \;\; \Rightarrow I_n = \int f_n(x) \,dx$$

<p style="text-align:left;">[[media: Egm6341.s10.mtg7.djvu | Page 7-3]]  As above once again we sub-divide the function f. The interpolating polynomial will pass through all these points from a through b. The approximating polynomial is denoted by $$ f_n(x) \; or p_n(x)$$. <br\><br\> $$\displaystyle f_n(x) = p_n(x) = \sum_{i=0}^{n} l_{i,n}(x) f(x_i)$$ <p style="text-align:right;"> $$\displaystyle (Eq. 1) $$ $$\displaystyle l_{i,n}(x) = l_i (x) = \prod_{j=0, j \neq i}^{n} \frac{x-x_j}{x_i - x_j}$$ <p style="text-align:right;"> $$\displaystyle (Eq. 2) $$ $$\displaystyle I_n = \int_{a}^{b} p_n (x) \,dx $$ <br\> $$\displaystyle = \sum_{i=0}^{n}\underbrace{ \int_{a}^{b} l_i (x) \,dx}_{w_i (weight)} f(x_i) $$ <p style="text-align:right;"> $$\displaystyle (Eq. 3) $$