Tentamen i Numerik Amneskod ¨ C0002M MAM208 Tentamensdatum 2008-08-20
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. F¨ or att se n¨ ar den r¨ attade skrivningen kan h¨ amtas ut, g˚ a till www.ltu.se/atorget.
Till˚ atna hj¨ alpmedel: Minir¨ aknare. Tabellsamling i matematik, t.ex. 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 Givet en LU-faktorisering av den inverterbara matri- sen A, uttryckt som PA = LU, (a) redog¨ or f¨ or struk- turen hos matriserna P, L och U, (b) f¨ orklara hur sy- stemet Ax = b l¨ oses med hj¨ alp av dessa matriser, (c) redovisa i detalj hur fram˚ at och bak˚ at-substitution fungerar (endera med Matlabkod, eller pseudokod).
(6 p)
Given an LU-factorization of the invertible matrix A, expressed as PA = LU, (a) describe the structure of the matrices P, L och U, (b) explain how the system Ax = b is solved with these matrices, (c) give a de- tailed account for forward and backward substitution (either using Matlab code, or pseudo code). (6 p)
2 (a) Best¨ am en mistakvadratapproximation till det
¨ overbest¨ amda ekvationssystemet
1 −2 2 1 1 1 1 1 −1
−1 2 0
β
1β
2β
3
=
8 6
−4 6
Utnyttja att matrisen har QR-faktorisering
Q = 1 2
1 −1 1 1 1 1 1 1 −1
−1 1 1
R =
2 −1 1 0 3 −1
0 0 2
(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 −2 2 1 1 1 1 1 −1
−1 2 0
β
1β
2β
3
=
8 6
−4 6
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 −1 1 0 3 −1 0 0 2
(3 p) (b) Prove the formula for least-squares approxima- tion using QR, that you used above. (3 p)
3 Beskriv hur du finner en numerisk l¨ osning med Newtons metod till f¨ oljande ekvationssystem:
x y z = 1 x + y + z = 6 x
2+ y
2− z
2= 1
H¨ arled hur ing˚ aende matriser och vektorer bildas och redog¨ or f¨ or hur de anv¨ ands. Ber¨ akna inte l¨ osningen.
(En l¨ osning ¨ ar x ≈ 3.02603, y ≈ 0.11561, z ≈
2.85836.) (5 p)
Describe how you find a numerical solution using Newton’s method of the following system of equa- tions:
x y z = 1 x + y + z = 6 x
2+ y
2− z
2= 1
Describe how the matrices and vectors you use are formed and how they are utilized. Do not calcula- te the solution. (One solution is x ≈ 3.02603, y ≈
0.11561, z ≈ 2.85836.) (5 p)
4 (a) Approximera integralen
2
Z
1
p 8 − x
3dx
med stegl¨ angd h = 0.25 i Simpsons formel.
(2 p)
(b) Trapetsmetoden har ett fel med ordningstal O(h
2). Ber¨ akna integralen ovan med Trapets- metoden. Anv¨ and b˚ ade stegl¨ angd h = 0.25 och h = 0.5. Anv¨ and Richardson-extrapolation f¨ or att f¨ orb¨ attra ordningstalet f¨ or felet, och j¨ amf¨ or
med resultatet i (a). (3 p)
(a) Approximate the integral
2
Z
1