text:
User:Egm6341.s11.team5/HW3

= Problem 1 - Find n st. $$Er^{T}\left(f_n^T\left(\frac{7 \pi }{8}\right)\right) < Er^{L}\left(f_5^L\left(\frac{7 \pi }{8}\right)\right)$$ = From (meeting 14 page 1)

Given
Taylor Series Expansion (meeting 3 page 2)

$$f_n^T(x)=f(x0)+\frac{(x-x0)^n}{n!} f^n(x0)$$

Lagrangian Expansion (meeting 11 page 3)

$$f_n^L\left(x\right)=\sum _{i=0}^n f\left(x_i\right) l_{i,n}(x)$$

Where

$$l_{i,n}(x)= \prod _i^n \frac{x-xli}{xlj-xli}$$

$$ i\neq j$$ and $$xl\left(1,n\right)$$ is a set of n given points

Find
A value of n such that the error of the nth Taylor expansion is equal or less than the 5th Lagrangian Expansion of the same funciton

$$\left|f\left(\frac{7 \pi }{8}\right)-f_n^T\left(\frac{7 \pi }{8}\right)\right|=\left|e_n^T\left(\frac{7 \pi }{8}\right)\right|\leq \left|f\left(\frac{7 \pi }{8}\right)-f_4^L\left(\frac{7 \pi }{8}\right)\right|=\left|e_4^L\left(\frac{7 \pi }{8}\right)\right|$$

$$f\left(x\right)=sin\left(x\right)$$

Solution
 We solved this problem on our own

The 5th Lagrangian Interpolation Functions of $$sin\left(x\right) $$  was calculated using 5 evenly divided data points from  $$\displaystyle 0  $$ to  $$\displaystyle 2\pi $$

$$xl=\left( \begin{array}{ccccc} 0 & \frac{\pi }{4} & \frac{\pi }{2} & \frac{3 \pi }{4} & \pi \end{array} \right)$$

Resulting in

$$f\left(x_i\right)=\left( \begin{array}{ccccc} 0 & \frac{1}{\sqrt{2}} & 1 & \frac{1}{\sqrt{2}} & 0 \end{array} \right)$$

$$l_{i,5}(x)=\left( \begin{array}{c} \frac{32 (x-\pi ) \left(x-\frac{3 \pi }{4}\right) \left(x-\frac{\pi }{2}\right) \left(x-\frac{\pi }{4}\right)}{3 \pi ^4} \\ -\frac{128 x (x-\pi ) \left(x-\frac{3 \pi }{4}\right) \left(x-\frac{\pi }{2}\right)}{3 \pi ^4} \\ \frac{64 x (x-\pi ) \left(x-\frac{3 \pi }{4}\right) \left(x-\frac{\pi }{4}\right)}{\pi ^4} \\ -\frac{128 x (x-\pi ) \left(x-\frac{\pi }{2}\right) \left(x-\frac{\pi }{4}\right)}{3 \pi ^4} \\ \frac{32 x \left(x-\frac{3 \pi }{4}\right) \left(x-\frac{\pi }{2}\right) \left(x-\frac{\pi }{4}\right)}{3 \pi ^4} \end{array} \right)$$

Error from the Lagringain Interpolation evaluated at $$ x = \frac{7 \pi }{8}$$ is

$$Er^{L}=sin\left( \frac{7 \pi }{8}\right)-f_5^L\left(x\right)$$

Where $$f_5^L\left(x\right)$$ simplifies to be $$\frac{4 (\pi -x) x \left(16 \left(2 \sqrt{2}-3\right) x^2+16 \left(3-2 \sqrt{2}\right) \pi x+\left(8 \sqrt{2}-9\right) \pi ^2\right)}{3 \pi ^4}$$

Resulting in

$$\displaystyle Er^L= 0.00148078$$

To determine the nth order of Taylor series expansion necessary to be at least as accurate as the Lagringain expansion the Taylor series was calculated one order at a time and the resulting error term comprared. The generated series is presented here:

$$f_n^T\left(\frac{7 \pi }{8}\right)=$$

$$\left( \begin{array}{l} \cos \left(\frac{\pi }{8}\right) \\ \left(x-\frac{3 \pi }{8}\right) \sin \left(\frac{\pi }{8}\right)+\cos \left(\frac{\pi }{8}\right) \\ \left(x-\frac{3 \pi }{8}\right) \sin \left(\frac{\pi }{8}\right)-\frac{1}{2} \left(x-\frac{3 \pi }{8}\right)^2 \cos \left(\frac{\pi }{8}\right)+\cos \left(\frac{\pi }{8}\right) \\ -\frac{1}{6} \left(x-\frac{3 \pi }{8}\right)^3 \sin \left(\frac{\pi }{8}\right)+\left(x-\frac{3 \pi }{8}\right) \sin \left(\frac{\pi }{8}\right)-\frac{1}{2} \left(x-\frac{3 \pi }{8}\right)^2 \cos \left(\frac{\pi }{8}\right)+\cos \left(\frac{\pi }{8}\right) \\ -\frac{1}{6} \left(x-\frac{3 \pi }{8}\right)^3 \sin \left(\frac{\pi }{8}\right)+\left(x-\frac{3 \pi }{8}\right) \sin \left(\frac{\pi }{8}\right)+\frac{1}{24} \left(x-\frac{3 \pi }{8}\right)^4 \cos \left(\frac{\pi }{8}\right)-\frac{1}{2} \left(x-\frac{3 \pi }{8}\right)^2 \cos \left(\frac{\pi }{8}\right)+\cos \left(\frac{\pi }{8}\right) \\ \frac{1}{120} \left(x-\frac{3 \pi }{8}\right)^5 \sin \left(\frac{\pi }{8}\right)-\frac{1}{6} \left(x-\frac{3 \pi }{8}\right)^3 \sin \left(\frac{\pi }{8}\right)+\left(x-\frac{3 \pi }{8}\right) \sin \left(\frac{\pi }{8}\right)+\frac{1}{24} \left(x-\frac{3 \pi }{8}\right)^4 \cos \left(\frac{\pi }{8}\right)-\frac{1}{2} \left(x-\frac{3 \pi }{8}\right)^2 \cos \left(\frac{\pi }{8}\right)+\cos \left(\frac{\pi }{8}\right) \\ \frac{1}{120} \left(x-\frac{3 \pi }{8}\right)^5 \sin \left(\frac{\pi }{8}\right)-\frac{1}{6} \left(x-\frac{3 \pi }{8}\right)^3 \sin \left(\frac{\pi }{8}\right)+\left(x-\frac{3 \pi }{8}\right) \sin \left(\frac{\pi }{8}\right)-\frac{1}{720} \left(x-\frac{3 \pi }{8}\right)^6 \cos \left(\frac{\pi }{8}\right)+\frac{1}{24} \left(x-\frac{3 \pi }{8}\right)^4 \cos \left(\frac{\pi }{8}\right)-\frac{1}{2} \left(x-\frac{3 \pi }{8}\right)^2 \cos \left(\frac{\pi }{8}\right)+\cos \left(\frac{\pi }{8}\right) \end{array} \right)$$

The resulting errors from the above Taylor series expansions evaluated at $$ x = \frac{7 \pi }{8}$$ is

$$Er^{T}=sin\left( \frac{7 \pi }{8}\right)-f_n^T\left(x\right)= \left( \begin{array}{c} 0.541196 \\ 1.14231 \\ 0.00252314 \\ 0.244677 \\ 0.0103165 \\ 0.0201805 \\ 0.000905156 \end{array} \right)$$

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

n=7
 * $$\therefore Er^{T}\left(f_7^T\left(\frac{7 \pi }{8}\right)\right) < Er^{L}\left(f_5^L\left(\frac{7 \pi }{8}\right)\right)$$
 * $$\therefore Er^{T}\left(f_7^T\left(\frac{7 \pi }{8}\right)\right) < Er^{L}\left(f_5^L\left(\frac{7 \pi }{8}\right)\right)$$
 * }
 * }

Author and proof-reader
[Author]J Davis 19:15, 11 February 2011 (UTC)

[Proof-reader] cavalcanti

= Problem 2 - Verification of $$G(x_i)=0$$ = From (meeting 14 page 3)

Given

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

G(x) := e_{n}^{L}(f;x) - \frac{q_{n+1}(x)}{q_{n+1}(t)} e_{n}^{L}(f;t) $$ $$\displaystyle = e(x) - \frac{q_{n+1}(x)}{q_{n+1}(t)} e(t) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (2-1)
 * }
 * }

Find
To show that $$\displaystyle G(x_i) = 0 $$.

Solution
 We solved on our own

According to (2) meeting 11 page 3

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

e(x) = \frac{q_{n+1}(x)}{(n+1)!} f^{(n+1)} (\xi) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (2-2)
 * }
 * }

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

G(x) = q_{n+1}(x) \left( \frac{f^{(n+1)} (\xi)}{(n+1)!} - \frac{e(t)}{q_{n+1}(t)} \right) $$ $$
 * $$\displaystyle (2-1) \rightarrow
 * $$\displaystyle (2-1) \rightarrow
 * $$\displaystyle (2-3)
 * }
 * }

According to (3) meeting 11 page 3

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

q_{n+1}(x) = (x-x_0)(x-x_1) \cdot \cdot \cdot (x-x_n) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (2-4)
 * }
 * }

Therefore,

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

$$\displaystyle G(x_i) = 0 \qquad $$ for $$\displaystyle \qquad (i=0, 1, \cdot \cdot \cdot, n)$$
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }

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

 * }
 * }
 * }

Author and proof-reader
[Author] Oh

[Proof-reader] Raghunathan

= Problem 3 - Plotting $$e_n^L(f,x), f_n^L(x), l_{i,n}(x), q_{n+1}(x)$$ = From (meeting 15 page 1)

Given
1. $$\displaystyle f(x)=\frac{e^x-1}{x} $$ on $$\displaystyle [-1,+1] $$, $$\displaystyle n=4 $$
 * $$\displaystyle t=5 $$, $$\displaystyle x=0.75 $$

2. $$\displaystyle f(x)=\frac{1}{1+4x^2} $$ on $$\displaystyle [-5,+5] $$, $$\displaystyle n=8 $$
 * $$\displaystyle t=4.5 $$, $$\displaystyle x=3 $$

Find
1.
 * Plot $$\displaystyle x \mbox{ vs. } f(x)$$, $$\displaystyle f_n^L(x)$$, $$\displaystyle e_n^L(x)$$, $$\displaystyle l_{i,n}(x)$$, $$\displaystyle q_{n+1}(x), n=4$$.
 * Plot $$\displaystyle l_{2,4}(\cdot)$$

2.
 * Plot $$\displaystyle x \mbox{ vs. } f(x)$$, $$\displaystyle f_n^L(x)$$, $$\displaystyle e_n^L(x)$$, $$\displaystyle l_{i,n}(x)$$, $$\displaystyle q_{n+1}(x), n=8$$.
 * Plot $$\displaystyle l_{3,8}(\cdot)$$

Addition
 * Find $$\displaystyle e_4^L(f,t)$$ and $$\displaystyle e_4^L(f,x)$$
 * Find $$\displaystyle e_8^L(f,t)$$ and $$\displaystyle e_8^L(f,x)$$

Solution
1. $$\displaystyle f(x)=\frac{e^x-1}{x}, x \in [-1,+1] $$
 * From the class notes (p.11-3), the Lagrangian interpolation error is defined as
 * {| style="width:100%" border="0" align="left"

e_4^L(f;x)=f(x)-f_4^L(x) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (3-1)
 * }
 * ,where
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

f_4^L(x) = \sum_{i=0}^4 l_{i,4}(x)f(x_i) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (3-2)
 * }
 * Also, the Lagrangian interpolation functions are defined as
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

l_{i,4}(x)=\prod_{j=0}^4 \frac{x-x_j}{x_i-x_j} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (3-3)
 * }
 * From the class notes (p.11-3), $$\displaystyle q_{5} $$ can be computed using the equation below.
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

q_{5}(x)=\prod_{i=0}^{4}(x-x_i) $$ $$ Plot:
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (3-4)
 * }
 * }
 * Nm1.s11.team5.HW3.fig3a.png]
 * Nm1.s11.team5.HW3.fig3b.png]
 * Nm1.s11.team5.HW3.fig3c.png]
 * Nm1.s11.team5.HW3.fig3d.png]

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

Addition: Find $$\displaystyle e_4^L(f,t)$$ and $$\displaystyle e_4^L(f,x)$$, $$\displaystyle t=5, x=0.75 $$
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * }
 * }
 * }
 * Using Eq (3-1),(3-2) and (3-3), $$\displaystyle e_4^L(f,t)$$ and $$\displaystyle e_4^L(f,x)$$ can be computed.
 * {| style="width:100%" border="0" align="left"

$$\displaystyle \begin{align} e_4^L(f,t)&=11.0239 \\ e_4^L(f,x)&=-1.6274 \times 10^{-4} \end{align} $$ Matlab code:
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }
 * {| style="width:100%" border="0" align="left"

 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * }
 * }
 * }

2. $$\displaystyle f(x)=\frac{1}{1+4x^2}, x \in [-5,+5] $$
 * From the class notes (p.11-3), the Lagrangian interpolation error is defined as
 * {| style="width:100%" border="0" align="left"

e_8^L(f;x)=f(x)-f_8^L(x) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (3-5)
 * }
 * ,where
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

f_8^L(x) = \sum_{i=0}^8 l_{i,8}(x)f(x_i) $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (3-6)
 * }
 * Also, the Lagrangian interpolation functions are defined as
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

l_{i,8}(x)=\prod_{j=0}^8 \frac{x-x_j}{x_i-x_j} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (3-7)
 * }
 * From the class notes (p.11-3), $$\displaystyle q_{9} $$ can be computed using the equation below.
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

