User:Rjorjorjo/HW5

=Find out the constants of integration function $$P_{n}(t)$$=

Statement
Find $$C_{5}\,$$ and $$C_{6}\,$$ Given $$P_{5}(t)= \!\,\int P_{4}(t)dt \!\,= \!\,-\!\,\frac{t^{5}}{120}+ \!\,\frac{t^{3}}{12}+\!\,C_{5}t+\!\,C_{6}$$


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


 * Ref: Lecture Notes [[media:Egm6341.s10.mtg26.djvu|P26-3]]
 * }
 * }

Solution
(i)Select $$P_{5} :\!\,P_{5}(\pm \!\,1)=\!\,0$$ and $$P_{5} (0)=\!\,0$$

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

P_{5}(0)=0 $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

\Rightarrow-\frac{0^{5}}{120}+\frac{0^{3}}{36}+C_{5}0+C_{6} = 0 $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

\Rightarrow\,C_{6} = 0 $$ (iii) $$P_{5}(+ \!\,1)=\!\,0$$
 * $$ \displaystyle
 * $$ \displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

\Rightarrow-\frac{1^{5}}{120}+\frac{1^{3}}{36}+C_{5}1 = 0 $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

\Rightarrow-\frac{3}{360}+\frac{10}{360}+C_{5} = 0 $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }
 * {| style="width:100%" border="0" align="left"

\Rightarrow C_{5} = -\frac{7}{360} $$
 * $$ \displaystyle
 * $$ \displaystyle
 * }

=Redo steps in proof of Trapezoidal error=

Statement
Redo steps in proof of Trapezoidal error by try to cancel terms with odd order of derivative of g


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


 * Ref: Lecture Notes [[media:Egm6341.s10.mtg28.djvu|P28-4]]
 * }
 * }

Solution
From


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


 * Ref: Lecture Notes [[media:Egm6341.s10.mtg26.djvu|P26-1]] [[media:Egm6341.s10.mtg21.djvu|P21-3]]
 * }
 * }



\begin{align} \\E &= \int_{+1}^{-1}\underbrace{(-t)}_{P_{1}(t)}g^{1}(t)dt\; \\ &= [\!\,P_{2}(t)g^{1}(t)]\!\,_{-1}^{+1}-\underbrace{\int_{-1}^{+1}P_{2}(t)g^{2}(t)dt}_{A}\,. \end{align} $$

In order to cancel odd order of derivative of g, select $$P_{2}(t) = 0 \,\,at\,\, t=\pm\!\,1$$



\begin{align} \\P_{2}(t) &= \int P_{1}(t)dt\; \\ &= -C_{1}\frac{t^{2}}{2}+C_{3}\,where C_{2} = 0\; \\ &= -\frac{t^{2}}{2}+\alpha\!\,\; \end{align} $$ $$P_{2}(t) = 0 \,\,at\,\, t=1$$

$$\rightarrow \alpha\!\,=\frac{1}{2}$$

$$\rightarrow C_{1} = -1\,\,C_{3} = \frac{1}{2}$$

