# hw5_sol - 10.3 The matrix to be evaluated is 10 2 —1 —3...

This preview shows pages 1–12. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 10.3 The matrix to be evaluated is 10 2 —1 —3 —6 2 1 1 5 Multiply the ﬁrst row by J61 = —3.-"10 = —0.3 and subtract the result from the second row to eliminate the (131 term. Then= multiply the ﬁrst row by f31 = 1.-"10 = 0.1 and subtract the result from the third row to eliminate the 031 term. The result is 10 2 —1 O —5.4 1.7 0 0.3 5.1 Multiply the second 1'owbyf31 = 0.8.-"(—5.4) = 41.148148 and subtract the result from the third row to elimmate the :13; term. 10 2 —1 0 —5.4 1.? 0 0 5.351852 Therefore, the LU decomposition is 1 D 0 1'0 2 —1 [L]{L-']= —o.3 1 o 0 —5.4 1.? 0.1 —0.143143 1 0 0 5.351852 Multiplying [L] and [L1 yields the original matrix as veriﬁed by the following MATLAB session. >5 L = [1 C 0;-C.3 1 C;0.1 —C.1431ée 1]; b} T = [1: 2 -l;C -5.é 1.T;C 0 5.351852]; 5} A = Li? 13.0003 2.3000 -1.0330 —3.0003 —£.3000 2.0330 1.0003 1.3000 5.0330 10.8 (a) For the ﬁrst row (2' = 1). Eq. (10.15) is employed to compute 2211:2231 = 4'3: 2.323422 Then. Eq. (10.16) can be used to determine a 1 2212 = 1-“ =i= 2.021053 2211 2.323422 :2 15 2.213 =i=—=5.303301 2211 2.323422 For the second row (2' = 2). 2.222 = Jazz 423; = "'30—(22222033)2 = 5.422226 ﬂ —'M-:'H — _ _ “23: 13, 1_ 13 =50 20210336 3033013=22321W 2.223 5.422225 For the third row (2' = 3). '— 22}; = {2:33 4253 —u§3 =2.23::-—(5.:«*.I::33201)2 — (2.232122)2 25.153923 Thus= the Cholesky decomposition yields 2.323422r 2.021068 5.303301 [U] = 5.422226 2.282122 5.163928 The validity of this decomposition can be veriﬁed by substituting it and its transpose into Eq. (10.14) to see if their product yields the original matrix [:1]. This is left for an exercise. 1"?) .. A = 2'3' 15:20 3'] 50;:[5 5'3 EU]; 33'3" T: : C-hIZIl U = 2 923‘. 2.2711 5.3233 2 5.12722 2.2822 2 '2' 5.1Eér {c} The solution can be obtained by hand or by MATLAB. Using WEAR: 2} b = [53:257;1CD], 22 d=U'Eb d: 17.6777 22.3218 —E.ETSE 2 x=UKd x: -E T345 E 3328 —l T137 10.11 {3} Multiply ﬁrst row hyfgl = 3.58 = 13.3 7‘5 and subtract the result from the second row to give 3 2 1 '3 6.25 1.625 2 3 9 Multiply ﬁrst row hyfgl = 2:? = 0.25 and subtract the result from the third row to give 3 2 l 0 6.25 1.625 0 2.5 8.25 Multiply second row by ﬁg = 2. 5.-"6.25 = 0.4 and subtract the result ﬂow the third row to give 2 2 1 [U]: o 5.25 1.525 o o 2.1 As indicated; this is the Unlatrix. The L matrix is simply constructed ﬁ‘Oﬂl the fs as l D t] [L]: 0.325 1 o 0.25 0.4 1 Merely multiply [L][U] to yield the original matrix 1 0 0 8 2 l 8 E 1 0.375 1 0 0 6.25 1.525 = 3 T 2 0.25 0.4 1 0 0 8.1 2 3 9 (II) The determinant is equal to the product of the diagonal elements of [U]: D=B>< 5.25 KBJ 2405 {a} Solution with MATLAB: b} A=[E 2 l;3 7 2;2 3 5]; }} [L,U]=lu[\$} L: 1.0000 0 0 0.3T50 1.0000 0 0.2500 0.4000 1.0000 U: 8.0000 2.0000 1.0000 0 6.2500 l.E250 0 0 0.1000 i=- L‘U ans — E 2 l 3 T 2 2 3 9 > detEA} ans — 11.3 The following solution is generated with MA'TLAB. (a) }} A = [15 —3 —1;—3 18 —6;—é —1 12]; }} format long 22:2} AI = inv [31-] 3—11 = 2-0?253836012363 3.01278065633397 0.0124352331GDEC C.DZU?25333£C'04 3.0507544?3229T1 0.03212435233161 3.025336T35?5130 3.0033264248304? 0.03315544Cé1451 (b) a} b = [3830 12:: 235:]': }} format short 3533*- C = AI”: 323.20?3 227.2021 321.5026 II] {c} The impact of a load to reactor 3 on the concentration of reactor 1 is speciﬁed by the element all—31 = {311124352 Therefore, the increase in the mass input to reactor 3 needed to induce a 10 3 gym rise in the concentration of reactor 1 can be computed as 10 nag = — = EG4.165?§ 0.0124352 d (d) The decrease in the concentration of the third reactor will he ﬂog = UﬂZSS‘DﬁTﬂSUD) + 0.009326(250) = 12.9534 + 2.3316 =15.285i3 n1 11.6 The matrix can be 512319de divide each row by the element with the largest absolute value :3 A = [3f{-lﬂ} 2KE-1D} l;1 iii-3} 3ft-5};l —lf15 £315] 1'\ :1 -D.BUUD -U-EDDU 1.0000 l.FUUD -U.llll -D.3333 l.FUUE -U.DGGT 0.4000 MILAB can then be used to determine each of the norms, }} nermﬁA,'frD'} ans = 1.9320 3}} ncurm (A, 1] ans = 2.8000 }} nermﬁA,inf} ans D) 11.8 (:1) Spectral norm >F A = [1 4 9 16:4 3 16 25;9 16 35 36;16 25 36 49]; >ﬁ cendﬁA} ans — 3.8963e+ﬁlﬁ (l1) Row—sum neml >ﬁ cendﬁA,inf} Warning: Matrix is close to singular DI badly sealed. Results may be inaccurate. RSOND = 3.03T437e-013. [Type "warning eff MATLAB:nearlySingularMatrix“ to suppress this warning.} } In send at 45 ans — 3.2922e+DlB 11.14 The ﬁve simultaneous equations can be set up as 1.6x1ﬁ9p1 + Bxlﬂﬁpg + 4xlﬂ4p3 + seep4 +12»S = dials 3.9D525x1ﬂ9p1 + 1.5152310}; + 6.25x1ﬂ4 3+ 25Dp4 +11»S = sets 3. lxlﬁgpl + 23x10 p3 + 9x113 p3 + soopi +p5 = 13.516 lidxlﬂmpl + 6.4xlﬂivg + 16X1ﬂ4p3 + 4U‘Up4 +11:S = 0.525 6.25xlﬂmp1 + 1.25mi3 3 + 25x1o4p3+ Sﬂﬂp4+p5 = 13.45? misuse can then be used to solve for the coefficients }} format short g }? A=[200“é 200“3 200“2 200 1 250“é 250“3 250“2 250 1 300“é 300“3 300“2 300 1 400“é 400“3 400“2 400 1 500“é 500“3 500“2 500 1] 'u'. .1 1.Ee+CDS 33+DDE £0000 EU: 1 3.90635+CDB 1.56253+DDT 62500 253 1 B.1E+CDB 2.TE+DDT 50000 303 1 2.SEe+210 6.4e+DDT 1.Ee+005 403 1 E.25&+310 1.253+DDS £.5&+DOS 503 1 >} b=[D.TéE;D.ETS;D.ElE;D.525;D.457]; >5 format long g :‘Piir p = 1.333333333332o1e—ois —4.sssssssssssisse—oos 5.23sssseesssssie—ooe -O.3331?36666£666643 1.2ossssssssssss }} condtﬂ} 3.213 11?11858933é£3.4 Thus; because the condition number is so high the system seems to be ill—conditioned. This implies that this might not be a very reliable method for ﬁtting polynomials. Because this is generally true for higher—order polynomials, other approaches are commonly employed as still be described subsequently in Chap. 15. 12.1 (a) The ﬁrst iteration can be implemented as; _ 41+ 11.41—1 _ 41+ 114m) 1-1 = 51.25 0.8 0.8 ' ' '7 I? = 25 + 11.411 + o.413 = 25 + 11.4(5125) + 114(12): 5mg ' {13 0.8 1135 + 13.4 ' 1-3 = —3‘1 =W = 15915325 0.8 US Second iteration: _ 41+ 114155.525) 1-1 = 25.5525 on 25 + 11.4 29.5225 + {1.4 155.6225 1-, =# =151151325 - 1:15 1115 + 11415115325 1-3 =#=2oa2155 {18 The error estimates can be computed as T9.453?5 — 51.35 TSUSET5 15D.93T5— 55.8?5 Ed 1 = x 101394: = 152.32% " 1513.937’5 Ed 3 = EDS—1183 — 159.5375 X lam/ﬂ = 22-75% ' 2D6.T188 >< lﬂﬂtyu = 35.69% (1.1 g=| The remainder of the calculation proceeds until all the errors fall below the stopping criterion of 5%. The entire computation can be slmuuarized as iteration unknown 1value 5;, maximum :3 1 x1 51.25 133.33% x; 53.3?5 133.33% x3 153.33?5 133.33% 133.33% 2 x1 T3.33?5 35.33% x2 153.3325 l32.32% x3 233.7133 22.25% 32.32% 3 :0 123.?133 37.11% x2 132.3333 23.T3% x3 233.2344 13.21% 3?.11% 4 :0 153.2344 15.35% x2 221.4344 13.32% x3 241.3322 4.33% 15.35% 5 :0 131.3322 7.23% x2 233.2422 5.34% x3 2471.321 1 2.3T% T.23% 3 :0 13?.3211 3.53% x2 233.1211 2.43% x3 253.3135 1.12% 3.53% Thus= after 6 iterations, the maximum error is 3.5% and we arrive at the result: x1 = 132.3211. 3:; = 239.1311 and 1'3 = 253.3135. (II) The same computation can he developed with relaxation where /1- = 1.2. First iteration: _ 41+0.4i-1 _ 41+0.4(0} 4125 II 3.8 3.8 Relaxation yields: 1'] =1.2{51.25)— 32(3) = 31.5 _ 25 + 0.41-1 + 3.413 _ 25 + 04051.5) + 04(0) _ _ 0.3 _ 3.3 _ x1 62 Relaxation yields: x: =1.2(32]I — 32(3) = 24.4 _105 + 0.4x1 _105 +3.4(62) _168 45 I 3‘ as 3.3 Relaxation yields: 1'} =1.2(163.45) — 3.2(3) = 232.14 Second iteration: _ 41+ care-2) ca :51 = aa45 Relaxation yields: .1:1=1.2{88_45)— 0.2{515} = 93.34 _ 25 + 11493.34) + a.4{2a2.14) aa :53 =17’924 Relaxation yields: 71:3 =1.2{1T9.24)— 0204.4) 2 200.208 _1a5+ a.4{200.2aa) 0.3 x} = 231.354 Relaxation yields: .35; =1.2(231_354)— 0.2(202.14) = 2311963 The error estimates can be computed as: 93.84 — 61.5 a“ = xiaaaa =34.4a% ' 93.34 200.208 — T44 80.2 =‘ x100% = 62.84% 200.203 30 3 = 341.30% =14_73% ' 2311968 The remainder of the calculation proceeds until all the errors fall below the stopping criterion of 5%. The entire computation can be aununarized as iteration unknown value relaxation 511 maximum ea 1 x1 51.25 51.5 100.00% x: 52 T44 100.00% X3 153.45 202.14 100.00% 100.000% 2 M 33.45 93.34 34.45% x2 1T924 200.203 52.34% x3 231.354 23?.1953 14.?3% 52.339% 3 x1 151.354 152.3553 42.33% x: 231 .2?53 23?.49055 15.?0% )9; 24999523 25255493 5.03% 42.3?9% 4 X1 15999523 1?1.42293 5.00% x2 24323393 24433355 2.32% X3 253.44433 253.5222 0 42% 4.99?% Thus= relaxation Speeds up convergence. After 6 iterations. the maximum error is 4.992% and we arrive at the result: .11 = 121421.11 = 244.389 311E113 = 253.622. 12.? The equations to be solved are f1(x._}=) = —x2 + 1+ {1.5 — _1-' f: (x y) = x3 — .v — an The partial derivatives can be computed and evaluated at the initial guesses a i i=—2x+1=—2|:1.2)+1=—1.4 @=—1 5wa @fio -- =21-—51==2 1.2 —5 1.2 =—3.s —==—1—5.a.-=—1—51.2 =—:e' ax . ( 1 < 1 5y ( 1 They can then he used to compute the determinant of the Jacobian for the ﬁrst iteration is —1.4(—1‘)—(—l)(—3.6)= +5.2 The values of the functions can be evaluated at the initial guesses as f”. =—1.23 +1.2+o.5—1.2 = 4194 flu =12J — 5(1.2)(1.2) — 1.2 = —6.96 These values can be substituted into E}. {12.12) to give 43.94 —3.6 — —6.96 —1 .v1=1.2—#2126129 4.945 —1.4 — 43.94 —3.5 x; =1.2—#=on4194 The computation can be repeated until an acceptable accuracv is obtained. The results are sunnnarized as iteration x g 331 5:32 0 1 .2 1 .2 1.20120I [1.1T41‘34 4.850% 583889343 1 2 1.234243 [1.211613 2.131% 12.635311 3 1.233319 [1.212245 0.0?5% 0.205% 4 1.233318 [1.212245 0.000% 0.000% ...
View Full Document

## This note was uploaded on 09/05/2011 for the course EGM 3344 taught by Professor Raphaelhaftka during the Spring '09 term at University of Florida.

### Page1 / 12

hw5_sol - 10.3 The matrix to be evaluated is 10 2 —1 —3...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online