q_{9}(x)=\prod_{i=0}^{8}(x-x_i) $$ $$ Plot:
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (3-8)
 * }
 * }
 * Nm1.s11.team5.HW3.fig3e.png]
 * Nm1.s11.team5.HW3.fig3f.png]
 * Nm1.s11.team5.HW3.fig3g.png]
 * Nm1.s11.team5.HW3.fig3h.png]

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

Addition: Find $$\displaystyle e_8^L(f,t)$$ and $$\displaystyle e_8^L(f,x)$$, $$\displaystyle t=4.5, x=3 $$
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * }
 * }
 * }
 * Using Eq (3-5),(3-6) and (3-7), $$\displaystyle e_8^L(f,t)$$ and $$\displaystyle e_8^L(f,x)$$ can be computed.
 * {| style="width:100%" border="0" align="left"

$$\displaystyle \begin{align} e_8^L(f,t)&=1.784 \\ e_8^L(f,x)&=-0.3786 \end{align} $$ Matlab code:
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }
 * {| style="width:100%" border="0" align="left"

 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * }
 * }
 * }

Author and proof-reader
[Author] Shin

[Proof-reader]

= Problem 4 - Area of a Bifolium = From (meeting 15 page 2)

Given
The bifolium: $$\displaystyle r(\theta)=2sin(\theta)cos^{2}(\theta)$$, where $$\displaystyle \theta=[0,\pi]$$.

Find
1. Do literature search to find history and application, if any, of this classic curve. 2. Find the area of one folium,with an accuracy of $$10^{-6}$$ by:
 * 2.1 Composite trapezoidal
 * 2.2 Composite Simpson
 * 2.3 Area of triangles

Solution by J Davis
''' We solved this problem on our own. '''

1. Lit research The bifolium is the pedal curve of the deltoid where the pedal point is the midpoint of one of the three curved sides. Eric W. "Bifolium." From MathWorld--A Wolfram Web Resource)

The implicit properties of the Bifolium curve can be found here:

The word folium means leaf-shaped.

The general form of the folium is given by the formula in polar coordinates as

$$\displaystyle r = -b cos\theta + 4a cos\theta sin2\theta$$

There are three special forms of the folium, the simple folium, the double folium and the trifolium. These correspond to the cases where

$$\displaystyle b = 4a, b = 0, b = a $$

The bifolium has been studied by Longchamps (1886) and Brocard (1887), and is also named the double folium.

It was Johann Kepler (1609) who was the first to describe the curve. Therefore the curve is also known as Kepler's folium.

 The curve bears striking resembalance to the Folium of Descartes, although no direct relation could be found other than name and apperance.

2. Area of one folium: The aera of an equation in polar form is found by the following integral formula

$$\frac{1}{2} \int_{a}^{b} r\left(\theta \right)^2\,d\theta$$,

Aplying this formula to the Bifolium funciton we get

$$A=\frac{1}{2} \int_0^{\frac{\pi }{2}} \left(2 \sin (\theta ) \cos ^2(\theta )\right)^2 \, d\theta $$

Integrating from $$0$$ to $$\frac{\pi }{2}$$ inorder to find the area of only one leaf resulting in excatly

$$A=\frac{\pi }{16}$$

The integration above will be approximated by the following methods

Evaluating the formulas and equations in polar form prevents the need to find the area between the curves by subtracting the area of one from the other.
 * 2.1 Composite Trapezoidal

The generalized function is:

$$I_n = \sum _{i=0}^{n-1} \left\{\frac{h}{2} \left(f\left(x_{i}\right)+f\left(x_{i+1}\right)\right)\right\}$$ where

$$h=\frac{b-a}{n}, x_i = a + h i,\text{ for }i=0, 1, \dots, n$$

This rule is only valid for uniformly spaced data points.

Appling to the Bifolium funciton we get

$$\frac{1}{2}\sum _{i=0}^{n-1} \left\{\frac{h}{2} \left(r\left(\theta _{i}\right){}^2+r\left(\theta _{i+1}\right){}^2\right)\right\}$$

for $$n=2,a=0,b=\frac{\pi}{2}$$

$$h=\frac{\pi}{4}, \theta _{i}=\frac{i \pi}{4}$$

$$A=\frac{1}{2} \sum _{i=0}^1 \frac{\pi}{8}  \left(\left(2 \sin ^2\left(\frac{\pi}{4}(i+1)\right) \cos \left(\frac{\pi}{4}(i+1)\right)\right)^2+\left(2 \sin ^2\left(\frac{\pi}{4}i\right) \cos \left(\frac{\pi}{4}i\right)\right)^2\right)$$

Evaluating this $$A=\frac{\pi}{16}$$

Using the Composite Trapezoidal rule to find the area of one leaf of the Bifolium curve, in polar coordinates, only two sections are required to achive the exact answer. Matlab code to evaluate this is given below.

 * 2.2 Composite Simpson

$$I_n = \sum _{i=0}^{n-1} \left\{\frac{h}{3} \left(f\left(x_{i}\right)+4f\left(\frac{x_{i}+x_{i+1}}{2}\right)+f\left(x_{i+1}\right)\right)\right\}$$ where

$$h=\frac{b-a}{n}, x_i = a + h i,\text{ for }i=0, 1, \dots, n$$

This rule is also only valid for uniformly spaced data points.

Appling to the Bifolium funciton we get

$$\frac{1}{2}\sum _{i=0}^{n-1} \left\{\frac{h}{3} \left(r\left(\theta _{i}\right)^{2}+r\left(\frac{\theta _{i}+\theta _{i+1}}{2}\right)^{2}+r\left(\theta _{i+1}\right)^{2}\right)\right\} $$

for $$n=2,a=0,b=\frac{\pi}{2}$$

$$h=\frac{\pi}{4}, \theta _{i}=\frac{i \pi}{4} $$

$$A=\frac{1}{2} \sum _{i=0}^1 -\frac{1}{6} \left(\frac{\pi i}{4}-\frac{\pi  (i+1)}{4} \right) \left(4 \sin ^4\left(\frac{\pi  i}{4}\right) \cos ^2\left(\frac{\pi  i}{4}\right)+4 \sin ^4\left(\frac{\pi  (i+1)}{4} \right) \cos ^2\left(\frac{\pi  (i+1)}{4} \right)+16 \sin ^4\left(\frac{\left(\frac{\pi  i}{4}+\frac{\pi (i+1) }{4} \right)}{2} \right) \cos ^2\left(\frac{\left(\frac{\pi  i}{4}+\frac{\pi (i+1) }{4} \right)}{2} \right)\right) $$

Which simplifies to

$$\frac{1}{2} \left(\frac{1}{24} \pi \left(\frac{1}{2}+16 \sin ^2\left(\frac{\pi }{8}\right) \cos ^4\left(\frac{\pi }{8}\right)\right)+\frac{1}{24} \pi  \left(\frac{1}{2}+16 \sin ^4\left(\frac{\pi }{8}\right) \cos ^2\left(\frac{\pi }{8}\right)\right)\right)$$

Which when evaluated results in an error of $$\displaystyle 2.7755575615628914x10^{-17}$$

Using the Composite Simpson rule to find the area of one leaf of the Bifolium curve, in polar coordinates, only two sections are required to achive the answer within the tolorance of $$\displaystyle 10^{-6}$$ . Matlab code to evaluate this is given below.

 * 2.3 Area of triangles

The first step is to convert the curve to cartesion form and find the x and y coordinates of n points along the curve

This can be done with the following formulas

$$h=\frac{b-a}{n}, Pts_i = h i,\text{ for }i=0, 1, \dots, n$$

$$fx_i:=f(Pts_i) Cos(Pts_i),fy_i:=f(Pts_i) Sin(Pts_i),\text{ where } f(Pts_i):=2 \sin ^2\left(Pts_i\right) \cos \left(Pts_i\right)$$

The area of a triangle arbitrairly oriented in space is found from the coordinates of the verticies

$$\frac{1}{2} \left[-x_2 y_1+x_3 y_1+x_1 y_2-x_3 y_2-x_1 y_3+x_2 y_3\right]$$

For this application one of the verticies is at the origen, we will chose $$x_3=0,y_3=0$$

Simplifiing the above to

$$\frac{1}{2} \left(x_1 y_2-x_2 y_1\right)$$

The total area is found by calculating the area of each triangle formed by two sequential points and the origen. One possible algrothymn is as follows

$$\sum _{i=1}^{n-1} \frac{1}{2} \left(fx\left(Pts_{i}\right) fy\left(Pts_{i+1}\right)-fx\left(Pts_{i+1}\right) fy\left(Pts_{i}\right)\right)$$

1140 triangular divisions were required to achive an error of less than $$10^{-6}.$$ Convergence of the error is presented in a log-log plot below. Matlab code to evaluate this is given below.

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

 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * }
 * }
 * }

Solution by Shin
The bifolium has the following mathematical equation.
 * {| style="width:100%" border="0" align="left"

r(t)=2\sin(t)\cos^2(t) \mbox{, } t \in [0, \pi] $$ $$ In this problem, we're only interested in computing the area in one leaf, so $$\displaystyle t $$ will have the different range.
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (4-1)
 * }
 * }
 * $$\displaystyle t \in [0, \frac{\pi}{2}]$$

In order to apply composite Trapezoidal rule and composite Simpson's rule, we need to have the equation expressed in the Cartesian coordinate system. We have the following properties to obtain the equation defined in the Cartesian coordinate system.
 * {| style="width:100%" border="0" align="left"

\begin{align} \sin(t)&=\frac{y}{r} \\ \cos(t)&=\frac{x}{r} \\ r&=\sqrt{x^2+y^2} \end{align} $$ $$ Substitute Eq(4-2) to Eq(4-1) then, we have the following equation expressed in terms of $$\displaystyle x,y $$.
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (4-2)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

(x^2+y^2)^2=2x^2y $$ $$ Before jumping into the calculation of area, it should be noted that the values that $$\displaystyle x $$ can take on are different from $$\displaystyle t \in [0,\frac{\pi}{2}]$$. But, it can be found out simply by running the following code. Matlab code:
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (4-3)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

As a result, $$\displaystyle x $$ is in the range of the following.
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * }
 * }
 * }
 * $$\displaystyle x \in [0.0, 0.6495] $$

In order to obtain $$\displaystyle y $$ corresponding to $$\displaystyle x $$ in the range mentioned above, the following equation needs to be solved. The equation below is derived from Eq(4-3) by expanding out Eq(4-3) and expressing in terms of $$\displaystyle y $$.
 * {| style="width:100%" border="0" align="left"

y^4+2x^2y^2-2x^2y+x^4=0 $$ $$ Eq(4-4) is the 4th-order polynomial equation expressed in terms of $$\displaystyle y $$. In this equation, the terms expressed in $$\displaystyle x $$ will be considered as coefficients. Eq(4-4) can be solved using MATLAB command 'roots'. Area computed using Wolfram Alpha The area of one leaf in bifolium is $$\displaystyle \frac{\pi}{16} $$. (Refer to Wolfram Alpha) 1. Composite Trapezoidal rule
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (4-4)
 * }
 * }
 * From the class notes (p.7-4), the composite Trapezoidal rule is defined as below.
 * {| style="width:100%" border="0" align="left"

I_n=h(\dfrac{1}{2}f(x_0)+f(x_1)+f(x_2)+...+f(x_{n-1})+\dfrac{1}{2}f(x_{n})) \mbox{, }h=\dfrac{b-a}{n} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (4-5)
 * }
 * The area can be computed by subtracting the integration on the upper curve by the integration on the lower curve on one leaf.
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

AREA=I_{upper}-I_{lower} $$ $$ Matlab code:
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (4-6)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

Result:
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * }
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle \begin{align} n&=10000 \\ Area&=0.196349420478339 \\ Accuracy&=1.203710234265465 \times 10^{-7} \end{align} $$ 2. Composite Simpson's rule
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }
 * From the class notes (p.7-4), the composite Simpson's rule is defined as below.
 * {| style="width:100%" border="0" align="left"

I_n=\dfrac{h}{3}(f(x_0)+4f(x_1)+2f(x_2)+4f(x_3)+...+2f(x_{n-2})+4f(x_{n-1})+f(x_n))\mbox{, }h=\frac{b-a}{n} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * <p style="text-align:right;">$$\displaystyle (4-7)
 * }
 * The area can be computed in the same way as in Eq(4-6).
 * The area can be computed in the same way as in Eq(4-6).

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

Result:
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * }
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle \begin{align} n&=10000 \\ Area&=0.196349471145946 \\ Accuracy&=6.9703415817024 \times 10^{-8} \end{align} $$
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }

3. Sum of Triangles The area on the bifolium can be computed by summing all areas of triangle divided in uniform angle. Matlab code:
 * {| style="width:100%" border="0" align="left"

Result:
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * }
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$\displaystyle \begin{align} n&=10000 \\ Area&=0.196349527930081 \\ Accuracy&=1.291928136692988 \times 10^{-8} \end{align} $$
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }

Author and proof-reader
[Author]J Davis 01:56, 15 February 2011 (UTC) Shin 04:50, 15 February 2011 (UTC) [Proof-reader] cavalcanti

= Problem 5 - Proof of expression of the error, $$e^{(n+1)}(x)$$ = From (meeting 16 page 3)

Given
Expression of the error such that: $$\displaystyle e^{(n+1)}(x)=f^{(n+1)}(x)-0$$.

Find
Show that: $$\displaystyle e^{(n+1)}(x)=f^{(n+1)}(x)$$.

Solution
''' We solved this problem on our own. '''