$$ A = [P_{3}(t)g^{2}(t)]_{-1}^{+1} + \underbrace{\int_{-1}^{+1}\underbrace{P_{3}(t)}_{U^{'}}\underbrace{g^{3}(t)}_{V}dt}_{B}$$

$$ B = [UV]_{-1}^{+1} - \int UV^{'} = [P_{4}(t)g^{3}(t)]_{-1}^{+1} - \underbrace{\int_{-1}^{+1}P_{4}(t)g^{4}(t)dt}_{C}$$

In order to cancel odd order of derivative of g, select $$P_{2}(t) = 0 \,\,at\,\, t=\pm\!\,1$$

$$ t = 1 $$



\begin{align} \\P_{4}(1) &= \int P_{3}(t)dt\; \\ &= -\frac{1}{4!\!\,}+\frac{1}{4}+C_{4}+C_{5}\; \\ &= 0\; \end{align} $$

$$\rightarrow C_{4}+C_{5} = \frac{1}{24}-\frac{1}{4} = -\frac{5}{24}$$

$$ t = -1 $$



\begin{align} \\P_{4}(-1) &= \int P_{3}(t)dt\; \\ &= -\frac{1}{4!\!\,}+\frac{1}{4}-C_{4}+C_{5}\; \\ &= 0\; \end{align} $$

$$\rightarrow -C_{4}+C_{5} = \frac{1}{24}-\frac{1}{4} = -\frac{5}{24}$$

$$ C_{5} = -\frac{5}{24}\,\,C_{4} = 0 $$

$$ C = [P_{5}(t)g^{4}(t)]_{-1}^{+1} - \underbrace{\int_{-1}^{+1} P_{5}(t)g^{5}(t)dt}_{D}$$

$$ D = \underbrace{[P_{6}(t)g^{5}(t)]_{-1}^{+1}}_{= 0} - \int_{-1}^{+1} P_{6}(t)g^{6}(t)dt$$

$$ E = -[P_{3}(t)g^{2}(t)+P_{5}(t)g^{4}(t)+...+P_{2l+1}(t)g^{2l}(t)]_{t = -1}^{t = +1} - \int_{-1}^{+1}P_{2l+2}(t)g^{2l+2}(t)dt$$

$$ P_{3}(t) $$ is odd function $$ \rightarrow P_{3}(-1) = -P_{3}(1)$$

$$ [\,P_{3}(t)g^{2}(t)]_{-1}^{1} = P_{3}(1)g^{2}(1) - P_{3}(-1)g^{2}(-1) = P_{3}(1)[g^{2}(1) + g^{2}(-1)]$$

$$ E = -\sum_{r = 1}^{l}P_{2r+1}(1)[g^{2r}(1) + g^{2r}(-1)] - \int_{-1}^{+1}P_{2l+2}(t)g^{2l+2}(t)dt$$

From [[media:Egm6341.s10.mtg21.djvu|p.21-2]] $$ g_{k}^{i} = (\frac{h}{2})^{i}f^{i}(x(t))\,\,x\in\!\,[x_{k},\,x_{k+1}] $$

$$ E = -\sum_{r = 1}^{l}P_{2r+1}(1)[(\frac{h}{2})^{2r}f^{2r}(x(1)) + (\frac{h}{2})^{2r}f^{2r}(x(-1))] - \int_{-1}^{+1}P_{2l+2}(t)(\frac{h}{2})^{2l+2}f^{2l+2}(x)\frac{2}{h}dx$$

$$ \overline{d_{2r}} = \frac{P_{2r}(1)}{2^{2r}}$$

$$ E = -\sum_{r = 1}^{l}2\overline{d_{2r+1}}h^{2r} [f^{2r}(b) + f^{2r}(a)] - (\frac{h}{2})^{2l+2}\frac{2}{h}\sum_{k = 0}^{n - 1}\int_{x_{k}}^{x_{k+1}}P_{2l+2}(t_{k}(x))f^{2l+2}(x)dx$$



\begin{align} \\E_{n}^{1} &= \frac{h}{2}E\; \\ &= -\sum_{r = 1}^{l}\overline{d_{2r+1}}h^{2r-1} [f^{2r}(b) + f^{2r}(a)] - (\frac{h}{2})^{2l+2}\sum_{k = 0}^{n - 1}\int_{x_{k}}^{x_{k+1}}P_{2l+2}(t_{k}(x))f^{2l+2}(x)dx\; \end{align} $$

=Compute the curve length of ellipse=

Statement
Compute C by using two methods:

$$ \displaystyle a)\, C = \int_{\theta = 0}^{\theta = 2\pi}dl \,\,\rightarrow From(4)$$ [[media:Egm6341.s10.mtg30.djvu|P30-3]]

$$ dl = d\theta[r^{2} + (\frac{dr}{d\theta})^{2}]^{\frac{1}{2}}\,\,\rightarrow From(1) $$ [[media:Egm6341.s10.mtg30.djvu|p.30-3]]

$$ \displaystyle b)\, C = 4aE(e^{2}) \,\,\rightarrow From(5)$$ [[media:Egm6341.s10.mtg30.djvu|p.30-4]]

$$ E(e^{2}) = \int_{0}^{\frac{\pi}{2}}[1 - e^{2}sin^{2}\theta]^{\frac{1}{2}}d\theta \rightarrow From(6)$$ [[media:Egm6341.s10.mtg30.djvu|p.30-4]]

Solution
$$ \begin{align} \displaystyle a)\, C = \int_{\theta = 0}^{\theta = 2\pi}dl \\ &=\int_{\theta = 0}^{\theta = 2\pi}d\theta[r^{2} + (\frac{dr}{d\theta})^{2}]^{\frac{1}{2}} \\\end{align}\ $$

$$ r(\theta) = \frac{1 - e^{2}}{1 - ecos\theta} $$ $$ e = sin(\frac{\pi}{12}) $$

$$ \begin{align} C = \int_{\theta = 0}^{\theta = 2\pi}dl \\ &=\int_{\theta = 0}^{\theta = 2\pi}[(\frac{1 - e^{2}}{1-ecos\theta})^{2} + (\frac{(e^{3} - e)sin\theta}{e^{2}cos^{2}\theta - 2ecos\theta + 1})^{2}]^{\frac{1}{2}}d\theta\\ &=\int_{\theta = 0}^{\theta = 2\pi}[1 + (\frac{e\cancelto{1}{(e^{2} - 1)}sin\theta}{(ecos\theta - 1)^{\cancelto{1}{2}}})^{2}(\frac{\cancelto{1}{1-ecos\theta}}{\cancelto{1}{1 - e^{2}}})^{2}]^{\frac{1}{2}}d\theta\\ &=[1 + (\frac{esin\theta}{ecos\theta - 1})^{2}]^{\frac{1}{2}}d\theta \\\end{align}\ $$

Use Matlab to find the value of C

Get I1 = 1.6041  Elapsed time is 0.049997 seconds.

$$ \displaystyle b)\, C = 4a\int_{0}^{\frac{\pi}{2}}[1-e^{2}sin^{2}\theta]^{\frac{1}{2}}d\theta \ $$

Here $$ a\, =\, 1\, $$

Use Matlab to find the value of C

Get I2 = 6.1766  Elapsed time is 0.057046 seconds.