You are on page 1of 17
wid’ fee [D] consider the following: | x 100% | The precision of your caleulations must be THREE, digits after the decimal point. [Da] Find w root of the following function using the secant method with initial guesses of x, =83.and ty = 90. Stop the iterations when ¢, < 0.01%. I(z) = In(x) = sin(x/2)—4 [D2] Using the method of fized-point iteration, (i) list ONE form for g(2) for the following function, (ii) check its convergence when x5 = 1.7, and (iii) find a root starting from 5. Stop the iterations when €, < 0.01%. fz)= “Me — cos“'(2/6) + 1 wa (DI Consider the following: 4) x WO% he precision of your calculations must be THREE digits after the decimal point. [D1] Using the method of fired-point iteration, (i) list ONE formu for gz) for the following, and (iii) find u root starting from x). function, (ii) check its convergence when 2 Stop the iterations when €, ¢ 0.4%. fix) = Vr —sin(0.1r) — 14 [D2] Use Newton Raphson method to find a root of the function starting frow the initial guess of 4 = 7. Stop the iterations when ¢, < 3%. | Yoretie fa f(a) = cos(7z) + sin) ~ “EQG) [D3] Solve the following system using the Gauss Elimination Method. dx —2y +32 =—11 2e—by—42 =6 ty __ wir 3 ao [Q1] From the following table, use the third order Lagrange formula to write the corresponding, form of the function f,(x) around z = 7.4. Find the value of f,(7.4). z 5 7 8 9 y | 1221 3375 «50497201 [Q2] Use the least-squares regression to fit the data listed in the following table to yoy = ae, ute the standard error of the estimate. (iii) Calculate yp,(1-75) OG 09 12 19 y | Ol 06 1S 26 5 : 1 [C] Using the false-position method to find the root of the following function between : al = Parl 5 1% (i) Determine a and 2. (ii) Comp [36,52]. Stop the iteration when [é fla) = Sx cos G ENGINEERING NUMERICAL METHODS Dr. Mohammed AlMahamdy mohammed.almahamdy@uoanhar.edu.iq University of Anbar | Dept. of Electrical Engineering 2022-2023 Homework 1 Due date: 30 October 2022 Work all your computations at an accuracy of 3 digits after the decimal point. Calculate the error as: x 100% Question 1 Find a root for the following equation using the secané method. Start from z_) = —2 and ap = —1.5. Stop the iterations when Eq < 0.1%. f(x) = cos(x) + (0.5)? — 1.1 Question 2 Using the method of fixed-point iteration, (i) list ONE form for g(x) for the following function, (ii) check its convergence when 2o = 3, and (iii) find a root starting from xo. Stop the iterations when &q < 0.009%. f(z) =e — cos G) +1 Page 1 of 1 ENGINEERING NUMERICAL METHODS Dr. Mohammed AlMahamdy mohammed.almahamdy @uoanbar.edu.iq University of Anbar | Deptartment of Electrical Engineering 2022-2023 Homework 2 Due date: 4 December 2022 Question 1 For the following table, 1 25 41 52 7 9 11 12 9.7 121 133 143 14 147 142 146 e Use the least square regression to determine the equation of the Saturation-growth-rate method. e Compute the standard error of this estimate. e Use a computer program, for example Excel, to plot the given points and the calculated equation. e Using the fit equation, what is the estimated value of y at x = 3? Page 1 of 1 ENGINEERING NUMERICAL METHODS Dr. Mohammed AlMahamdy mohammed .almahamdy@uoanbar .edu.iq University of Anbar | Deptartment of Electrical Engineering 2022-2023 Homework 3 Due Date: 11 December 2022 For the data given in the table below, e Determine the Lagrange interpolating polynomial of the third order around « = 4. e Use this polynomial to evaluate the value of y when x = 4. e Use a computer software to plot the points in the given table and the interpolating polynomial. c|-2 -1 1 3 5 6 7 8 y|—64 —20 -14 —4 70 320 2806 4760 ENGINEERING NUMERICAL METHODS Dr. Mohammed AlMahamdy mohammed .almahamdy@uoanbar .edu. iq University of Anbar | Deptartment of Electrical Engineering 2022-2023 Homework 4 Submit before: 27 December 2022 Question 1 For the data listed in the table below, use the central difference approximation of the error order O(h?) to find: (i) y’ at 2 =0, (ii) y” at 2 = 0.2. 0 01 0.2 03 04 0.5 2 15 28 47 Question 2 Evaluate the following integral numerically using n = 8, through: 1. The rectangular rule 2. The trapezoidal rule 3. The Simpson's 1/3 rule 31 19sin sin 15 Solutions [Q1] Using the method of fixed-point iteration, (i) list ONE form for g(x) for the following function, (ii) check its convergence when 29, and (iii) find a root starting from 9. Stop the iterations when 2, <¢,. Sle) — ve—sin(ar)—b Answers: g(x) g'(z) = sin(ar) +b)? 1a(sin(aa) + b) cos(az) |g’(@o)| <1 [Al] wp =2,a=0.1, b= 15, €, = 2%. g(x) = 0.2(sin(az) +b) cos(az) |g! (ao)| = 0.333 0 1 2.885 = 44.25 2 3.184 = 10.364 3 3.287 = 3.2349 4 3.323 1.0952 The root is 3.323. [B1] wp =4, a=0.2, b= 1.7, €, = 1%. g'(x) = 0.A(sin(ax) +b) cos(ax) Ig! (ao)| = 0.6737 i 2, &, o 4 1 5844 46.1 2 6.866 17.488 3 7.185 4.6461 4 7.242 0.7933 The root is 7.242. [C1] 2 =7,a=0.2, b= 16, 2, = 0.1%. g'(x) =0.4(sin(az) + 5) cos(ar) |g! (ao)| = 0.1758 i x, gE 0 7 1 6.685 45 2 6.619 0.9873 3 6.603 0.2417 4 6.599 — 0,0606 The root is 6,599. (Di) x) = 2.5,a 01,0 =14, 2, = 04%. 9'(x) = 0.2(sin(az) + b) cos(ar) |g’ (ao)| = 0.3192 i x, gE, 0 25 1 2.714 8.56 2 2.782 2.5055 3 2.804 0.7908 4 2.811 0.2496 The root is 2.811. [Q2] Use Newton Raphson method to find 0 root of the function starting from the initial guess of x9. Stop the iterations when ¢, < ¢,. f(z) = cos(az) + sin(be) Answers: S’(@) = —asin(ax) + beos(bx) [A2] 29 =5,0=3,b=7,¢, =3%. [B2] xy =3, a= 3, b=5, ©, = 3%. i x, £, i a E, 0 5 0 3 4.856 2.97 1 2048 76 The root is 4.856. The root is 2.948. [C2] x =2,0=7,b=5,€, =3%. [D2] 29 =7, a= 7, b=3, €, = 3%. i x, a t x, E, 0 2 0 7 L 1963 1.88 1 6774 3.34 2 6758 0.24 The root is 1.963. The root is 6.758. [Q3] Solve the following system using the Gauss E de —2y +32 = 2x —6y—4z x +4y—32 = 16 4 2 & 2 6 4 6 — |<-—-- Row2-(2)/(4)*Rowt 1 4 3 16 |<-—-- Row3-(1)/(4)*Row1 2 -11 & 0 S 11.5 4s 18.75 |<--—-- Row3-(4,5)/(-5)*Row2 s 2 3 -i1 £ 0 5 5.5 11.5 0 0 87 29.1 z= ” (esay-3.245)/-5) é = 0449 = [(-ai)-( ose 38)-(3)*(-3.345)1/(4) University of Anbar | Department of Blectrical Engineering, Engineering Numerical Methods (2022-2023) Dr, Mohammed Ali AIMahamdy [B} 25,42] : z a i] x 2, zy fi, ty lea! Quiz 1 (23 October 2022) if 25 [anes | a2 | 125.931 98.863 | 0 2] 25 | 20.876 | 34524 | 125.931 120.034 | 15.558 . ; 3 | 29.876 | 31.374 | 3a.s24| sz.008 | 2.604 | 120.031 4.76 Using the false-position method to find the root of the al suart(oiaaeleucell vou | coay |cionas| mais following function between [a,0]. Stop the iteration when The root is 31.442 [C] (36,52) Solution: ite l«tla lh ae i{ 36 [42.521 | 52 [-163.008 | 74.054 | 230.936 [0 foley oe 2[aaai [44799 | 52 | -74.954 | 46.417 | 236.936 | 5.085) ferke 3 | 42.521 | 43.928 | 44.799 | -74.954 | -1.981 | 46.417 [1.983 4 [43.928 | 43.964 [44.709 [1.981 | -0.006 [46.417 [0.082 The root. is 43.964 [A] (10.25) a _ [D] 8,65) i[ a | ty | fi fu_| eal 1| 1 isse1| 25 | 39.057 125.931 | 0 ‘Ts Te Te Tan Te ii 2{ 13.591 17437| 25 | -64.713 | -29.152 | 125.931 | 22.286 a] 48 [55.194 fe fans 92.6R6 |-277.414|_0 3|iz4s7_18.8599| 25 | -29.152 | 1.223 | 125.931 | 7.54 2 | 65.194 | 57.65 92.686 4.26 4 [17437 18.802 | 18.859 ]-20.152 | -o.118 | 1.223 | 0.303 3 [55.194 [56.533 | 57.65 [ 92.086 | 2.107 | -77.308 | 1.976 4 | 56.533 | 56.563 | 57.65 | 2.107 | -0.013 | -77.366 [0.053 ‘The root fs 18.802 ‘The root is 56.563 ENGINEERING NUMERICAL METHODS Dr. Mohammed AlMahamdy mohammed.almahamdy €moanbar.edu.iq, 2020-2021 Homework 1 Submit before: 2 May 2021 Question 1 Find the root for the following equation that lies within the period (—0.5, 2] using the bisection method. Work your computations at an accuracy of 3 digits after the decimal point. Stop the iterations when [£,| < 0.002%. fla) =2— em) ENGINEERING NUMERICAL METHODS Dr. Mohammed AlMahamdy mohammed. alnahamdy@uoanbar.edu.iq University of Anbar | Dept. of Electrical Engineering 2020-2021 Homework 2 Submit before: 9 May 2021 Work all your computations at an accuracy of 3 digits after the decimal point. Stop the iterations when ¢4 < ¢., where: x 100% Question 1 Find the root for the following equation that lies within the period {-1,0] using the Regula Falsi method. Us cost) fe) = 8S Question 2 Find a root for the following equation using the secant method. Start from #2; = -2 and xy = -1.5, and use ¢, = 0.1%. S(2) = cos(x) + (0.5)F = 1.4 Homework 3 Submit before: 16 May 2021 Work all your computations at an accuracy of 3 digits after the decimal point. Stop the iterations when ¢, < 0.1%, where: mate x 100% Question 1 Using the method of fired-point iteration, list two forms for g(x) for the following function f(x) and check their divergence when Xo = 2.43. Select one of these forms to find a root starting from zo. f(x) = 4e¥* + 162° — 40 Question 2 Use the Newton-Raphson method to find a root of the following function. Start from the initial guess of 9 = 7. f(x) =27? —cos Vx — 0.5 Homework 4 Submit before: 6 June 2021 Work all your computations at an accuracy of 3 digits after the decimal point. Question 1 Solve the following system using the Gauss elimination method. 4w + 34+ 4y—2z2=4 2w — 4x + 5y+3z=1 3w + 52 —2y —4z =3 w—3at+3y+5z2=5 Question 2 Find the inverse of the following matrix using the Gauss-Jordan elimination method. 8 -7 6 A=|-3 2 -l -9 5 4 Homework 5 Submit before: 27 June 2021 Question 1 For the following table, a{l 2 41 6 7 9 UU 2 y|97 121 131 143 14 147 142° 146 e Use the least square regression to determine the equation of the Saturation-growth-rate method. e Compute the standard error of this estimate. e Use a computer program, for example Excel, to plot the given points and the calculated equation. e Using the fit equation, what is the estimated value of y at = 2.5? Homework 6 Submit before: 4 July 2021 Question 1 Use a Lagrange interpolating polynomial of the third order to evaluate j3(4) on the basis of the data given in the following table: z|-3 -2 1 2 3 #5 7 8 y|—14 -20 -14 -4 70 320 2806 4760 Homework 7 Submit before: 11 July 2021 Question 1 For the experimental data listed in the table below, find: 1. y’ at x = 0 using the forward difference approximation of O(h) 2. y” at x = 0.2 using the backward difference approximation of O(h) 3. y” at x = 0.1 using the central difference approximation of O(h*) 0.2 0.3 0.4 0.5 7 15 28 47 Question 2 Evaluate the following integral numerically using n=8, through: 1. The rectangular rule 2. The trapezoidal rule 3. The Simpson’s 1/3 rule f- 18 sin(2z) de 1 5 a Quiz 1 23 May 2021 Work all your computations at an accuracy of 3 digits after the decimal point. Stop the iterations when ¢, < 0.1%, where: | x 100% ca=| Question 1 Find a root for the following equation using the secant method. Start from x_, = 2 and ap = 3. f(z) sin(x) + In(x) — 1 Question 2 Using the method of fixed-point iteration, determine a form for g(x) for the function f(a) and check its divergence when x» = 1.1. Use this form to find a root starting from zo. f(x) =e" — cos“! (a/4) +1 Midterm Exam 1 13 June 2021 Work all your computations at an accuracy of 3 digits after the decimal point. Question 1 [5 points] Find a root for f(x) using the secant method. Start from r_; = 10 and xq = 8. Stop the iterations when ¢, = |= | x 100% < 0.1%. _.) _ cos(7x) sin(z) + 0.7 f(z) = _ a Question 2 [10 points] Solve the following system using the LU Decomposition method. —82) + 3x2 — 623 + 274 = —5 52, + 622 + 2x3 — 44 = —8 —321 + 2x9 — 743 4+ 544 =4 4a, — 542 + 323 — 644 = 9 Question 3 [5 points] Define and compare: the truncation, and the round-off errors.

You might also like