The error for the Lagrange Interpolation can be found using: $$e^{L}_{n}(x)=f(x)-f_{n}(x)$$ For simplicity, we will rewrite the equation as follows: $$\displaystyle e(x)=f(x)-f_{n}(x)$$ Taking the first derivative, $$e^{(1)}(x)=f^{(1)}(x)-f_{n}^{1}(x)$$ Taking the derivative again, $$e^{(2)}(x)=f^{(2)}(x)-f_{n}^{2}(x)$$ . . . Similarly, $$e^{(n)}(x)=f^{(n)}(x)-f_{n}^{1}(x)$$ $$e^{(n+1)}(x)=f^{(n+1)}(x)-f_{n}^{n+1}(x)$$ We know that $$f_{n}(x)$$ is a polynomial of degree n,So $$f_{n}^{(n+1)}=0$$.
 * {| style="width:100%" border="0" align="left"

 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |

$$\therefore e^{(n+1)}(x)=f^{(n+1)}(x)$$

 * }
 * }
 * }

Author and proof-reader
[Author] cavalcanti

[Proof-reader] Raghunathan

= Problem 6 - Verification of $$q_{n+1}^{(n+1)}(x) = (n+1)!$$ =

From (meeting 16 page 3)

Given

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

$$
 * $$\displaystyle q_{n+1}(x) = (x-x_0)(x-x_1) \cdot \cdot \cdot (x-x_n) $$
 * <p style="text-align:right;">$$\displaystyle (6-1)
 * <p style="text-align:right;">$$\displaystyle (6-1)
 * }
 * }

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

 * }
 * }
 * }

Find

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

$$
 * $$\displaystyle q_{n+1}^{(n+1)}(x) = (n+1)!$$
 * <p style="text-align:right;">$$\displaystyle (6-2)
 * <p style="text-align:right;">$$\displaystyle (6-2)
 * }
 * }

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

 * }
 * }
 * }

Solution
 We solved on our own

Restate, $$\displaystyle (6-1) $$
 * {| style="width:100%" border="0" align="left"

 * $$\displaystyle q_{n+1}(x) = x^{n+1} + C_n \cdot x^n + C_{n-1} \cdot x^{n-1} + \cdot \cdot \cdot + C_0 \cdot x^0$$
 * $$\displaystyle q_{n+1}(x) = x^{n+1} + C_n \cdot x^n + C_{n-1} \cdot x^{n-1} + \cdot \cdot \cdot + C_0 \cdot x^0$$

$$\displaystyle ( C_i$$ is coefficient of $$\displaystyle x^i $$ where $$\displaystyle i=0, 1, \cdot \cdot \cdot, n )$$ $$
 * <p style="text-align:right;">$$\displaystyle (6-3)
 * }
 * }

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

 * }
 * }
 * }

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

 * $$\displaystyle q_{n+1}^{(1)}(x) = (n+1) \cdot x^{n} + n \cdot C_n \cdot x^{n-1} + (n-1) \cdot C_{n-1} \cdot x^{n-2} + \cdot \cdot \cdot + \underbrace{C_0 \cdot x^0}_{ \rightarrow 0}$$
 * $$\displaystyle q_{n+1}^{(1)}(x) = (n+1) \cdot x^{n} + n \cdot C_n \cdot x^{n-1} + (n-1) \cdot C_{n-1} \cdot x^{n-2} + \cdot \cdot \cdot + \underbrace{C_0 \cdot x^0}_{ \rightarrow 0}$$

$$
 * <p style="text-align:right;">$$\displaystyle (6-4)
 * }
 * }

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

 * }
 * }
 * }

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

q_{n+1}^{(2)}(x) = (n+1) \cdot n \cdot x^{n-1} + n \cdot (n-1) \cdot C_n \cdot x^{n-2} + (n-1) \cdot (n-2) \cdot C_{n-1} \cdot x^{n-3} + \cdot \cdot \cdot + 0$$
 * $$\displaystyle
 * $$\displaystyle

$$
 * <p style="text-align:right;">$$\displaystyle (6-5)
 * }
 * }

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

 * }
 * }
 * }

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

$$\displaystyle \cdot $$

$$\displaystyle \cdot $$

$$\displaystyle \cdot $$
 * }
 * }
 * }

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

 * }
 * }
 * }

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

$$\displaystyle \begin{align} q_{n+1}^{(n+1)}(x) &= (n+1) \cdot n \cdot (n-1) \cdot \cdot \cdot 2 \cdot 1 + 0 \\ &= (n+1)! \end{align} $$ $$
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * <p style="text-align:right;">$$\displaystyle (6-6)
 * }
 * }

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

 * }
 * }
 * }

Author and proof-reader
[Author] Oh

[Proof-reader] Shin

= Problem 7 - Verification of $$\left| E_1 \right|$$ = From (meeting 17 page 2)

Given

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

 * $$\displaystyle \left| E_1 \right| \leq \frac{M_2}{2!} \int_{a}^{b} \left| q_2(x) \right| \ dx$$
 * $$\displaystyle \left| E_1 \right| \leq \frac{M_2}{2!} \int_{a}^{b} \left| q_2(x) \right| \ dx$$

$$ \ = \frac{M_2}{2!} \int_{a}^{b} \underbrace{(x-a)}_{\geq 0} \left|\underbrace{(x-b)}_{\leq 0} \right| \ dx$$ $$
 * <p style="text-align:right;">$$\displaystyle (7-1)
 * }
 * }

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

 * }
 * }
 * }

Find

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

 * $$\displaystyle (7-1) \rightarrow \frac{(b-a)^3}{12} M_2 \ = \frac{h^3}{12} M_2 \qquad (h := b-a)$$
 * }
 * }
 * }
 * }

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

 * }
 * }
 * }

Solution
 We solved on our own

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

\begin{align} (7-1) &= \frac{M_2}{2!} \int_{a}^{b} (-x^2+(a+b)x-ab) \ dx \\ &= \frac{M_2}{2!} \left[ -\frac{1}{3}x^3 + \frac{1}{2} (a+b) x^2 - abx \right]_{a}^{b} \\ &= \frac{M_2}{2!} \left\{ \left( - \frac{1}{3}b^3 + \frac{1}{2} (a+b) b^2 - ab^2 \right) - \left( - \frac{1}{3}a^3 + \frac{1}{2} (a+b) a^2 - a^2 b \right) \right\} \\ &= \frac{M_2}{2!} \left( \frac{1}{6} b^3 - \frac{1}{6} a^3 - \frac{1}{2} ab^2 + \frac{1}{2} a^2 b \right) \\ &= \frac{M_2}{2!} \frac{1}{6} \left( b-a \right)^3 \end{align} $$
 * $$\displaystyle
 * $$\displaystyle

$$
 * <p style="text-align:right;">$$\displaystyle (7-2)
 * }
 * }

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

 * }
 * }
 * }

There fore,

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

$$\displaystyle (7-1) = \frac{(b-a)^3}{12} M_2 = \frac{h^3}{12} M_2 \qquad (h := b-a) $$
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }

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

 * }
 * }
 * }

Author and proof-reader
[Author] Oh

[Proof-reader] Shin

=  Problem 8 - Verification of $$\left| E_2 \right| $$  = From (meeting 17 page 3)

Given

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

\left| \right| \le \frac\int_a^b {\left| {(x - a)\left( {x - \frac{2}} \right)(x - b)} \right|dx} $$ $$
 * <p style="text-align:right;">$$\displaystyle (8-1)
 * }
 * }

Find
Show that Eq (8-1) is
 * {| style="width:100%" border="0" align="left"

\displaystyle \begin{align} &=\frac{M_3} \\ &= \frac{M_3} \end{align} $$ $$
 * <p style="text-align:right;">$$\displaystyle (8-2)
 * }
 * }

Solution

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

\displaystyle \begin{align} \frac\int_a^b {\left| {(x - a)\left( {x - \frac{2}} \right)(x - b)} \right|dx}&=\frac\int_a^{\frac{2}} {(x - a)\left( {-x + \frac{2}} \right)(-x + b)dx} \\ &+ \frac\int_{\frac{2}}^b {(x - a)\left( {x - \frac{2}} \right)(-x + b)dx} \end{align} $$ $$ Solving the first term
 * <p style="text-align:right;">$$\displaystyle (8-3)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\frac\int_a^{\frac{2}} {(x - a)\left( {-x + \frac{2}} \right)(-x + b)dx}$$ $$= \int_a^{\frac{2}}- \frac{2} + \frac{2} - \frac{2} + 2abx - \frac{2} + \frac{2} - \frac{2} + {x^3} $$ $$=\left. { - \frac{2} + \frac{4} - \frac{2} + ab{x^2} - \frac{2} + \frac{4} - \frac{2} + \frac{4}} \right|_a^{\frac{2}}$$ <p style="text-align:right;">$$\displaystyle (8-4) $$ Evaluating at $$x=\frac{b+a}{2}$$ and $$x=a$$ gives respectively
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$=- \frac{1}{4}{a^2}{b^2}$$ <p style="text-align:right;">$$\displaystyle (8-5) $$ Expanding these terms and subtracting gives
 * $$=\frac{1}({a^2} + {b^2}){(a + b)^2} + \frac{3}{(a + b)^4}$$
 * $$=\frac{1}({a^2} + {b^2}){(a + b)^2} + \frac{3}{(a + b)^4}$$
 * }
 * }
 * {| style="width:100%" border="0" align="left"

<p style="text-align:right;">$$\displaystyle (8-6) $$ Solving the second term
 * $$\frac{1}\left( {{a^4} - 4{a^3}b + 6{a^2}{b^2} - 4a{b^3} + {b^4}} \right) = \frac{1}{(b - a)^4}$$
 * $$\frac{1}\left( {{a^4} - 4{a^3}b + 6{a^2}{b^2} - 4a{b^3} + {b^4}} \right) = \frac{1}{(b - a)^4}$$
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$=\frac{2} - \frac{2} + \frac{2} - 2abx + \frac{2} - \frac{2} + \frac{2} - {x^3}$$ $$=\left. {\frac{2} - \frac{4} + \frac{2} - ab{x^2} + \frac{2} - \frac{4} + \frac{2} - \frac{4}} \right|_{\frac{2}}^b$$ <p style="text-align:right;">$$\displaystyle (8-7) $$ Evaluating at $$x=b$$ and $$x=\frac{b+a}{2}$$ gives respectively
 * $$\frac\int_{\frac{2}}^b {(x - a)\left( {x - \frac{2}} \right)(-x + b)dx} $$
 * $$\frac\int_{\frac{2}}^b {(x - a)\left( {x - \frac{2}} \right)(-x + b)dx} $$
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$=- \frac{1}({a^2} + {b^2}){(a + b)^2} - \frac{3}{(a + b)^4}$$ <p style="text-align:right;">$$\displaystyle (8-8) $$ Expanding these terms and subtracting gives
 * $$= \frac{1}{4}{a^2}{b^2}$$
 * $$= \frac{1}{4}{a^2}{b^2}$$
 * }
 * }
 * {| style="width:100%" border="0" align="left"

<p style="text-align:right;">$$\displaystyle (8-9) $$ Adding Eq (8-6) and (8-9) as Eq (8-3) shows, we get
 * $$\frac{1}\left( {{a^4} - 4{a^3}b + 6{a^2}{b^2} - 4a{b^3} + {b^4}} \right) = \frac{1}{(b - a)^4}$$
 * $$\frac{1}\left( {{a^4} - 4{a^3}b + 6{a^2}{b^2} - 4a{b^3} + {b^4}} \right) = \frac{1}{(b - a)^4}$$
 * }
 * }
 * {| style="width:100%" border="0" align="left"

<p style="text-align:right;">$$\displaystyle (8-10) $$ Then
 * $$\frac{1}{(b - a)^4}$$
 * $$\frac{1}{(b - a)^4}$$
 * }
 * }
 * {| style="width:100%" border="0" align="left"

<p style="text-align:right;">$$\displaystyle (8-11) $$ Eq (8-11) is equivalent to Eq (8-2) therefor Eq (8-1) is equivalent to Eq (8-2)
 * $$\left( {\frac} \right)\left( {\frac{1}{{(b - a)}^4}} \right) = \frac$$
 * $$\left( {\frac} \right)\left( {\frac{1}{{(b - a)}^4}} \right) = \frac$$
 * }
 * }

= References =

= Contributing members =

Signatures
Oh, Sangmin Solved and posted Problem 2, 6 and 7 04:07, 10 February 2011 (UTC) cavalcanti Solved and posted problem 5, partial problem 4, and proof read. 19:40, 13 February 2011 (UTC) Shin Solved and posted problem 3,4 and proof-read 6,7. 04:55, 15 February 2011 (UTC) Raghunathan Solved problems manually.Prof-read 3.2,3.5,3.8. 17:00,16 February 2011(UTC).

J Davis 14:44, 16 February 2011 (UTC) Solved and posted the solutions for problems 1 and 4 Reiss, Phillip Solved and posted problem 8

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: User:Egm6341.s11.team5/HW3


text:
User:Egm6341.s11.team5/HW4

=''' Problem 4.1 - Simpson's rule integrates the 3rd order polynomial exactly. '''= From [[media:nm1.s11.mtg18.djvu|Mtg 18-2]]

Given

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

f(x) = P_3(x) = 1 + 3x -9x^2 +12x^3 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (1-1)
 * }
 * }

Find
 Find, I (exact) and I_2 (Simple simpson)

Solution
 We solved on our own

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

\begin{align} I &= \int_{-2}^{1} f(x) \ dx \\ &= \left[ x + \frac{3}{2} x^2 -3x^3 +3x^4\right]_{-2}^{1} \\ &= -73.5 \end{align} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (1-2)
 * }
 * }

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

 * }
 * }
 * }

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

