User:Egm6341.s10.team3.heejun/HW6

=  (10) Run Kessler's code to reproduce his table, and Complete HW p. 30-2 =

Problem Statement
$$ \displaystyle Follow\, Kessler's\, code\, line\, by\, line\, to\, produce\, (P_2,P_3)\, (P_4,P_5)\, (P_6,P_7)\, and\, put\, comments\, in\, his\, code\, $$

Ref: Lecture Notes [[media:Egm6341.s10.mtg30.djvu|p.30-2]] and [[media:Egm6341.s10.mtg37.djvu|p.37-1]] Ref: Trapezoidal rule error

Solution

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


 * }
 * }
 * }
 * }


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



$$ f=1 \,\,\, g=2$$ $$ f=f.*g.*(g+1) $$ yields f=6. $$ fracsum(-1*cn,cd.*f) $$ yields fracsum(-1, 6) Now looking into the fracsum function,
 * $$ c_1 $$ = -1

div=gcd(round(n),round(d))

will yield div = 1. because, round(-1) = -1 round(6) = 6 gcd(-1,6) = 1.

n=round(n./div); will give n=1

d=round(d./div); will give d=6

Next, for k=1:length(d) dsum=lcm(dsum,d(k)); end

will yield dsum = 6.

nsum=dsum*sum(n./d); is, nsum = 6*sum(1/6) = 6*(1/6) =1.

div=gcd(round(nsum),round(dsum)); gives div = 1.

So. nsum = 1 and  dsum =6 Hence $$ c_3 = \frac{1}{6} $$

Now going back, [newcn newcd] = [1 6] cn=[cn;newcn]; cd=[cd;newcd]

cn = [-1;1]; cd=[1;6]

f=[f;1]; So, f=[6;1]

and

g=[2+g(1);g]; which means, g = [2+2, 2] = [4;2]

[newpn,newpd]=fracsum((g-1).*cn,f.*cd); i.e, fracsum(-3,6) and fracsum(-1,1)

Again repeating the exercise for fracsum as specified above will give, would yield, $$-\frac{1}{2} \,\,\, and  \frac{1}{6} $$ respectively. Hence,

$$p_2(1) = -\frac{1}{2} + \frac{1}{6} = -\frac{1}{3} $$

So this explains the way to calculate $$ c_3 \,\,\, and p_2(1) $$.

The other constants and the values of polynomial at t=1 can be similarly calculated. It is to be noted that once one constant is found the succeeding constants can be calculated from the previous ones.


 * }

=  (11) Verification of results for the question 10 of HW 5 =

Problem Statement
$$ \displaystyle Compare\, our\, results\, to\, the\, results\, of\, Team4\, $$

$$ \displaystyle i)\, Evaluate\, the\, given\, circumference\, formular\, with\, Comp. Trap,\, Romberg\, and\, Clencurt\, $$

$$ \int_{\theta=0}^{\theta=2\pi} dl = C $$

$$ \displaystyle Where\,\,\,\, \begin{align} dl &=d\theta [r^2+(\frac{dr}{d\theta})^2]^(\frac{1}{2})\\ r(\theta) &= \frac{1-e^2}{1-ecos(\theta)} \\ e &= sin(\frac{\pi}{12}) \\\end{align}\ $$

Ref: Lecture Notes [[media:Egm6341.s10.mtg25.djvu|p.25-2]] and [[media:Egm6341.s10.mtg30.djvu|p.30-3]]

$$ \displaystyle ii)\, The\, complete\, elliptic\, integral\, of\, the\, second\, kind\, method\, $$

$$ \displaystyle C = 4a E (e) $$

$$ \displaystyle E(e) = \int_{0}^{\pi /2} [1-e^2sin^2(\theta)]^{(\frac{1}{2})} d\theta $$

Ref: Team 4 in HW 4 [|problem_11] and Wikipedia[|Elliptic_integral]

Solution
$$ \displaystyle i)\, Summary\, of\, Results\, given\, by\, Team4\, and\, Team3\, $$

$$ \displaystyle \dagger\, Note:\,\, In\, the\, result\, of\, Clencurt,\, X\, means\, ocillating\, $$

$$ \displaystyle ii)\, Comparision\, $$

$$ \displaystyle a)\, The\, big\, difference\, was\, caused\, by\, the\, calculation\, of\, error.\, $$ $$ \displaystyle :\, Team 4\, computed\, I_n\, to\, the\, error\, 10^{-10}\, b/w\, the\, exact\, I\, and\, I_n.\, $$ $$ \displaystyle \,\, However,\, Team 3\, computed\, I_n\, to\, the\, error\, 10^{-10}\, b/w\, I_{n-1}\, and\, I_n.\, $$ $$ \displaystyle \,\, In\, order\, to\, clearly\, know\, the\, exact\, I,\,\, Team 3\, directly\, computed\, I\, with\, Quad\, again\, $$

$$ \displaystyle b)\, Team 4\, exactly\, found\, I_n\, with\, Clencurt\, but\, the\, result\, of\, Team 3\, is\, oscillating\, on\, the\, place\, for\, 10^{-15}\, $$

$$ \displaystyle c)\, Correction\, for\, Clencurt\, and\, 2nd\, method\, $$ $$ \displaystyle :\, Since\, the\, Clencurt's\, result\, of\, Team 3\, is\, going\, in\, busy\, mode\, and\, the\, input\, of\, 2nd\, method\, was\, not\, correctly\, uploaded,\, it\, is\, not\, easy\, to\, clearly\, see\, the\, results.\, $$ $$ \displaystyle Thus,\, the\, inputs\, for\, above\, two\, are\, attached\, below\, again.\, $$

$$ \displaystyle c-1)\, Clencurt\, $$

$$ \displaystyle c-2)\, 2nd\, method\, $$

$$ \displaystyle iii)\, Analyzing\, the\, Results\, of\, Clencurt\, $$

$$ \displaystyle The\, oscillating\, on\, the\, place\, for\, 10^{-15}\, is\, caused\, by\, the\, difference\, b/w\, I_{exact}\, and\, I_{cl}\, in\, the\, result\, of\, team 3.\, $$ $$ \displaystyle Thus,\, we\, verified\, the\, Clencurt's\, result\, with\, a\, different\, order\, of\, errors\, $$

$$ \displaystyle a)\, Correctional\, Clencurt\, $$

$$ \displaystyle b)\, The\, difference\, when\, I_{exact}\, -\, I_{cl}\, <\, 10^{-8}\, is\, 7.591901329817574*10^{-9}.\, $$ $$ \displaystyle This\, value\, is\, pretty\, small\, and\, can\, be\, thought\, that\, the\, Clencurt\, integration\, close\, up\, to\, the\, I_{exact},\, the\, Quad\, integration.\, $$