Tentamen i Numerik Amneskod ¨ MAM208 Tentamensdatum 2007-01-10
Totala antalet uppgifter: 5 Skrivtid 09.00 – 14.00
L¨ arare: Ove Edlund
Jourhavande l¨ arare: Ove Edlund Tel: 070-2828661 Resultatet meddelas: p˚ a studentportalen. P˚ a www.ltu.se/atorget ansl˚ as n¨ ar
den r¨ attade skrivningen kan h¨ amtas ut.
Till˚ atna hj¨ alpmedel: Minir¨ aknare, Beta
Till alla uppgifterna ska fullst¨ andiga l¨ osningar l¨ amnas. Resonemang, inf¨ orda beteckningar och utr¨ akningar f˚ ar inte vara s˚ a knapph¨ andigt presenterade att de blir sv˚ ara att f¨ olja. ¨ Aven endast delvis l¨ osta problem kan ge po¨ ang.
Enbart svar ger 0 po¨ ang.
Institutionen f¨ or matematik
1 (3)
1 (a) Best¨ am en mistakvadratapproximation till det
¨ overbest¨ amda ekvationssystemet
1 −1 1
−1 3 1
−1 1 −2
−1 3 0
β
1β
2β
3
=
−1 5 4 4
Utnyttja att matrisen har QR-faktorisering
Q = 1 2
1 1 1
−1 1 −1
−1 −1 1
−1 1 1
R =
2 −4 1
0 2 2
0 0 −1
(3 p) (b) Bevisa formeln f¨ or minstakvadratapproximatio- nen med QR, som du anv¨ ande ovan. (3 p)
(a) Find a least-squares approximation for the over-determined system om equations
1 −1 1
−1 3 1
−1 1 −2
−1 3 0
β
1β
2β
3
=
−1 5 4 4
Make use of the QR-factorization of the matrix
Q = 1 2
1 1 1
−1 1 −1
−1 −1 1
−1 1 1
R =
2 −4 1 0 2 2 0 0 −1
(3 p) (b) Prove the formula for least-squares approxima- tion using QR, that you used above. (3 p)
2 Givet ett antal datapunkter:
x
i0 1 2 3 4 5 6 y
i1 2 3 3 4 3 1
Beskriv vilka egenskaper du f¨ orv¨ antar dig att inter- polationsfunktionen har givet f¨ oljande metoder
• polynominterpolation
• linj¨ ar interpolation
• pchip-interpolation
• splineinterpolation (4 p)
Given a number of data points:
x
i0 1 2 3 4 5 6 y
i1 2 3 3 4 3 1
Describe what properties you expect from the inter- polation function given the following methods
• polynomial interpolation
• linear interpolation
• pchip interpolation
• spline interpolation (4 p)
3 Vi betraktar differentialekvationen y
00+ x y
0+ y = 2 x
(a) Givet begynnelsevillkoren y(0) = 2, y
0(0) = 1, beskriv hur du l¨ oser begynnel- sev¨ ardesproblemet numeriskt, t.ex. med Heuns metod, f¨ or att f˚ a en god approximation av y(2). Du beh¨ over inte plocka fram det numeriska v¨ ardet av approximationen. (4 p) (b) Givet randvillkoren y(0) = 2, y(2) = 1, be- skriv hur du l¨ oser randv¨ ardesproblemet nume- riskt med finitadifferensapproximation. Struk- turen hos matrisen ska framg˚ a av l¨ osningen.
D¨ aremot beh¨ over du inte plocka fram det nu- meriska v¨ ardet av l¨ osningen. (4 p)
We consider the differential equation y
00+ x y
0+ y = 2 x
(a) Granted the intitial value conditions y(0) = 2, y
0(0) = 1, describe how you solve the initial value problem (IVP) numerically, for example with Heuns method, to get a good approxima- tion of y(2). You do not need to find the nume- rical value of the approximation. (4 p) (b) Granted the boundary value conditions y(0) = 2, y(2) = 1, describe how to solve the bounda- ry value problem numerically, using finite dif- ference approximations. The structure of the matrix should be given as a part of your so- lution. But you do not need to calculate the
numerical solution. (4 p)
2 (3)
4 (a) Approximera integralen
1
Z
0
x sin(πx
2) dx
med en fempunkters, respektive trepunkters
Simpsons formel. (3 p)
(b) Simpsons formel har ett fel med ord- ningstal O(h
4). F¨ orb¨ attra ordningstalet p˚ a ber¨ akningen i (a) genom att anv¨ anda Richardson-extrapolation p˚ a resultaten i (a).
(2 p)
(c) Ber¨ akningen i (a) ¨ ar ett steg i algoritmen f¨ or ad- aptiv numerisk integrering, som beskrivs i kurs- boken. Hur g˚ ar algoritmen vidare, och under vilka villkor g˚ ar den vidare? (3 p)
(a) Approximate the integral
1
Z
0