\begin{align} I_2 &= \frac{h}{3} \left[ f(x_0) +4f(x_1) + f(x_2) \right] \\ &= \frac{1}{2} \left[ f(-2) +4f(- \frac{1}{2}) + f(1) \right] \\ &= \frac{1}{2} \left[ -137 -17 +7 \right] \\ &= -73.5 \end{align} $$
 * $$\displaystyle
 * $$\displaystyle

Where, $$\displaystyle \ \left( h = \frac{1-(-2)}{2} = \frac{3}{2}, \qquad x_0 = -2, \ x_1 = - \frac{1}{2}, \ x_2 = 1 \right)$$

$$.
 * $$\displaystyle (1-3)
 * }
 * }

Author and proof-reader
[Author] Oh

[Proof-reader]

= Problem 4.2 - Change of Variables = From [[media:nm1.s11.mtg20.djvu|Mtg 20-2]]

Given
$$A(t) = \int_{-t}^{k}f(x(t))dt +\int_{k}^{+t} f(x(t))dt $$, where $$ k \in (-t, +t)$$

Find
Prove that $$A^{(1)}(t) = F(-t) + F(t)$$

Solution
''' We solved this problem on our own. '''

Starting with our given equation, $$A(t) = \int_{-t}^{k}f(x(t))dt +\int_{k}^{+t} f(x(t))dt $$, we will take the derivative: $$A^{(1)}(t)=\frac{d}{dt}\left [ \int_{-t}^{k}f(x(t))dt +\int_{k}^{+t}f(x(t))dt \right ]$$ $$A^{(1)}(t)=\frac{d}{dt}\left [ f(x(k)) - f(x(-t)) + f(x(t)) - f(x(k)) \right ]$$, where the $$f(x(k))$$ cancel out. We then get: $$A^{(1)}(t)=\frac{d}{dt} \left( -f(x(-t)) \right) + \frac{d}{dt} \left( -f(x(t)) \right) $$, where $$F(t)=\frac{d}{dt} \left( -f(x(t)) \right)$$ and $$F(-t) = \frac{d}{dt} \left( -f(x(-t)) \right) $$.

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

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

\therefore A^{(1)}(t)= F(-t) + F(t)

$$
 * }
 * }
 * }

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

.
 * }
 * }
 * }

Author and proof-reader
[Author] Cavalcanti

[Proof-reader] Reiss

= Problem 4.3 - Proof of Simple Simpson Error Theorm = From [[media:nm1.s11.mtg20.djvu|Mtg 20-3]]

Given
Let, $$\displaystyle G(t):=e(t)-t^5e(1)$$ where, $$\displaystyle e(t)=\int_{-t}^{t}F(\tau )d\tau - \frac{t}{3}[ F(-t) + 4F(0) +F(t)]$$

Find
Show that $$\displaystyle G^{(2)}(0)=0$$

Solution
 We solved it on our own

The first derivative of e(t)is as follows: Second Derivative is as follows: At $$t=0$$, With the given equation $$\displaystyle G(t)$$ and its derivatives are calculated. At $$t=0$$,

Author and proof-reader
[Author] Raghunathan

[Proof-reader] Reiss

= Problem 4.4 -Finding e(3)in the Simple Simpson's rule with tighter bounds = From [[media:nm1.s11.mtg20.djvu|Mtg 20-3]]

Given
$$\displaystyle e^{(1)}(t)= [F(-t)+F(t)]-\frac{1}{3}[F(-t)+4F(0)+F(t)]-\frac{t}{3}[-F^{(1)}(-t)+F^{(1)}(t)]$$

Find
Show that, $$\displaystyle e^{(3)}(t)=-\frac{t}{3}[-F^{(3)}(-t)+F^{(3)}(t)] $$

Solution
 We solved it on our own  First Derivative Given in20-2 and is also proved in HW4.2 $$\displaystyle e^{(1)}(t)= [F(-t)+F(t)]-\frac{1}{3}[F(-t)+4F(0)+F(t)]-\frac{t}{3}[-F^{(1)}(-t)+F^{(1)}(t)]$$ Second Derivative Taking derivative,we get: $$\displaystyle e^{(2)}(t)=[-F^{(1)}(-t)+F^{(1)}(t)]-\frac{1}{3}[-F^{(1)}(-t)+F^{(1)}(t)]-\frac{1}{3}[-F^{(1)}(-t)+F^{(1)}(t)] -\frac{t}{3}[F^{(2)}(-t)+F^{(2)}(t)]$$ which is simplified to: $$\displaystyle e^{(2)}(t)= \frac{1}{3}[-F^{(1)}(-t)+F^{(1)}(t)] -\frac{t}{3}[F^{(2)}(-t)+F^{(2)}(t)]$$ Third Derivative Taking the derivative again, we get: $$\displaystyle e^{(3)}(t)=\frac{1}{3}[F^{(2)}(-t)+F^{(2)}(t)] -\frac{1}{3}[F^{(2)}(-t)+F^{(2)}(t)]-\frac{t}{3}[-F^{(3)}(-t)+F^{(3)}(t)]$$ Simplifying, we get: $$\displaystyle e^{(3)}(t)= -\frac{t}{3}[-F^{(3)}(-t)+F^{(3)}(t)]$$ Hence derived.

Author and proof-reader
[Author] Raghunathan

[Proof-reader]

= Problem 4.5 - Proof of e(1) in Simple Simpson Error = From [[media:nm1.s11.mtg20.djvu|Mtg 20-3]]

Given

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

e(1)=-\frac{1}{90}F^{4}(\zeta_4) $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (5-1) $$
 * }
 * }

Find
Prove that $$\displaystyle e(1)=-\frac{(b-a)^4}{1440}f^{(4)}(\xi)$$ and find the relationship between $$\displaystyle \zeta_4 $$ and $$\displaystyle \xi $$.

Solution
Before solving this problem, the following should be noted.
 * {| style="width:100%" border="0" align="left"

\begin{align} F(t) &= f(x(t)) \\ x&=x_1+ht \\ \mathrm{d}x &=h \mathrm{d}t \\ \xi&=x_1+h \zeta_4 \mbox{, } (t=\zeta_4,x=\xi) \\ \end{align} $$ With the equations above, the proof can be made as below.
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (5-2)$$
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\begin{align} F^{(4)}(\zeta_4)&=\frac{\mathrm{d}^4}{\mathrm{d}t^4}F(\zeta_4) \\ &=\frac{\mathrm{d}^4}{(\frac{\mathrm{d}x}{h})^4}f(\xi) \\ &=h^4\frac{\mathrm{d}^4}{\mathrm{d}x^4}f(\xi) \\ &=(\frac{b-a}{2})^4f^{(4)}(\xi) \mbox{ ,} h=\frac{b-a}{2} \end{align} $$ Substitute Eq.(5-3) into Eq.(5-1).
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (5-3)$$
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\begin{align} e(1)&=-\frac{1}{90}\frac{(b-a)^4}{16}f^{(4)}(\xi) \\ &=-\frac{(b-a)^4}{1440}f^{(4)}(\xi) \end{align} $$.
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle (5-4)$$
 * }
 * }

Author and proof-reader
[Author] Shin

[Proof-reader] Raghunathan

=''' Problem 4.6 -Integration Comparison. '''= From [[media:nm1.s11.mtg21.djvu|Mtg 21-1]]

Given
$$f(x)=\frac{e^{x}-1}{x}$$

Find
Integrate f(x) using roots of Legendre polynominal and Chebyshev polynominal in Newton-Cotes as well as Gauss Legendre quadrature and compare results.

Solution
 We solved this our selves

Doubble click on the thumbnail to view.

Author and proof-reader
[Author] J Davis 19:30, 28 February 2011 (UTC) [Proof-reader]

= Problem 4.7 - Composite Simpson's rule verification = From [[media:nm1.s11.mtg22.djvu|Mtg 22-2]]

Given

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

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle 	\left | {E_n}^{S}\right |\leqslant\dfrac{(b-a)^5}{2880n^4}M_4=\dfrac{(b-a)h^4}{2880} M_4

 * $$ \left( M_4:=max\left |f^{(4)}(\xi)\right | \qquad \xi\in[a,b] \right)$$

$$
 * $$\displaystyle (7-1)
 * }.
 * }.

Find
 Verify $$\displaystyle (7-1) $$

Solution
 We solved on our own

 According to $$\displaystyle \ (4) $$[[media:nm1.s11.mtg7.djvu|Mtg 7-4]]
 * {| style="width:100%" border="0" align="left"

$$ $$
 * $$\displaystyle
 * $$\displaystyle
 * $$\displaystyle 	E_{n}^{S} := I - I_{n}^{s} = \int_{a}^{b} f(x)dx - \dfrac{h}{3}[f(x_0)+4f(x_1)+2f(x_2)+...+2f(x_{n-2})+4f(x_{n-1})+f(x_n)]

=\sum_{i=1}^{n/2} \left\{ \ \int_{x_{2i-2}}^{x_{2i}} f(x)dx-\dfrac{h}{3} \left[ f(x_{2i-2})+4f(x_{2i-1})+f(x_{2i}) \right] \right\} $$

$$
 * $$\displaystyle (7-2)
 * }
 * }

 According to SSET [[media:nm1.s11.mtg18.djvu|Mtg 18-2]]
 * {| style="width:100%" border="0" align="left"

$$  $$
 * $$\displaystyle
 * $$\displaystyle
 * $$ \left| E_{n}^{S} \right| \leq \frac{h^{5}}{90} \underbrace {\sum_{i=1}^{n} \left( \max \left|f^{(4)}(\xi )\right| \right) \qquad \xi \in \ ]\ x_{i-1}, x_i\ [}_{\bar{M}_{4} :=}  $$
 * $$\displaystyle (7-3)
 * }
 * }

 According to $$\displaystyle \ (4) $$[[media:nm1.s11.mtg17.djvu|Mtg 17-1]]
 * {| style="width:100%" border="0" align="left"

$$
 * $$\displaystyle
 * $$\displaystyle
 * $$ \bar{M}_{4} \leq n M_4 $$

$$
 * $$\displaystyle (7-4)
 * }
 * }

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

$$\displaystyle \left| E_{n}^{S} \right| \leq \frac{(b-a)^{5}}{2880 n^5} n M_4 = \frac{(b-a)h^{4}}{2880 }  M_4 $$
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * }.
 * }.
 * }.

Author and proof-reader
[Author] Oh

[Proof-reader] Reiss

= Problem 4.8 - Finding n st Errors are in the order of $$10^{-6}$$ = From [[media:nm1.s11.mtg22.djvu|Mtg 22-2]]

Given
Error estimates for Taylor Series, Comp. Trapezoidal, and Comp. Simpson of: $$I:=\int_{-1}^{1}\frac{e^{x}-1}{x} dx$$

Find
1. Use the error estimate for the Taylor Series, the Comp. Trapezoidal, and the Comp. Simpson to find n, such that $$E= I - I_{n}$$ is of the order of $$10^{-6}$$, and compare to numerical results. 2. Numerically find the power of h in the error. Plot log error vs log h, and measure slope with least square.

Solution
''' We solved this on our own. '''

1. The error is found by: $$E = I - I_{n}$$. Taylor Series: The error can be estimated by $$ \int_{-1}^{1}e^{\xi}\frac{x^{n}}{(n+1)!}dx $$. Integrating: $$e^{\xi} \int_{-1}^{1}\frac{x^{n}}{(n+1)!}dx = \frac{e^{\xi}}{(n+1)!} \int_{-1}^{1}x^{n}dx = \frac{e^{\xi}}{(n+1)(n+1)!} \left[ x^{(n+1)} \right]_{-1}^{1}$$. Using this result and the fact that our boundary is $$[-1,1]$$, we get out error for the Taylor Series as: $$\frac{e^{-1}}{(n+1)(n+1)!} \left[ (-1)^{n} +1 \right]<E_{n}< \frac{e}{(n+1)(n+1)!} \left[ (-1)^{n} +1 \right]$$ For this error calculation, the following simple Octave code was used: %Taylor n = input("Enter n") E=(1+((-1)^n))*exp(1)/(factorial(n+1)*(n+1)) Here is the table of results:

'''Comp. Trapezoidal:''' The error can be estimated as: $$ E_{n}\leq \frac{(b-a)^{3}}{12n^{3}}M_{2}$$, where $$[a,b] = [-1, 1]$$. Therefore the error is $$ E_{n}\leq \frac{2}{3n^{3}}M_{2}$$. Also, $$M_{2}= max\left| f^{(2)}(\xi)\right |$$. Maximizing $$ f^{(2)}$$: $$f^{(2)}= \frac{e^{x}(x^{2}-2x+2)-2}{x^{3}}$$ $$max \left|f^{(2)}(\xi) \right| $$ happens at $$\xi = 1$$ and is $$e -2 $$ The error is then $$ E_{n}\leq \frac{2}{3n^{3}}(e-2)$$ The Comp. Trapezoidal error was found using Wolfram Alpha (| WA), and that is $$n\geq 692$$.

'''Comp. Simpson's:''' For the Simpson's, the error is estimated by: $$ E_{n}=\frac{-32}{2880n^{4}}f^{(4)}(\xi)=\frac{-1}{90n^{4}}f^{(4)}{\xi}$$. The maximum of the fourth derivative also happens at 1, so we then get: $$E_{n}=\frac{-1}{90n^{4}}(9e-24)$$. The following octave code was used: %Simpsons n = input("Enter n") E=(9*exp(1)-24)/(90*n^4)

The results are shown on the table:

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

The values for n, in the order Taylor Series, Comp. Trapezoidal, Comp. Simpson's, were found to be: $$\displaystyle n=8, n=692, n=5 $$
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }

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

2. Power of h and graph of log error vs log h. The values we got on the first part were plotted on a log scale. The x-axis is the log(h), while the y-axis is the log(E). If we take the log of both these equation, we can find the power of h:
 * }
 * }
 * }

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

