Name: Answer k y
Midterm Exam:
Professor: Paul J. Atzberger
Introduction to Numerical Analysis, 104B
September 24, 2010
Scoring:
Pot S508
Problema: 33-5"
Problems: _ $5
Directions: Answer each question carefully and be sure to show all of your
work. While you are permitted to use a calculator, please be sure to show
intermediate steps in your calculations. If you have any questions please feel
free to ask.Problem 1: Numerical Quadratures
Consider approaches for estimating the value of the integral
:
Te i, f(a)dr. ()
Consider the following quadrature method for approximating the integral
1
e ynb-a, . (5)
L= DZ) @)
where cy =a, ci = 6.
a) What is the degree of precision of this method?
The degree of ptecision is the lavgest degree of
a polynomial fur which the meted is exact,
= Spay dx =(b-@)%
= bag + Pha, = (balay %
Polx) =o y
z
Fixjauyx, D= xs xx mai [bor]e = 2 (pea)
7
= Beh cia + Baye b = (bows bal) =( bo)"
z
= GP oxy = ay [herb 2 (Be)
= BBog a 4 Behe yy <2 (boat beabh) 4
Jn gin\
Pil) = aX?
This shows the degue of precisin js ones
The quadvatime is euch for all poly nomiuls of
degree ohe ov less,b) Consider the same method above, but used insteady in a composite quadra-
ture scheme. In other words, we use for each k the nodes co = %,¢1 = Ck41
to estimate the integral on [zz, 241]. We sum the results to estimate the
integral on the full interval [a,b]. The nodes are given by 2» = a+ kh,
= (b-a)/n.
What is the order of f accuracy of this composite quadrature method?
Let Ty = 9" cat WAX. By the Lagvange interpola tien
emavnder theo , ne have
FOO =f, +a) 6 =e) (k-C))
Ix =e [ag ta,XJAX is £%5b)) (x- lo Mx~cy) dx
Se Tae xpd + oth")
= Be Pc) + BEAL e,) = SAL beta) + Capea] + 2G) - OF
=ITntoth?) , sture enact for deg ove polye
ae 24, = = Ee + Ol) = 6 erydy + he OI)
= SPEM) Ax + ba oli?) = =LD+0l4)
This shows +e Compost be Avadratire Ps second
Orde accurnte,
c) Consider the integral on’ the interval [—1,1] and non-composite quadra-
tures. Suppose for the quadrature the nodes x, are chosen to be the roots of
the n* degree Legendre Orthogonal Polynomial on [—1, 1].
NW
He
x
I
What is the degree of precision of the quadrature method?
An-|Problem 2: Runge-Kutta Methods
Consider the ODE
Y — saye) @)
(0) = w. O)
For approximating solutions of the ODE consider the two-stage Runge-Kutta
Method with the tablewx
ofo 0
T|10 (5)
23
a) What is the order of accuracy of this Runge-Kutta Method? (Hint: Study
the truncation error and use the chain rule derived from equation 3).
Wie = wat Sn $4 S Fas) bf] c= [Pf
‘ 2 ae y helt 6) 3 Geka
Flénth §)= Flt nth iy rh ltrwy
hay +0(h*)
a ky 5 OF :
ve exact Sola hin Me Brant, + ol?)
y (ens) =yltn) +y Maye Ly "(da dh? oll?)
US) hy +he ObE, this au be cies a
y Menai) = yen) + {bu yltal)h +f ABE o Re]t > +0th?)
The treatin Rave! is qian by Conlh)= pete brea
Whee whe
PaO [HL hs BESTE ole lun ebb bE HE ikea
20E*>s
h
= o(h*)
This Ghows the ov der of ACChw ay 1s tyreb) Consider f(t,y) = —Ay, A > 0 in equation 3. For what values of the time
step h is the method stable?
Werner = Wy + Blot) + ELH, )
Hh ue hells)
Fov Flby)=~dy we have
Witt = Oy + RA) + 2 (AG)
= (1~ak) wy, + 20) Cy — rhe)
(he ur) Wa
Stability vequiees [[-Ah+ Rh le 4
I-Ah+¥h*= 4 > -AW+XhP 20 => 4yh(Ah~/) =o
Dheo or hey
I-\h +X W=-4 =) d-dht Me 0
Ph) =|~dh+ 2h, pllh) =
P= i-padet
This shows that Plh) hes the form
vplex valad so not
relevant
-\+tA*h=o => h=d"
eovided OSHE LA Fhe Runge ~ levtte
font behaves stablely ayProblem 3: Multistep Methods
Consider the ODE
I
2 = fue) ()
60) = 30 @
For approximating solutions of the ODE consider the two-step Multistep
Method
tons = te + 2 Sle) — Flora)] ®)
wt = a9 )
wi = a. (10)
a ‘What is the order of accuracy of this method?
(ylbnad) = Plyltnd) - nt! tylbn ly (yldnl) + o¢h>)
I [esd = ylin) + hy (bas ey ih) + ok)
= yn) tht +2078 + olh®)
The truncation evr Is giana by
tno lb) = Br d— wert | with we =ylhe), keh
Cralh) =a" Lylda rhe + Sere 4 oll) w+ SA — Rpt slid)
= b' fy) sun) th(f-gted pte lee tye) 4 oli?)
= 0h) -
The wetHwd is second orden aauratesb) State the general criteria for a multistep method to be stable?
Witt = Ami Wi Him Winey 01 + Ag Wat om
thCbm ton thmitnt + bo frst] & Ge)
Wo = M0) Whey 0+) Winey = otmeny
Ret PEA) = dmg AL ans. Ls 0s = Ay Aap
be the characteristic polynomial of (#)
The mult step method is stable if fr all
hots Ay of P, CPOW=0), ne have
(3) the JE 4y
1) rH Prel=]o rb is 0 simple root,
(c) Is the multistep method given by equation 8 stable? If so, show the
criteria holds.
PIN) = W-N=EO-DA => A= 1, Azo ave the rots,
This callectren of vwts satisfies anditions (4), i)
So the multistep woth given in eqnatun & is
Stoble,