, -,."-,.,,.._..:. SoL.,----, StudentID: Name: JE7]7} 1li :?df- 15: 5:"T-{:l 37.}Cil}}7.] 7-1] {}-cr}a].2.. %:d- 1i:!-7-1] lia]}7.] '{,},c: 7clf- 7-1j{!-7]9l.Jl-if 7] 'o ).}- - Q. z!-?ir}o'j o'j @ g. 1. The following is the explanation of the important concepts in numerical analysis and scientific computing. Fill the blank. (20pt) (a) I (a) I is the error made by cutting off an infinite sum and approximating it by a finite sum.,...,. ".. '{6)' I '(by -. lis the difference between the calculated approximation' ofa number and" its'.' exact mathematical value. I True.- ob:d\..tle (0.) Jiu"Cb:IloV\(\D _Cb) R"l> P7) el/vdr 2. For a given (30pt) 0-) (a) Use three-digit rounding arithmetic (significant numbers) to evaluate f(o.l). (b) Find the true absolute error Et and the true relative error Et. What type of error is it? -1- v: -'(. t\ e e-e f(l') \vvte (,\6t;>i'1 - oofo - ;:),60.33-' - J\S\Jl L!lro- Oo 0.-:..., 20S:-rC' \ :2,0) '-.' Yo\J,\.J. ob- e W1)'(' - -------------, Oct. 27, 2014 1 Chibum Lee
3. The following is about the equation f(x) = e" - x2 + 3x. (50pt) (a) Show that the equation f(x) = 2 has at least one real root in the interval [0, 1J. (Note: You need to specify the theorem!) (b) Write the approximation formula of bisection method (X,. =...) and perform 3 steps with. ".,,. ""...,thi interval andcompute the approximated solution. Find the approximated relative en;9! Ep.,_., for each steps. (c) Write the approximation formula of false position method (X,. =...) and repeat above procedure. ek- -y;..)..-t- 3:>'f.. = ;).. \..- Y' ' ) ei- _r:-t-:l 'f--'j...-=-- a 4 (;: -r I @U-) f g(o)= eo- O:l.T O'-.:l-\(C? Cj(\)= e l - (+ 3-:L!:: e :;:l.llg3)o 3 3 8(")==- e'f:._ 1-'l.+3'1'.-::L IS CCJ'\I1\1-lnUO\.A..s s 'f\lr'\c:'\'\ov\ GI"I CO I 11 1.1,:\--e.J:ct\QA ({k", &(7')--0. o.$ 0+ \t._q\\ Lo.\v. J <;;:(J\v'\ O-Y) Co J II lmc:tc\ \JO\v-e. "'" 11 I' \ {; di. 0(\ E2 \,,\ Co-; 6] X.f :s 0. -\fo<\ t V),,\cWS u V\ IW\ r\u, '0r d-cy-) E.o.- C-,.,o I, o,31.- '.,. I,,' \ \ 0.2.. 4 t-6.o> r.::.(60 y""....6 t 4 i...::l.. (\ g) O.<11Q4-0.333 2>3>" t"' -I!a - flmoi/i i\r 1'", f\r. R("f:r).- r 0 1 o. 0.043\.- -l.. 0 \). c,..2.'51 {\ o,oc(..l.. <f}:073y. Oct. 27, 2014.2 6 (l,.j.'s'?21 I/O.ir7 6,0002 /6.11>4b Chibum Lee (t; -
4. To solve f(x) = 7f + cos - x, it is converted into the fixed-point form x = 7f + cos. (30pt) (a) Prove it has a unique solution on 0 < x < 27f. (b) Perform 4 steps of fixed point iteration with Xo each steps. =. Plot the graph and denote the points of (0) 8()-="IT+jC acf-'j' _, :::. 'S\\A =) S C\t f\jit{ga of \ tbr Oq<:.J.-1) 4 (,8C1"}<" "Q ftej-pav\1- t\ sd\. (b) y:i8f)..::3..4cts-) y;.=-(\) -::: 2..c:Jt;37 3- (\.1 &() =- 3./ - 4. f)4 8()-=- 3.1361 5,,,... \.::. --r;.l.. 1\ I\..s0 (0)) C28: 15. «j>vf<n'f1 'f \t\ttlt\ -fcuj'\\tl 7\717 -\ <. (7')< o ()),gl vd..'?;i4-?l'b..", ; ""-. <-. Oct. 27, 2014 3 Chibum Lee
;" \ ;,. '. r _,. "".. 5. Find the root of f(x) = -x 3 - cosx. (60pt) (a) Write the iteration formula of Newton-Raphson method (Xi+1 =...) (b) perform 3 steps to find the estimate with Xo = -1. If it can be solved find the approximated relative error Ea. Otherwise, explain why it cannot be solved. (c) repeat (b) with Xo = 0 (b) 3." '0 -tsr -------- 3."tL._$\ V'\'f /0 l(a 0k 0-.,.,.,.).. ( -().3>. /3>. C;-13 1- I: S',- O.86) t 6'cr 22- ( )' 2> - O.8 S- O.0).43,/, s I '" " '..,- Oct. 27, 2014 ----------- Chibum Lee
6. Answer the questions about the following systems. (90pt) (a) Express the system in the form ofax = b. Use Gaussian elimination with backward substitution to solve x. (Do not use pivoting.) 4XI - X2 + X3 = 9 2XI + 5X2 + 2X3 = 7 Xl + 2X2 + 4X3 = - 3 (b) Factor the above matrix A into the LU decomposition such that A = LU where each diagonal element of L is 1. (Hint: use Gaussian elimination procedure above.) (c) Use the Gauss-Seidel iterative technique to find approximate solutions after 3 steps of iteration Ilx(3) - x(2) 1100 starting with Xo = [0 a alto Find the approximated relative error Ea = -"--..,.,.---;=-c:-----"-- IIx(3) 1100 where oo-norm is defined by Ilxlloo := max (IXII,, Ixnl). (<>.) 4'01-(\.J.-+'J<3=9 --\D.it,-\- S + 'ij.=:j.-@ ( +-L +4t:i=-j. -: C\ {s\: CoL\VI o 41\, - 'i.l.-tf\:=:9. 1-.). 1 3:=-- -Gf I''s'..2-\ I 4-- }"*'4"!<l:"; - 4 -Q) ----------------0D) r o.t ca\u\i\w\ c\pe<:l'" (i) = 0.1\ 4 --'<if' (\ - o!.\ Cl}@/,(;\\, \ "f.::::, [; F. -,). Oct. 27, 2014 5
\:: 9::L ::: 1 u" - 4.i,3,.\ =- (\3 \ ::: L 0\\ 4- f::c};:l x: 9;4 3 "/..::1 \ 0 0 j L.; \ 0-4- :::L \ -3 \ / \ tv\ \).'w\r\c 0 a [ 4 \ L:: o. 0 U:: 0 s \' O,.:lS' o.c:1\ o \ r 0 \ (.t t.--.2... 6..--..2..2.- - (C) Gc>-S.- S:-e'\JdJ \(\.tnl. -I,-\ j =-10 9 +f\ - 01. (\, =- t "f. 4-0 1\ I. 0!l 0 '1.- :y,\ --"J-0) l- -r< 4 5 9 ::2.2.)'.j) j ::: '0-1, -2>.-- i -= OS":' (10) 4- -/ 3., I6'1-.:2- :a...s- - 'r6' 0'r s-) /11-16)6 - (r/2cy -.- L\49 6q t;/:kj ;< ) j4-1 - 1.)3 0.91'8) /<.= - o.q1()4 160 /2300 - -.)..t 3 3 (.).$'0 -- l Cjf)oo.- i. 1719, I or (F) 3D
== o. D6 :J
7. The right MATLAB code implements the Gauss elimination algorithm. Complete the box with an appropriate expression. (Hint: Check the previous problem. Use the MAT- LAB expression!) (t) function x = Gauss(A,b) % Gauss: Gauss el imination % x = Gauss(A,b): Gauss el imination without pivoting. Im.nl = size(a); if m-=n, error('matrix A must be square'); end nb = n+l. Aug = [A bl ; for k = 1 :n-1 % forward el imination for i = k+1 :n facto r = p, -------.." ; Aug(i,k:nb) = Aug(i,k:nb)-factor*Aug(k,k:nb); end,., "....,.--. end x = zeros(n, 1); x(n) = Aug(n,nb)!Aug(n,n); % back substitution for i = n-1 :-1:1 xci) = (Aug(i,nb)-Aug(i, i+1 :n)*x(i+l :n»!aug(i, i); end 'I,. : d-o Oct. 27, 2014 6 Chibum Lee