The values for the power of h, in the order Comp. Trapezoidal, Comp. Simpson's, were found to be: $$\displaystyle h=3, h=4 $$
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * style="width:50%; padding:10px; border:2px solid #8888aa" align="center" |
 * }
 * }
 * }

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

 * }
 * }
 * }

Author and proof-reader
[Author] cavalcanti

[Proof-reader]

= Problem 4.9 - Examination of Proof of SSET = From [[media:nm1.s11.mtg22.djvu|Mtg 22-3]]

Given
From [[media:nm1.s11.mtg18.djvu|Mtg18-2]], Error for Simple Simpson's rule is given by,

 * {| style="width:90%" border="0" align="center"

\begin{align} E_{2} & = -\frac{(b-a)^5}{2880}f^{(4)}(\xi)\ \, \xi \in [a,b] \\ & = -\frac{h^5}{90}f^{(4)}(\xi)\ \, h := \frac{b-a}{2} \end{align} $$ $$
 * $$\displaystyle
 * $$\displaystyle (9-1)

 * }.
 * }.

In order to prove the above Error for Simple Simpson's rule we defined

 * {| style="width:90%" border="0" align="center"

 * $$\displaystyle

G(t) := e(t) - t^5 e(1)

$$ $$
 * $$\displaystyle (9-2)

 * }.
 * }.

where,

 * {| style="width:90%" border="0" align="center"

 * $$\displaystyle

e(t) := \int_{-t}^{+t} F(t)dt - \frac{t}{3} \left[F(-t)+4F(0)+F(t)\right] \ \, F(t) := f(x(t))

$$ $$
 * $$\displaystyle (9-3)

 * }.
 * }.

Find
Try to prove the Simple Simpsons Error Theorem using

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

a) G(t) = e(t) - t^{4}e(1) $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

b) G(t) = e(t) - t^{6}e(1) $$ And point out where proof breaks down
 * $$ \displaystyle
 * $$ \displaystyle
 * }

Also find $$ G^{(3)}(0)$$ and show that $$ G^{(4)}$$ also breaks down

Solution
We referred to Team 3 S10 but clarified and tried to be more thorough

Background Rolle's Theorem states that for a function $$f(x)$$ that is continuous on $$\left] {a,b} \right[$$ there exists a $$\xi$$ such that $${f^{(1)}}(\xi ) = 0$$ Here we will attempt to show that $$G^{(n)}$$ has two points where the value is zero so we can apply Rolle's Theorem

For part a

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

G(t) = e(t) - t^{4}e(1) $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

e(t) = \int_{-t}^{+t}F(t)\, dt-\frac{t}{3}[F(-t)+4F(0)+F(t)] $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }

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

e(0)= \int_{0}^{0}f(x)\, dx -\frac{0}{3}[F(-0)+4F(0)+F(0)]=0 $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

G(0) = e(0) - 0^{4}e(1)=0 $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-4)
 * }

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

G(1) = e(1) - 1^{4}e(1)= 0 $$ $$ We can see from eqations 9-4 and 9-5 that there are two values of x for which $$G(x)=0$$. therefor we can use Rolle's Theorem which states that
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-5)
 * }
 * {| style="width:100%" border="0" align="left"

\exists  \zeta _1  \in  ]0,1[,  G^{(1)}(\zeta _1) = 0   $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-6)
 * }
 * {| style="width:100%" border="0" align="left"

G^{(1)}(t) = e^{(1)}(t) - 4t^{3}e(1) $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }

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

e^{(1)}(t)& = F(-t)+F(t)- \frac{1}{3}[F(-t)+4F(0)+F(t)]-\frac{t}{3}[-F^{(1)}(-t)+F^{(1)}(t)]\\ & = \frac{2}{3}[F(-t)+F(t)] - \frac{4}{3}F(0)-\frac{t}{3}[-F^{(1)}(-t)+F^{(1)}(t)]\\ \end{align} $$
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 * }
 * }

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

e^{(1)}(0) &= \frac{2}{3}[F(0)+F(0)] - \frac{4}{3}F(0)-\frac{0}{3}[-F^{(1)}(-0)+F^{(1)}(0)]\\ &=\frac{4}{3}F(0)-\frac{4}{3}F(0)-0\\ &=0\\ \end{align} $$
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 * }
 * }

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

G^{(1)}(0) = e^{(1)}(0) - 4(0^{3})e(1)= 0 $$ $$ Equations 9-6 and 9-7 allow us to implement Rolle's Theorem again giving
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-7)
 * }
 * {| style="width:100%" border="0" align="left"

\exists  \zeta _2 \in ]0,\zeta_1[,  G^{(2)}(\zeta _2) = 0   $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-8)
 * }
 * {| style="width:100%" border="0" align="left"

G^{(2)}(t) = e^{(2)}(t) - 12t^{2}e(1) $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }

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

\frac{d}{dx}e^{(1)}(t)& = \frac{d}{dx}\left[\frac{2}{3}[F(-t)+F(t)] - \frac{4}{3}F(0)-\frac{t}{3}[-F^{(1)}(-t)+F^{(1)}(t)]\right]\\ \end{align} $$
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 * }
 * }

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

e^{(2)}(t)& = \frac{1}{3}[-F^{(1)}(-t)+F^{(1)}(t)]-\frac{t}{3}[F^{(2)}(-t)+F^{(2)}(t)]\\ \end{align} $$
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 * }
 * }

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

e^{(2)}(0)& = \frac{1}{3}[-F^{(1)}(-0)+F^{(1)}(0)]-\frac{t}{3}[F^{(2)}(0)+F^{(2)}(0)]\\ &= 0 \end{align} $$
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 * }
 * }

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

G^{(2)}(0) = e^{(2)}(0) - 120^{2}e(1) = 0 $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-9)
 * }

Again we can see from equations 9-8 and 9-9 that there are two points at which the value of $$ G(x)=0$$ so we can again apply Rolle's Theorem to get
 * {| style="width:100%" border="0" align="left"

\exists  \zeta _3 \in ]0,\zeta_2[,  G^{(3)}(\zeta _3) = 0   $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-10)
 * }
 * {| style="width:100%" border="0" align="left"

G^{(3)}(t) = e^{(3)}(t) - 24te(1) $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-11)
 * }

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

\frac{d}{dx}e^{(2)}(t)& = \frac{d}{dx}\left[\frac{1}{3}[-F^{(1)}(-t)+F^{(1)}(t)]-\frac{t}{3}[F^{(2)}(-t)+F^{(2)}(t)]\right]\\ \end{align} $$
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 * }
 * }

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

e^{(3)}(t)& = \frac{1}{3}[F^{(2)}(-t)+F^{(2)}(t)]-\frac{1}{3}[F^{(2)}(-t)+F^{(2)}(t)]-\frac{t}{3}[-F^{(3)}(-t)+F^{(3)}(t)]\\ &= -\frac{t}{3}[-F^{(3)}(-t)+F^{(3)}(t)]\\ \end{align} $$ $$ Now substituting $$\zeta_3$$ and equation 9-12 into equation 9-11 we get
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 *
$$\displaystyle (9-12)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

G^{(3)}(\zeta_3) = -\frac{\zeta_3}{3}[-F^{(3)}(-\zeta_3)+F^{(3)}(\zeta_3)] - 24\zeta_3e(1) $$ $$ Using the derivative mean value theorem wikipedia, of which Rolle's theorem is a special case, on the first term in equation 9-13 we see that
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-13)
 * }
 * {| style="width:100%" border="0" align="left"

F^{(4)} &= \frac{[-F^{(3)}(-\zeta_3)+F^{(3)}(\zeta_3)]}{\zeta_3-(-\zeta_3)}\\ &\Rightarrow [-F^{(3)}(-\zeta_3)+F^{(3)}(\zeta_3)]= 2\zeta_3F^{(4)} \end{align} $$ $$ Therefor equation 9-13 becomes
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 *
$$\displaystyle (9-14)
 * }
 * {| style="width:100%" border="0" align="left"

G^{(3)}(\zeta_3) &= -\frac{\zeta_3}{3}[2\zeta_3F^{(4)}(\zeta_4)] - 24\zeta_3e(1)\\ &= 0 \end{align} $$ $$ Rearranging
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 *
$$\displaystyle (9-15)
 * }
 * {| style="width:100%" border="0" align="left"

24\zeta_3e(1) &= -\frac{\zeta_3}{3}[2\zeta_3F^{(4)}(\zeta_4)] \\ e(1) &= -\frac{\zeta_3}{36}F^{(4)}(\zeta_4) \end{align} $$ $$ Using the definition of $$F^{(4)}(\zeta_4)$$ from question 5 above, we see that
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 *
$$\displaystyle (9-16)
 * }
 * {| style="width:100%" border="0" align="left"

e(1) = -\frac{f^4}(\xi ) $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-17)
 * }

We know from [[media:nm1.s11.mtg18.djvu|Mtg18-3]] that the error for the Simple Simpson's Rule is given by
 * {| style="width:100%" border="0" align="left"

E_2=I-I_2&=he(1)\\ &=-\frac{f^4}(\xi ) \end{align} $$ $$ The result has $$E_2$$ in terms of two interior values $$\zeta_3$$ and $$\xi$$. This is not a useful solution to the proof. The proof goes wrong in equation 9-15. Here the $$\zeta_3$$ term does not cancel out, because $$G^{(3)}$$ gives $$\zeta_3e(1)$$ not $$\zeta_3^2$$, leaving $$\zeta_3$$ in the final solution.
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 *
$$\displaystyle (9-18)
 * }

For part b

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

G(t) = e(t) - t^{6}e(1) $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

e(t) = \int_{-t}^{+t}F(t)\, dt-\frac{t}{3}[F(-t)+4F(0)+F(t)] $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }

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

e(0)= \int_{0}^{0}f(x)\, dx -\frac{0}{3}[F(-0)+4F(0)+F(0)]=0 $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

G(0) = e(0) - 0^{6}e(1)=0 $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-19)
 * }

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

G(1) = e(1) - 1^{6}e(1)= 0 $$ $$ We can see from eqations 9-19 and 9-20 that there are two values of x for which $$G(x)=0$$. therefor we can use Rolle's Theorem which states that
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-20)
 * }
 * {| style="width:100%" border="0" align="left"

\exists  \zeta _1  \in  ]0,1[,  G^{(1)}(\zeta _1) = 0   $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-21)
 * }
 * {| style="width:100%" border="0" align="left"

G^{(1)}(t) = e^{(1)}(t) - 6t^{5}e(1) $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }

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

e^{(1)}(t)& = F(-t)+F(t)- \frac{1}{3}[F(-t)+4F(0)+F(t)]-\frac{t}{3}[-F^{(1)}(-t)+F^{(1)}(t)]\\ & = \frac{2}{3}[F(-t)+F(t)] - \frac{4}{3}F(0)-\frac{t}{3}[-F^{(1)}(-t)+F^{(1)}(t)]\\ \end{align} $$
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 * }
 * }

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

e^{(1)}(0) &= \frac{2}{3}[F(0)+F(0)] - \frac{4}{3}F(0)-\frac{0}{3}[-F^{(1)}(-0)+F^{(1)}(0)]\\ &=\frac{4}{3}F(0)-\frac{4}{3}F(0)-0\\ &=0\\ \end{align} $$
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 * }
 * }

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

G^{(1)}(0) = e^{(1)}(0) - 6(0^{5})e(1)= 0 $$ $$ Equations 9-21 and 9-22 allow us to implement Rolle's Theorem again giving
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-22)
 * }
 * {| style="width:100%" border="0" align="left"

\exists  \zeta _2 \in ]0,\zeta_1[,  G^{(2)}(\zeta _2) = 0   $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-23)
 * }
 * {| style="width:100%" border="0" align="left"

G^{(2)}(t) = e^{(2)}(t) - 30t^{4}e(1) $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }

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

\frac{d}{dx}e^{(1)}(t)& = \frac{d}{dx}\left[\frac{2}{3}[F(-t)+F(t)] - \frac{4}{3}F(0)-\frac{t}{3}[-F^{(1)}(-t)+F^{(1)}(t)]\right]\\ \end{align} $$
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 * }
 * }

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

e^{(2)}(t)& = \frac{1}{3}[-F^{(1)}(-t)+F^{(1)}(t)]-\frac{t}{3}[F^{(2)}(-t)+F^{(2)}(t)]\\ \end{align} $$
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 * }
 * }

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

e^{(2)}(0)& = \frac{1}{3}[-F^{(1)}(-0)+F^{(1)}(0)]-\frac{t}{3}[F^{(2)}(0)+F^{(2)}(0)]\\ &= 0 \end{align} $$
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 * }
 * }

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

G^{(2)}(0) = e^{(2)}(0) - 30(0^{2})e(1) = 0 $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-24)
 * }

Again we can see from equations 9-23 and 9-24 that there are two points at which the value of $$ G(x)=0$$ so we can again apply Rolle's Theorem to get
 * {| style="width:100%" border="0" align="left"

\exists  \zeta _3 \in ]0,\zeta_2[,  G^{(3)}(\zeta _3) = 0   $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-25)
 * }
 * {| style="width:100%" border="0" align="left"

G^{(3)}(t) = e^{(3)}(t) - 120t^3e(1) $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-26)
 * }

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

\frac{d}{dx}e^{(2)}(t)& = \frac{d}{dx}\left[\frac{1}{3}[-F^{(1)}(-t)+F^{(1)}(t)]-\frac{t}{3}[F^{(2)}(-t)+F^{(2)}(t)]\right]\\ \end{align} $$
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 * }
 * }

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

e^{(3)}(t)& = \frac{1}{3}[F^{(2)}(-t)+F^{(2)}(t)]-\frac{1}{3}[F^{(2)}(-t)+F^{(2)}(t)]-\frac{t}{3}[-F^{(3)}(-t)+F^{(3)}(t)]\\ &= -\frac{t}{3}[-F^{(3)}(-t)+F^{(3)}(t)]\\ \end{align} $$ $$ Now substituting $$\zeta_3$$ and equation 9-27 into equation 9-26 we get
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 *
$$\displaystyle (9-27)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

G^{(3)}(\zeta_3) = -\frac{\zeta_3}{3}[-F^{(3)}(-\zeta_3)+F^{(3)}(\zeta_3)] - 120\zeta_3^3e(1) $$ $$ Using the derivative mean value theorem wikipedia, of which Rolle's theorem is a special case, on the first term in equation 9-28 we see that
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-28)
 * }
 * {| style="width:100%" border="0" align="left"

F^{(4)} &= \frac{[-F^{(3)}(-\zeta_3)+F^{(3)}(\zeta_3)]}{\zeta_3-(-\zeta_3)}\\ &\Rightarrow [-F^{(3)}(-\zeta_3)+F^{(3)}(\zeta_3)]= 2\zeta_3F^{(4)} \end{align} $$ $$ Therefor equation 9-28 becomes
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 *
$$\displaystyle (9-29)
 * }
 * {| style="width:100%" border="0" align="left"

G^{(3)}(\zeta_3) &= -\frac{\zeta_3}{3}[2\zeta_3F^{(4)}(\zeta_4)] - 120\zeta_3^3e(1)\\ &= 0 \end{align} $$ $$ Rearranging
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 *
$$\displaystyle (9-30)
 * }
 * {| style="width:100%" border="0" align="left"

120\zeta_3^3e(1) &= -\frac{\zeta_3}{3}[2\zeta_3F^{(4)}(\zeta_4)] \\ e(1) &= -\frac{1}{180\zeta_3}F^{(4)}(\zeta_4) \end{align} $$ $$ Using the definition of $$F^{(4)}(\zeta_4)$$ from question 5 above, we see that
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 *
$$\displaystyle (9-31)
 * }
 * {| style="width:100%" border="0" align="left"

e(1) = -\frac{h^4}{180\zeta_3}{f^4}(\xi ) $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-32)
 * }

We know from [[media:nm1.s11.mtg18.djvu|Mtg18-3]] that the error for the Simple Simpson's Rule is given by (and then replacing 9-32 into the error)
 * {| style="width:100%" border="0" align="left"

E_2=I-I_2&=he(1)\\ &=-\frac{h^5}{180\zeta_3}{f^4}(\xi ) \end{align} $$ $$ The result has $$E_2$$ in terms of two interior values $$\zeta_3$$ and $$\xi$$. This is not a useful solution to the proof. The proof goes wrong in equation 9-30. Here the $$\zeta_3$$ term does not cancel out, because $$G^{(3)}$$ gives $$\zeta_3^3e(1)$$ not $$\zeta_3^2$$, leaving $$\frac{1}{\zeta_3}$$ in the final solution.
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 *
$$\displaystyle (9-33)
 * }

Continuation of G(x)
From [[media:nm1.s11.mtg19.djvu|Mtg19-1]]
 * {| style="width:100%" border="0" align="left"

G(t)=e(t)-t^5e(1) $$ From equation 9-12 we can see that
 * $$ \displaystyle
 * $$ \displaystyle
 * }

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

G^{(3)}(t)&=-\frac{t}{3}[-F^{(3)}(-t)+F^{(3)}(t)]-60t^2e(1)\\ G^{(3)}(0)&=0 \end{align} $$ $$ Using equation 9-34 and equation 3 from [[media:nm1.s11.mtg20.djvu|Mtg20-3]] which says $$G^{(3)}(\zeta_3)=0$$ we can apply Rolle's Theorem to say
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 *
$$\displaystyle (9-34)
 * }

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

\exists  \zeta _4 \in ]0,\zeta_3[,  G^{(4)}(\zeta _4) = 0   $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-35)
 * }
 * {| style="width:100%" border="0" align="left"

G^{(4)}(t)=e^{(4)}(t)-120te(1) $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

\begin{align} e^{(4)}(t)&=\frac{d}{dx}e^{(3)}(x)\\ &=\frac{d}{dx}\left[[-\frac{t}{3}[-F^{(3)}(-t)+F^{(3)}(t)]\right]\\ &=-\frac{1}{3}[-F^{(3)}(-t)+F^{(3)}(t)]-\frac{t}{3}[F^{(4)}(-t)+F^{(4)}(t)] \end{align} $$ $$ This gives us
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-36)
 * }
 * {| style="width:100%" border="0" align="left"

G^{(4)}(\zeta_4)&=-\frac{1}{3}[-F^{(3)}(-\zeta_4)+F^{(3)}(\zeta_4)]-\frac{\zeta_4}{3}[F^{(4)}(-\zeta_4)+F^{(4)}(\zeta_4)]-120\zeta_4e(1)\\ &=0 \end{align} $$ From the derivative mean value theorem we have
 * $$ \displaystyle \begin{align}
 * $$ \displaystyle \begin{align}
 * }
 * {| style="width:100%" border="0" align="left"

[-F^{(3)}(-\zeta_4)+F^{(3)}(\zeta_4)]=2\zeta_4F^{(4)}(\zeta_5) $$ Therefor
 * $$ \displaystyle
 * $$ \displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

G^{(4)}(\zeta_4)=-\frac{1}{3}[2\zeta_4F^{(4)}(\zeta_5)]-\frac{\zeta_4}{3}[F^{(4)}(-\zeta_4)+F^{(4)}(\zeta_4)]-120\zeta_4e(1) $$ $$ Rearranging and using $$G^{(4)}(\zeta_4)=0$$ we have
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-37)
 * }
 * {| style="width:100%" border="0" align="left"

120\zeta_4e(1)=-\frac{1}{3}[2\zeta_4F^{(4)}(\zeta_5)]-\frac{\zeta_4}{3}[F^{(4)}(-\zeta_4)+F^{(4)}(\zeta_4)] $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-38)
 * }
 * {| style="width:100%" border="0" align="left"

e(1)=\frac{1}{360}\left[2F^{(4)}(\zeta_5)-F^{(4)}(-\zeta_4)+F^{(4)}(\zeta_4)\right]$$ $$ Again we can see that we have two interior points. So the error of the simple Simpson's rule will have two interior points. Again the proof breaks down. From all of the above we can see that our initial selection, $$G(t)=e(t)-t^5e(1)$$ as given in [[media:nm1.s11.mtg19.djvu|Mtg 19-1]], will satisfy the proof for the Simple Simpson's Error Theorem only if we take the third derivative of $$G(t)$$. Using any other power than 5 and the proof will break down. The proof also breaks down if we try to take further derivatives of our defined function.
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (9-39)
 * }

Author and proof-reader
[Author] Reiss [Proof-reader]

= Problem 4.10 -Error evaluation using Composite Trapezoidal & Simpson rules = From [[media:Nm1.s11.mtg22.djvu|Mtg 22-3]]

Given
Part a,b.
 * $$\displaystyle

I=\int_0^{\pi} \! e^x \sin{x} \, \mathrm{d}x. $$ Part c.
 * $$\displaystyle

I=\int_0^{1} \! x^{3.7} \, \mathrm{d}x. $$

Find
Part a.
 * Produce Table 5.1, page 255, Atkinson text book using the composite Trapezoidal rule.

Part b.
 * Produce Table 5.3, page 258, Atkinson text book using the composite Simpson rule.

Part c.
 * Produce Table 5.4, page 261, Atkinson text book using the composite Trapezoidal & composite Simpson rule.

Part a.

 * From the class notes (p.7-4), the composite Trapezoidal rule is defined as below.
 * {| style="width:100%" border="0" align="left"

I_n=h(\dfrac{1}{2}f(x_0)+f(x_1)+f(x_2)+...+f(x_{n-1})+\dfrac{1}{2}f(x_{n})) \mbox{, }h=\dfrac{b-a}{n} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 *
$$\displaystyle (10-1)
 * }
 * The asymptotic error is defined as the following equation.
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

\overline{E_n^T}=-\frac{h^2}{12}[f^{(1)}(b)-f^{(1)}(b)] $$ $$ The exact integration was performed using Wolfram Alpha as below.
 * $$\displaystyle
 * $$\displaystyle
 *
$$\displaystyle (10-2)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

I = \int_0^{\pi} \! e^x \sin{x} \, \mathrm{d}x = 12.0703 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 *
$$\displaystyle (10-3)
 * }
 * }

 Table:

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

.
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * }
 * }
 * }

Part b.

 * From the class notes (p.7-4), the composite Simpson's rule is defined as below.
 * {| style="width:100%" border="0" align="left"

I_n=\dfrac{h}{3}(f(x_0)+4f(x_1)+2f(x_2)+4f(x_3)+...+2f(x_{n-2})+4f(x_{n-1})+f(x_n))\mbox{, }h=\frac{b-a}{n} $$ $$
 * $$\displaystyle
 * $$\displaystyle
 *
$$\displaystyle (10-4)
 * }
 * The asymptotic error is defined as the following equation.
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

\overline{E_n^S}=-\frac{h^4}{180}[f^{(3)}(b)-f^{(3)}(b)] $$ $$  Table:
 * $$\displaystyle
 * $$\displaystyle
 *
$$\displaystyle (10-5)
 * }
 * }

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

.
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * }
 * }
 * }

Part c.
The exact integration was performed using Wolfram Alpha as below.
 * {| style="width:100%" border="0" align="left"

I = \int_0^{1} \! x^{3.7} \, \mathrm{d}x = 0.212766 $$ $$
 * $$\displaystyle
 * $$\displaystyle
 *
$$\displaystyle (10-6)
 * }
 * }

 Table:

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

.
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * }
 * }
 * }

Author and proof-reader
[Author] Shin [Proof-reader]

= References =

= Contributing members =

title: User:Egm6341.s11.team5/HW4


text:
User:Egm6341.s11.team5/HW5

= Problem 5.1 - Runge Phenomenon = From [[media:Nm1.s11.mtg23.djvu|Mtg 23-1]], [[media:Nm1.s11.mtg26.djvu|Mtg 26-1]]

Given
1. $$ I=\int_{0}^{6}\frac{dx}{1+(x-3)^2}$$ 2. $$I=\int_{0}^{1}x^{1/3}dx$$ 3. $$I=\int_{0}^{2\pi}e^{sinx}dx$$

Find
1. Use the Composite Trapezoidal and the Composite Simpson's Rule to integrate the function. Find the error ratios. Plot $$f_{n}^{T}(x)$$ and $$f_{n}^{S}(x)$$ on the same axis as $$f(x)$$ to show the error as the area difference. 2. a)Integrate by Composite Trapezoidal and Composite Simpson's Rules using uniform discretization. b) Use non-uniform discretization. c) Use Gauss-Legendre quadrature. Find all the error ratios. 3. Integrate using uniform discretization and find the error ratios.

Solution
''' We solved this problem on our own. ''' 1. Given $$ I=\int_{0}^{6}\frac{dx}{1+(x-3)^2}$$, the results are shown on the following tables: The following is the plot of $$f(x)$$ and $$f_{n}^{T}(x)$$ on the same set of axis: The following GNU Octave code was used to obtain the results: Next, we have the plot of $$f(x)$$ and $$ f^{S}_{n}(x)$$: The code used to generate all of the results for Simpson's Rule: 2.The integration $$I=\int_{0}^{1}x^{1/3}dx$$ was done by uniform discretization (ie Simpson's and Trapezoidal rules) and is shown on the following table: The following codes were used: Finally, integrating using the Gauss-Legendre Quadrature: 3. Evaluating $$I_{0}^{2\pi}e^{sinx}dx$$, we get the following:

Author and proof-reader
[Author]cavalcanti

[Proof-reader]

= Problem 5.2 - Linear State Space Model with Random Noise = From [[media:Nm1.s11.mtg25.djvu|Mtg 25-2]]

Given

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

$$ $$ Where
 * $$ \mathbf{x_{k+1}}= \mathbf{F} \mathbf{x_{k}}+\mathbf{G} \mathbf{w_{k+1}}
 * $$ \mathbf{x_{k+1}}= \mathbf{F} \mathbf{x_{k}}+\mathbf{G} \mathbf{w_{k+1}}
 * $$\displaystyle (5-1)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\mathbf{F}&= \left[ \mathbf{I} +\Delta \mathbf{A} \right]\\ &= \left( {\begin{array}{*{20}{c}} 1&0\\ 0&1 \end{array}} \right) + .02\left( {\begin{array}{*{20}{c}} {-0.2}&1\\ { - 1}&{-0.2} \end{array}} \right)\end{align} $$ $$
 * $$\begin{align}
 * $$\begin{align}
 * $$\displaystyle (5-2)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

1\\ 1\end{array}} \right) $$ $$
 * $$G =\alpha \left( {\begin{array}{*{20}{c}}
 * $$G =\alpha \left( {\begin{array}{*{20}{c}}
 * $$\displaystyle (5-3)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

{x_{k}^1}\\ {x_{k}^2}\end{array}} \right), \mathbf{x_{0}} =  \left( {\begin{array}{*{20}{c}} {3}\\ {-2}\end{array}} \right) $$ $$
 * $$\mathbf{x_{k}} = \left( {\begin{array}{*{20}{c}}
 * $$\mathbf{x_{k}} = \left( {\begin{array}{*{20}{c}}
 * $$\displaystyle (5-4)
 * }
 * }

And$$ \mathbf{w_{k}}$$ is a series of random values according to some given distribution

Find
Find and Plot $$\mathbf{x_{k}}$$ for $$k=1,2,3...N$$ with $$\alpha=0.5,1,2$$. With no noise, Gaussian random noise, and Cauchy random noise. Highlighting the initial condition and equlibrium point.

Solution

Matlab code used to generate the data and plots.

The Cauchy random variable generating equation was found using the Mathematica command:

In: InverseCDF[CauchyDistribution[m,b],y]

Out: $$b \tan \left(\pi \left(y-\frac{1}{2}\right)\right)+m$$

where m is the mean, b is the half height, and y is the random variable.

The Equlibrium point was found by:

$$\lim_{k\to \infty } \, F^k.x = \left( \begin{array}{c} 0. \\ 0. \end{array} \right)$$

Author and proof-reader
[Author] J Davis 21:15, 21 March 2011 (UTC)

[Proof-reader]

= Problem 5.3 -Cauchy's heavy tails = From [[media:Nm1.s11.mtg26.djvu|Mtg 26-2]]

Given
Quartile points:$$Q_1,Q_2,Q_3$$ $$P(x<Q_1)=0.25=\int_{-\infty}^{Q_1} f(x)dx=F(Q_1)$$ $$P(x<Q_3)=0.75=\int_{-\infty}^{Q_3} f(x)dx=F(Q_3)$$ Cauchy's pdf $$=C(x_0,\gamma):=\frac{\gamma}{\pi[{\gamma}^{2}+{(x-x_0)}^2]}$$ Gauss(normal)pdf $$=N(\mu ,\sigma )= \frac{1}{\sigma \sqrt[]{2\pi}}exp(\frac{(-1){(x-\mu)}^{2}}{2{\sigma}^{2}})$$

Find
1.Find {$$Q_1,Q_3$$} for $$ C (x_0,\gamma)$$. 2.Find {$$Q_1,Q_3$$} for $$ N (\mu,\sigma)$$. 3.Let $$x_0=\mu=0$$  and  $${\gamma}^{c}=1$$. Find $${\sigma}^{1}$$st     of  $${\gamma}^{G}=1$$. where $${\gamma}^{c}$$ is the half width of  $$C (x_0,{\gamma}^{c})$$ and  $${\gamma}^{G}$$  is the half width of  $$N (\mu,\sigma)$$. Plot $$C (0,1)$$ and   $$N (0,{\sigma}^{1})$$. 4.Find {$${Q_1}^{c},{Q_3}^{c}$$} for $$ C (x_0,\gamma)$$ and $$C (0,1)$$. Find {$${Q_1}^{G},{Q_3}^{G}$$} for $$ N (\mu,\sigma)$$ and $$N (0,{\sigma}^{1})$$. Plot {$${Q_1}^{c},{Q_3}^{c}$$} for $$ C (0,1)$$  and  {$${Q_1}^{G},{Q_3}^{G}$$} for  $$N (0,{\sigma}^{1})$$   on the same plot and comment on the results.

Solution
1. To find Q1, we take the integral: $$\int_{-\infty}^{Q1}\frac{\gamma}{\pi \left( \gamma^{2} +(x-x_{0})^{2} \right)}dx = \frac{1}{\pi}\left[ tan^{-1} \left( \frac{x-x_{0}}{\gamma} \right) \right]_{-\infty}^{Q1} = \frac{1}{\pi}tan^{-1} \left( \frac{Q1-x_{0}}{\gamma} \right) + \frac{1}{2} $$ Since we are looking for the first quartile, we set the results equal to 0.25: $$ \frac{1}{\pi}tan^{-1} \left( \frac{Q1-x_{0}}{\gamma} \right) + \frac{1}{2} = \frac{1}{4}$$ $$ \frac{1}{\pi}tan^{-1} \left( \frac{Q1-x_{0}}{\gamma}  \right) = \frac{1}{4} - \frac{1}{2} $$ $$ \frac{1}{\pi}tan^{-1} \left( \frac{Q1-x_{0}}{\gamma} \right) = - \frac{1}{4} $$ $$ tan^{-1} \left( \frac{Q1-x_{0}}{\gamma}  \right) =-\frac{\pi}{4} $$ $$ \frac{Q1-x_{0}}{\gamma} = tan \left( - \frac{\pi}{4} \right) $$ $$ \frac{Q1-x_{0}}{\gamma} = -1$$ $$ Q1 - x_{0}= -\gamma$$

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

$$\displaystyle Q1 = -\gamma + x_{0} $$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |

 * style= |

We use a similar approach to find Q3. $$ \frac{1}{\pi}tan^{-1} \left( \frac{Q3-x_{0}}{\gamma} \right) + \frac{1}{2} = \frac{3}{4}$$ $$ \frac{1}{\pi}tan^{-1} \left( \frac{Q3-x_{0}}{\gamma}  \right) = \frac{3}{4} - \frac{1}{2} $$ $$ \frac{1}{\pi}tan^{-1} \left( \frac{Q3-x_{0}}{\gamma} \right) = \frac{1}{4} $$ $$ tan^{-1} \left( \frac{Q3-x_{0}}{\gamma}  \right) =\frac{\pi}{4} $$ $$ \frac{Q3-x_{0}}{\gamma} = tan \left(  \frac{\pi}{4} \right) $$ $$ \frac{Q3-x_{0}}{\gamma} = 1$$ $$ Q3 - x_{0}= \gamma$$
 * }
 * }

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

$$\displaystyle Q3 = \gamma + x_{0}$$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style= |

2. We use a similar approach: $$ \int_{-\infty}^{Q1}\frac{1}{\sigma \sqrt{2\pi}}e^{\left( \frac{(-1)(x-\mu)^2}{2\sigma^{2}} \right)} dx = \frac{1}{2} \left[ 1+erf \left( \frac{Q1- \mu}{\sqrt{2 \sigma^{2}}} \right) \right]$$ $$\frac{1}{2} \left[ 1+erf \left( \frac{Q1- \mu}{\sqrt{2 \sigma^{2}}} \right) \right]=\frac{1}{4}$$ $$ 1+erf \left( \frac{Q1- \mu}{\sqrt{2 \sigma^{2}}} \right)=\frac{1}{2}$$ $$ erf \left( \frac{Q1- \mu}{\sqrt{2 \sigma^{2}}} \right)=-\frac{1}{2}$$ $$ \frac{Q1- \mu}{\sqrt{2 \sigma^{2}}} =erf^{-1} \left(-\frac{1}{2} \right)$$
 * }
 * }
 * {| style="width:20%" border="0"

$$\displaystyle Q1 =\mu +(\sqrt{2 \sigma^{2}})erf^{-1} \left(-\frac{1}{2} \right)$$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style= |

$$\frac{1}{2} \left[ 1+erf \left( \frac{Q3- \mu}{\sqrt{2 \sigma^{2}}} \right) \right]=\frac{3}{4}$$ $$ 1+erf \left( \frac{Q3- \mu}{\sqrt{2 \sigma^{2}}} \right)=\frac{1}{4}$$ $$ erf \left( \frac{Q3- \mu}{\sqrt{2 \sigma^{2}}} \right)=\frac{1}{4}$$ $$ \frac{Q3- \mu}{\sqrt{2 \sigma^{2}}} =erf^{-1} \left(\frac{1}{4} \right)$$
 * }
 * }
 * {| style="width:20%" border="0"

$$\displaystyle Q3 =\mu +(\sqrt{2 \sigma^{2}})erf^{-1} \left(\frac{1}{4} \right)$$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style= |

3.
 * }
 * }

Since $$x_0=\mu=0$$

Sigma with half width at 1. Plot MATLAB CODE: % Hw5_3 % plot C(0,1) and N(0,sigma) clear; close all; clc; x0=0; r=1;       % for Cauchy pdf u=0; s=0.849322; % for Gauss pdf x=[-10:0.01:10]; Fc=zeros(1,length(x)); Fg=zeros(1,length(x)); for i=1:length(x) Fg(i)= (1/(s*sqrt(2*pi)))*exp(-((x(i)-u)^2)/(2*s^2)); Fc(i)= r./(pi*(r.^2 + (x(i)-x0).^2)); end figure(1); hold on; plot(x,Fg,'b'); plot(x,Fc,'r'); legend('N(0,sigma),Gauss pdf','C(0,1),Cauchy pdf')

4.

Plot MATLAB CODE: % hw5_4 % plot C(0,1) and N(0,sigma) clear; close all; clc; x0=0; r=1;       % for Cauchy pdf u=0; s=0.849322; % Gauss pdf x=[-10:0.01:10]; Fc=zeros(1,length(x)); Fg=zeros(1,length(x)); for i=1:length(x) Gcdf(i)= normcdf(x(i),0,1); % Returns the cdf of distribution with mean and standard deviation Ccdf(i)= 0.5 + atan(x(i))./pi; % cdf for Cauchy distribution for x0=0, gamma=1, figure(1); hold on; plot(x,Gcdf,'b'); plot(x,Ccdf,'r'); legend('N(0,sigma),Gauss cdf','C(0,1),Cauchy cdf')

Author and proof-reader
[Author] cavalcanti , Raghunathan

[Proof-reader]

= Problem 5.4- Mass, spring, damper analysis = From [[media:Nm1.s11.mtg29.djvu|Mtg 29-1]]

Given
Diagram of the mass, spring, damper under consideration From [[media:Nm1.s11.mtg29.djvu|Mtg 29-1]]

Also the step size, h, equals 0.02

Find
1) Determine the equation of motion of the system in terms of d, c, k, m and, u 2)$$\mathbf{x} = \left\{ {\begin{array}{*{20}{c}} d\\ {\dot d} \end{array}} \right\} = \left\{ {\begin{array}{*{20}{c}} \\

\end{array}} \right\}$$, Find F and G 3)Find $$c_{cr}$$ in terms of k and m such that the system is critically damped 4)Let k=1, m=0.5, $$\mathbf{x_{0}}={\left\lfloor {\begin{array}{*{20}{c}} {0.8}&{ - 0.4} \end{array}} \right\rfloor ^T}$$ a)For u=0, plot $$\mathbf{x_{k}}$$ for $$c = \frac{1}{2}{c_{cr}},{c_{cr}},\frac{3}{2}{c_{cr}}$$ b)For u=0.5 gaussian noise and $$c=\frac{3}{2}{c_{cr}}$$, plot $$\mathbf{x_{k}}$$ c)For u=0.5 cauchy noise and $$c=\frac{3}{2}{c_{cr}}$$, plot $$\mathbf{x_{k}}$$

5.4.1: Equation of Motion
The force of the spring is given by

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

$$ $$
 * $$F_s=-kx
 * $$F_s=-kx
 * $$\displaystyle (4-1)
 * }
 * }

The force of the damper is given by

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

$$ $$
 * $$F_d=-c\dot x
 * $$F_d=-c\dot x
 * $$\displaystyle (4-2)
 * }
 * }

The force of inertia is given by

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

$$ $$ The external force on the system is $$F_e=u$$ The total force on the system, the force balance, is given by
 * $$F_I=m\ddot x
 * $$F_I=m\ddot x
 * $$\displaystyle (4-3)
 * }
 * }

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

$$ $$ Substituting,
 * $$F_I=F_c+F_s+F_e
 * $$F_I=F_c+F_s+F_e
 * $$\displaystyle (4-4)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

$$ $$
 * $$m\ddot x=-c\dot x-kx+u
 * $$m\ddot x=-c\dot x-kx+u
 * $$\displaystyle (4-5)
 * }
 * }

Rearranging we see that the equation of motion is given by
 * {| style="width:100%" border="0" align="left"

$$ $$
 * $$\ddot x=-\frac{c}{m}\dot x-\frac{k}{m}x+\frac{1}{m}u
 * $$\ddot x=-\frac{c}{m}\dot x-\frac{k}{m}x+\frac{1}{m}u
 * $$\displaystyle (4-6)
 * }
 * }

5.4.2: Find F and G
We can now designate states such that

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

{x^1} = d\\ {x^2} = \dot d \end{array} $$ $$ Then
 * $$\begin{array}{l}
 * $$\begin{array}{l}
 * $$\displaystyle (4-7)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\dot x^1\\ {\dot x^2} \end{array}} \right ) = \left ( {\begin{array}{*{20}{c}} \\
 * $$\dot \mathbf{x}=\left ( {\begin{array}{*{20}{c}}
 * $$\dot \mathbf{x}=\left ( {\begin{array}{*{20}{c}}

\end{array}} \right ) $$ $$ Putting this into matrix form
 * $$\displaystyle (4-8)
 * }
 * }

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

0&1\\ { - \frac{k}{m}}&{ - \frac{c}{m}} \end{array}} \right) \left( {\begin{array}{*{20}{c}} \\
 * $$\dot x = \left( {\begin{array}{*{20}{c}}
 * $$\dot x = \left( {\begin{array}{*{20}{c}}

\end{array}} \right) + \left( {\begin{array}{*{20}{c}} 0\\ {\frac{1}{m}} \end{array}} \right)u $$ $$
 * $$\displaystyle (4-9)
 * }
 * }

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

$$ $$ Where
 * $$\dot \mathbf{x}= \mathbf{A} \mathbf{x} + \mathbf{B}u
 * $$\dot \mathbf{x}= \mathbf{A} \mathbf{x} + \mathbf{B}u
 * $$\displaystyle (4-10)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

0&1\\ { - \frac{k}{m}}&{ - \frac{c}{m}} \end{array}} \right) $$
 * $$\mathbf{A}=\left( {\begin{array}{*{20}{c}}
 * $$\mathbf{A}=\left( {\begin{array}{*{20}{c}}
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

0\\ {\frac{1}{m}} \end{array}} \right) $$
 * $$\mathbf{B}=\left( {\begin{array}{*{20}{c}}
 * $$\mathbf{B}=\left( {\begin{array}{*{20}{c}}
 * }
 * }

According to equations (1)-(4) of slide 29-7 equation 4-10 can be written as
 * {| style="width:100%" border="0" align="left"

$$ $$
 * $$ \mathbf{x_{k+1}}= \underbrace{\left[ \mathbf{I} + h \mathbf{A} \right]}_{\color{blue}\mathbf{F}} \mathbf{x_{k}} + \underbrace{h \mathbf{B}}_{\color{blue}\mathbf{G}}u
 * $$ \mathbf{x_{k+1}}= \underbrace{\left[ \mathbf{I} + h \mathbf{A} \right]}_{\color{blue}\mathbf{F}} \mathbf{x_{k}} + \underbrace{h \mathbf{B}}_{\color{blue}\mathbf{G}}u
 * $$\displaystyle (4-11)
 * }
 * }

So therefore

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

$$ $$
 * $$F = \left[ \mathbf{I} + h \mathbf{A} \right]
 * $$F = \left[ \mathbf{I} + h \mathbf{A} \right]
 * $$\displaystyle (4-12)
 * }
 * }

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

$$ $$ where I is the identity matrix, and A, B, and h are defined above
 * $$G = h \mathbf{B}
 * $$G = h \mathbf{B}
 *
$$\displaystyle (4-13)
 * }
 * }

5.4.3: Finding $$c_{cr}$$
Critical damping occurs when the damping ratio is equal to 1. For systems like this one the damping ratio, according to Wikipedia, is given as

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

$$ $$
 * $$\varsigma = \frac{c}
 * $$\varsigma = \frac{c}
 *
$$\displaystyle (4-14)
 * }
 * }

Therefore to determine c such that critical damping occurs we simply solve c in terms of m and k, setting the damping ratio equal to one. If we do this we will end up with

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

1 = \frac\\ {c_{cr}} = 2\sqrt {mk} \end{array} $$ $$
 * $$\begin{array}{l}
 * $$\begin{array}{l}
 *
$$\displaystyle (4-15)
 * }
 * }

5.4.4: Plotting
Using the given values for the constants we are able to use the definitions of A and B along with equations (4-12) and (4-13) to find the values of the F and G matrices. Substituting we get,

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

F &= \left[ \mathbf{I} + h \mathbf{A} \right]\\ &= \left( {\begin{array}{*{20}{c}} 1&0\\ 0&1 \end{array}} \right) + .02\left( {\begin{array}{*{20}{c}} 0&1\\ { - 2}&{2c} \end{array}} \right)\\ &= \left( {\begin{array}{*{20}{c}} 1&.02\\ {-0.04}&{1.04c}\end{array}}\right)\end{align}$$ $$
 * $$\begin{align}
 * $$\begin{align}
 *
$$\displaystyle (4-16)
 * }
 * }

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

0\\ {\frac{1}{m}} \end{array}} \right) = \left( {\begin{array}{*{20}{c}} 0\\ {0.04} \end{array}} \right) $$ $$
 * $$G = .02\left( {\begin{array}{*{20}{c}}
 * $$G = .02\left( {\begin{array}{*{20}{c}}
 *
$$\displaystyle (4-17)
 * }
 * }

5.4.4a:$$c=0.5c_{cr}$$
Taking into account $$c = \frac{1}{2}{c_{cr}},{c_{cr}},\frac{3}{2}{c_{cr}}$$ and no input force the equation becomes, respectively,

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

1&.02\\ {-0.04}&{0.7354}\end{array}}\right) \mathbf{x_{k}} $$ $$
 * $$\mathbf{x_{k+1}}=\left( {\begin{array}{*{20}{c}}
 * $$\mathbf{x_{k+1}}=\left( {\begin{array}{*{20}{c}}
 *
$$\displaystyle (4-18)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

1&.02\\ {-0.04}&{1.4708}\end{array}}\right) \mathbf{x_{k}} $$ $$
 * $$\mathbf{x_{k+1}}=\left( {\begin{array}{*{20}{c}}
 * $$\mathbf{x_{k+1}}=\left( {\begin{array}{*{20}{c}}
 *
$$\displaystyle (4-19)
 * }
 * {| style="width:100%" border="0" align="left"
 * {| style="width:100%" border="0" align="left"

1&.02\\ {-0.04}&{2.206}\end{array}}\right) \mathbf{x_{k}} $$ $$
 * $$\mathbf{x_{k+1}}=\left( {\begin{array}{*{20}{c}}
 * $$\mathbf{x_{k+1}}=\left( {\begin{array}{*{20}{c}}
 *
$$\displaystyle (4-20)
 * }
 * }

The results here are as we would expect. For the under-damped case, $$c=0.5c_{cr}$$ there is overshoot in both the position and the velocity graphs. Overshoot meaning that the value went past the final value and oscillated around the steady state value for a period of time. The critically damped case, $$c=c_{cr}$$ quickly rose to the steady state value and did not overshoot. And the over-damped system, $$c=1.5c_{cr}$$, did not overshoot but rose less quickly than the critically damped case.

5.4.4b: Gaussian noise
Using Gaussian noise as the forcing function for this system and using the over damped value for c the plot of x becomes

Notice that because of the Gaussian noise the system does not come to a steady state value as in the previous example. The system continuously fluctuates, though as time progresses the system fluctuates closely around the steady state values show in figure 1. The Gaussian noise causes instability in the system.

5.4.4c: Cauchy noise
Using Cauchy noise as the forcing function for this system and again using the over damped value for c, the plot of x becomes

Comparing the system's reaction to Cauchy noise and Gaussian noise we can see that the oscillations due to Cauchy noise are much more pronounced than the Gaussian oscillations. This is due to the heavy tails of the Cauchy distribution. The heavy tails cause the system to react to much greater changes in input, which causes the large magnitude spikes seen in figure 3.

Author and proof-reader
[Author] Reiss

[Proof-reader]

= Problem 5.5 - Modify MATLAB code = From [[media:Nm1.s11.mtg30.djvu|Mtg 30-1]]

Given
HW*2.4: The following function was given: $$ f(x)=\frac{e^{x}-1}{x}$$. The integral was calculated as:$$ I=\int_{a}^{b}f(x)dx$$, where $$[a,b]=[-1,1]$$

Find
1. Modify the MATLAB code from the previous homework assignment to make it more efficient. 2. Do a Romberg table; compare to previous results.

Solution
''' We solved this problem on our own. ''' 1. The problem was previously solved by hand as seen in | 2.4. The actual value for this integral was found to be 2.1145018 | WA. The following results were obtained using the Octave code:

2. The Romberg table is as follows: The following Octave code was used:

Author and proof-reader
[Author] cavalcanti

[Proof-reader]

= Problem 5.6 - Comparison of corrected trapezoidal rules with other integration method = From [[media:Nm1.s11.mtg30.djvu|Mtg 30-1]]

Given

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

\begin{align} f(x)&=\frac{e^x-1}{x} \text{, } x \in [-1,1] \\ I&=\int_{-1}^{1} \! f(x) \, \mathrm{d}x \end{align} $$ $$.
 * $$\displaystyle
 * $$\displaystyle
 *
$$\displaystyle (5-1)
 * }
 * }

Find
Find and compare $$\displaystyle I_n $$ using the corrected trapezoidal rules ($$\displaystyle CT_k(n)$$), k=1,2,3, for n = 2,4,8,16, until the error is of order of $$\displaystyle 10^{-6} $$.

Solution
The high order corrected trapezoidal rules are defined by the following equation.
 * {| style="width:100%" border="0" align="left"

I_n=CT_k(n)=CT_{k-1}(n)+a_k h^{2k} $$ $$ where,
 * $$\displaystyle
 * $$\displaystyle
 *
$$\displaystyle (5-2)
 * }
 * }
 * {| style="width:100%" border="0" align="left"

\begin{align} a_i &= d_i \left[ f^{(2i-1)}(b)-f^{(2i-1)}(a) \right] \\ d_i &= -\frac{B_{2i}}{(2i)!} \text{ :  } d_1 = -\frac{1}{12} \text{,    } d_2 = \frac{1}{720} \text{,    } d_3 = -\frac{1}{30240} \end{align} $$ $$ ,where $$\displaystyle B_{2i} $$ is Bernoulli numbers. The corrected trapezoidal rules with k=1,2,3 are expressed as follows.
 * $$\displaystyle
 * $$\displaystyle
 *
$$\displaystyle (5-3)
 * }
 * }

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

\begin{align} CT_1(n) &= CT_0(n) + a_1 h^2 \\ &= T_o(n) + a_1 h^2 \\ CT_2(n) &= CT_1(n) + a_2 h^4 \\ CT_3(n) &= CT_2(n) + a_3 h^6 \\ \end{align} $$ $$ ,where $$\displaystyle T_0(n) $$ is the integration with the composite trapezoidal rule.  Table:  Observation:
 * $$\displaystyle
 * $$\displaystyle
 *
$$\displaystyle (5-4)
 * }
 * }
 * At $$\displaystyle n=2$$, the method achieved the error reduced to an order of $$\displaystyle \Theta(10^{-6}$$).

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

.
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * style="width:50%; padding:10px; border:1px solid #888888" align="center" |
 * }
 * }
 * }

Author and proof-reader
[Author] Shin [Proof-reader]

= Problem 5.7 - Pros and Cons of Integration Methods = From [[media:Nm1.s11.mtg30.djvu|Mtg 30-1]]

Given
The following integration methods: 1. Taylor Series 2. Composite Simpson's Rule 3. Composite Trapezoidal Rule 4. Romberg (Richardson) 5. $$cT_{k}(n)$$

Find
Discuss the pros and cons of the five given integration methods.

Author and proof-reader
[Author] cavalcanti

[Proof-reader]

= Problem 5.8 - Proof of Higher Order Trapezoidal Rule Error(HOTRE)= From [[media:Nm1.s11.mtg30.djvu|Mtg 30-2,3,7]]

Given
,where $$\begin{align} x_k := a+kh, \; \ h :=(b-a)/n, \; \ x(t)= \frac{x_k+x_{k+1}}{2} + t \cdot \frac{h}{2}, \; \ t \in [-1,+1] \end{align}$$ $$ x(-1) = x_k, \qquad x(0)= \frac{(x_k + x_{k+1})}{2}, \qquad x(+1) = x_{k+1} $$ ,where $$\begin{align} g_k(t):=f(x(t)) \; \ x \in [x_k,x_{k+1}] \end{align}$$

Find
 Proove that (8-1) and (8-2) are same

Solution
 Therefore, (8-1) will be changed as same as (8-2)

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

$$\displaystyle E_n^T=\dfrac{h}{2} \sum_{k=0}^{n-1} \left[ \int_{-1}^{+1}g_k(t)dt- \left\{g_k(-1)+g_k(+1) \right\} \right] $$
 * style="width:20%; padding:10px; border:2px solid #8888aa" |
 * style="width:20%; padding:10px; border:2px solid #8888aa" |

 * style= |

 * }
 * }

Find
 Proove (8-3)

Solution
 Using Integration by parts,

$$\displaystyle\begin{align} \int_{a}^{b} u {v}^{'}= [uv]_{a}^{b} - \int_{a}^{b} {u}^{'} v \end{align}$$

 In this problem, u = -t, v = g(t), a = -1, b = +1  $$\displaystyle\begin{align} (8-3) \rightarrow [(-t) \cdot g(t)]_{-1}^{+1} - \int_{-1}^{+1} (-1) \cdot g(t) dt \end{align}$$

$$\displaystyle\begin{align} \rightarrow [-g(+1)-g(-1)] - \int_{-1}^{+1} (-1) \cdot g(t) dt \ = \ \int_{-1}^{+1} g(t) dt - [g(+1) + g(-1)] \end{align}$$

 Therefore, clearly we can proove (8-3)

Given
where $$\displaystyle \begin{align} \; g_k^{(i)}(t)=\frac{d^i}{dt^i} g_k^{(t)}, \;x \in [x_k, x_{k+1}] \end{align}$$

Find
 Proove (8-4)

Solution
 Therefore, clearly we can proove (8-4)

Given

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

p_{5}(t) = -\frac{t^5}{120} + \frac{t^3}{36} + \underbrace{\alpha}_{c_{5}} t + \underbrace{\beta}_{c_{6}} $$ $$
 * $$ \displaystyle
 * $$ \displaystyle
 *
$$\displaystyle (8-5)
 * }

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

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

p_{5}(0) =0, \qquad p_{5}(\pm 1) = 0 $$ $$.
 * $$ \displaystyle
 *
$$\displaystyle (8-6)
 * }

Find
$$\displaystyle c_5 \, \ c_6 $$

Solution

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

$$ \displaystyle p_{5}(0) = -\frac{0}{120} + \frac{0}{36} + c_{5} (0) + c_{6} = 0 $$
 *  Plug (8-6) into (8-5)
 * }
 * }

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

\therefore c_{6} = 0 $$

 * $$ \displaystyle
 * }

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

p_{5}(1) = -\frac{1}{120} + \frac{1}{36} + c_{5} \cdot (1) = 0 $$
 * $$ \displaystyle
 * }

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

\therefore c_{5} = \frac{3}{360} - \frac{10}{360} = -\frac{7}{360} $$

 * $$ \displaystyle
 * }

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

p_{5}(-1) = -\frac{-1}{120} + \frac{-1}{36} + c_{5} \cdot (-1) = 0 $$
 * $$ \displaystyle
 * }

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

\therefore c_{5} = -\frac{-3}{360} + \frac{-10}{360} = -\frac{7}{360} $$

 * $$ \displaystyle
 * }

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

$$ \displaystyle c_6 = 0 \, \ c_5 = -\frac{7}{360} $$
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style="width:10%; padding:10px; border:2px solid #8888aa" |
 * style = |
 * }

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

.
 * }

Author and proof-reader
[Author] Oh

[Proof-reader]

= References =

= Contributing members =

title: User:Egm6341.s11.team5/HW5