essa-391-midterm

pdf

School

Concordia University *

*We aren’t endorsed by this school

Course

391

Subject

English

Date

Apr 3, 2024

Type

pdf

Pages

16

Uploaded by SuperCrocodileMaster1006

Report
Essa 391 midterm Numerical Methods in Engineering (Concordia University) Scan to open on Studocu Studocu is not sponsored or endorsed by any college or university Essa 391 midterm Numerical Methods in Engineering (Concordia University) Scan to open on Studocu Studocu is not sponsored or endorsed by any college or university Downloaded by NightShade Co (nghtshdeco@gmail.com) lOMoARcPSD|33438865
Home > My courses Started on State Completed on » ENGR-391-2201-CC Topic3 » Midterm Thursday, 23 July 2020, 6:34 PM Finished Thursday, 23 July 2020, 8:44 PM Time taken 2 hours 10 mins Marks 17.84/22.00 Grade 17.83 out of 22.00 (81%) Feedback Well done. However, make sure to understand well where you did mistakes and review the corresponding lecture topics. Try to catch up quickly as the rest of the semester builds progressively on the material covered so far. Question 1 By checking the "yes" answer below | confirm Complete 1. that | have neither given nor received unauthorized aid to answer the questions of this Not graded assignment. 2. | agree to follow the rules in regard of online assignments as they are posted in the announcement forum of this class and sent to me by email via moodle Select one: a. Yes | agree b. No | do not agree Your answer is correct. The correct answer is: Yes | agree Question 2 The function f(a) = sin(2*) x has a root r = 0. Correct The root r = Ois Mark 1.00 out of 1.00 Select one: a. Of multiplicity infinity b. Of multiplicity 3 c. Of multiplicity 2 d. Of multiplicity 1 / Your answer is correct. r = Ois indeed a root of f(a) as f(0) = 0. We have f' (x) = 3z? cos(x) 1 and f’(0) = —1. Consequently r = 0 is a single root. The correct answer is: Of multiplicity 1 Downloaded by NightShade Co (nghtshdeco@gmail.com) lOMoARcPSD|33438865
Question 3 | A2|] eo = ||Alloo . Il2llo0 Correct Select one: Mark 0.50 out of 0.50 True False «/ This is false. In fact we have ||Az||,. < ||All.o - ||2lleo The correct answer is 'False’. Question 4 Consider the following system of linear equations Correct —7 4 -2 ry —34 Mark 1.00 out of 2 0 1 Z| =| 19 1.00 4 -3 2 3 17 Which one, among the following approximations, is the closet to the true solution r of the system. Use the infinity norm for your analysis. Select one: a. (7.3, 5.9, 8.5) b. (10.1, 3.9, 3.5) c. (8.1, 8.0, 2.5) d. (7.5, 8.5, 1.5) Your answer is correct. Start by solving the system. The solution is 8 Computing ||r 2,||,. for each approximation we can find which one is closest to r. The correct answer is: (8.1, 8.0, 2.5) Downloaded by NightShade Co (nghtshdeco@gmail.com) lOMoARcPSD|33438865
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Question 5 Incorrect Mark 0.00 out of 0.50 Question 6 Correct Mark 1.00 out of 1.00 We can solve numerically an equation f(z) = 0 as precisely as we want. We only need to carry out enough iterations with our root solving algorithm. Select one: True % False No, we cannot solve as precisely as we want an equation by simply increasing the number of iterations. We are limited by the round-off errors. For a given number of significant digits used in our calculations there is a smalest possible error we can achieve. No that is not the case. Round-off errors limit the maximal precision we can reach. Reference: Lecture on order of convergence in topic 2 "Solving nonlinear equations" The correct answer is 'False’. The error that arises when only the first few terms of a series expansion are considered for calculations is Select one: a. an absolute error b. a relative error c. a truncation error «/ d. a round-off error Your answer is correct. Reference: lecture on truncation errors of topic 1 The correct answer is: a truncation error Downloaded by NightShade Co (nghtshdeco@gmail.com) lOMoARcPSD|33438865
Question 7 Consider the approximation x, of a single root of the function f (x). Correct An approximation of the relative error of this approximation is Mark 1.00 out of 1,00 Select one: F (ee) a F'(w.) Lef (Ze) b. Fe) "(@,) f(z.) ° tof "(@e) Vv f(z.) d. te Your answer is correct. From the lecture on forward and backward errors of topic 2, we know that F(a.) r—2£,| 2 |= | el | f'(@) Consequently we have f(z.) Bef! (tc) Tf ~~ Le f(z.) The correct answer is: zef' (to) Downloaded by NightShade Co (nghtshdeco@gmail.com) lOMoARcPSD|33438865
Question 8 Correct Mark 1.00 out of 1.00 Question 9 Correct Mark 0.50 out of 0.50 Using an algorithm, an approximation of a root of the function f(x) = 2” 8a + 15 is found to be tp =4 What is the absolute error magnification factor ? Select one: a. 1.0% b. 0.053 c. 1.00 d. 14.50 e. 1.00 Your answer is correct. f(z) has two roots in r = 3 and r = 5. The algorithm tries to estimate the root r = 3. The error magnification factor is forwarderror _ |z,—7| backward error ~ |f(zx,)| Reference: lecture on forward and backward errors of topic 2 "Nonlinear equations" The correct answer is: 1.0 PA=LU decomposition does not contain any mathematical approximations. If applied correctly to solve a system of linear equations the output of the algorithm is the exact solution of the system of equations (does not contain any error). Select one: True False «/ Even there is no truncation error, there will still be round-off errors. Consequently the algorithm does not find the exact solution (even if it may be fairly close in case the condition number of A is small). The correct answer is 'False'. Downloaded by NightShade Co (nghtshdeco@gmail.com) lOMoARcPSD|33438865
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Question 10 Correct Mark 1.00 out of 1.00 Question 11 Correct Mark 1.00 out of 1.00 A multiple roots solving problem Select one: a. results usually in large error magnification factors «/ b. is a problem with more than one distinct root c. occurs when an algorithm cannot decide to which solution it should converge d. is particularly well suited for numerical algorithms Your answer is correct. Reference: lecture on challenging problems in topic 2 The correct answer is: results usually in large error magnification factors Consider the following matrix A 2 —-5 4 -1 26 2 5 -3 9 Select possible error magnification factors when solving a system Aa = b. Use the oo-norm for your analysis. Select one or more: a. 45.7809 b. 2.909 «/ c. 890.809 d. 21.5323 e. 592.890 Your answer is correct. The largest possible error magnification factor when solving numerically a system \Ax=b\) is given by the conditioning number of the matrix A. In our case cond(A) ~ 18. The correct answer is: 2.909 Downloaded by NightShade Co (nghtshdeco@gmail.com) lOMoARcPSD|33438865
Question 12 Correct Mark 1.00 out of 1.00 Question 13 Correct Mark 0.50 out of 0.50 Question 14 Incorrect Mark 0.00 out of 1.00 Among the following functions, for which of them bracketing methods can not be used? Select one or more: a. wn =1-¢é . f(x) = (5a 3) ¥ f(a) =2- Fav . f(z) = sin(z”) Your answer is correct. Reference: first lecture on bracketing methods of topic 2 The correct answers are: f(z) = x = f(x) = (5a 3)? Consider two approximations z,, and 2,2 of the same root of a function f(z). The approximations are such that |f(a-1)| < |f(2,2)|. This means that necessarily x, is a better approximation of the root than 2,5. Select one: True False «/ Indeed: the opposite can very well be the case depending of the function f(x) Reference: lecture on backward and forward errors The correct answer is ‘False’. Let T’ be the matrix which represents the row operations which adds 3 times row 1 to row 2 (i.e. To + Ry + 3R}). What does the matrix T’? represent as row operations? Select one: ato + 2R,+9R, X bro + Ro +9R, cr, + Ro +6R, d.ro «+ 2R,. + 6R, Your answer is incorrect. T? will apply twice the row operations "add 3 times row 1 to row 2". This results in the operations "adds 2x3=6 times row 1 to row 2" Reference : lecture on LU decomposition in topic 3 The correct answer is: rg <- Ro + 6R, Downloaded by NightShade Co (nghtshdeco@gmail.com) lOMoARcPSD|33438865
Question 15 Correct Mark 1.00 out of 1.00 Question 16 Correct Mark 1.00 out of 1.00 6 You have to solve a system of equations Ax=b. An answer with a relative error smaller than 10 is required. You use the PA=LU decomposition algorithm. Knowing that cond(A) ~ 105, how many significant digits at least you need to carry forward in your calculations? Select one: a. 16 b. 11 «/ c.5 d.6 e. Doesn't matter, as PA=LU is an exact algorithm (no approximations). As long we use all digits from the system we solve we always get an exact answer. Your answer is correct. As cond(A) ~ 105, it implies that we will lose about 5 digits when solving the system due to round-off errors. To reach the set precision at least 5+6=11 digits have to be carried forward in calculations. Reference: Lecture on applications of the matrix condition number of topic 3 The correct answer is: 11 If a matrix A has no LU decomposition we can conclude the following about this matrix A Select one: a. not possible because any matrix can be decomposed into LU b. the matrix A has no inverse (A7t does not exist) c. none of them «/ d. a system of equation Ax = b would have no solution Your answer is correct. In fact the only conclusion we can make about <A is that the naive Gauss elimination algorithm will fail. But even if this algorithm will fail, it doesn't imply that a system Az = 6 has no solution. It can very well have a solution and still the algorithm will fail. The correct answer is: none of them Downloaded by NightShade Co (nghtshdeco@gmail.com) lOMoARcPSD|33438865
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Question 17 Correct Mark 1.00 out of 1.00 Question 18 Incorrect Mark 0.00 out of 1.00 An open method to estimate the root of a function produced the following sequence of approximations Ly =-3.4 @ =-3.2 ® —-3.14 £3 =-3.122 Based on these calculations, estimate the absolute error of 23 the best way you can. Give your answer with one significant digit. Answer: | .02 "4 The best estimation we can give, considering the available information, is |r a3| x |a3 2o| = 0.018 The question asked to estimate the error to one significant digit which in this case is 0.02 Note: we are forced to use this method because we don't have more information. If we would have the equation then we could use the correct and accurate way to estimate the errors. The correct answer is: 0.02 Consider the following fixed-point iteration method: A Tis1 = g(a) = wa; + (1—w)= with w a number between 0 and 1 and A any positive real number. Assuming the method will converge, to what will the algorithm converge? Select one: a. A3 b. A? c. AX d. Square root of A e. Cubic root of A Your answer is incorrect. By simple algebra one verifies that g(x) = z is the same as = A The correct answer is: Cubic root of A Downloaded by NightShade Co (nghtshdeco@gmail.com) lOMoARcPSD|33438865
Question 19 How should we choose the value of w such that the algorithm will converge as fast as possible? Incorrect Give your answer with 5 significant figures at least Mark 0.00 out of 1.00 Answer: | 13.5001687 x The fixed-point method is of first order convergence with the asymptotic error constant A = |g’(r)|. To obtain an as fast convergence as possible we need to get A as small as possible 2A 23" As r = A1/3 we obtain g!(r) = 3w 2. In our case g'(z) = w—(l—w Consequently A = |g’(r)| is minimal for w = 2/3. The correct answer is: 0.66666 Question 20 Find an approximation of a root with a relative error below 10° of the following equation Correct 2.124 + 8.623 + 5.92? + 8.62 +3.8=0 Mark 1.00 out of Use one of the methods you learned in the course 1.00 Answer: | -0.503851 "4 The correct answer is: -0.503851 Downloaded by NightShade Co (nghtshdeco@gmail.com) lOMoARcPSD|33438865
Question 21 Correct Mark 1.00 out of 1.00 Question 22 Correct Mark 0.33 out of 0.33 Using the bisection method, find the number 2, with an absolute error less than 10° that makes the determinant of the matrix ze 1 2 3 _14 2 5 6 17 8 « 9 10 11 12 2 equal to 10000. You can use the octave command det to compute the determinant Answer: | 14.051 4 The equation to solve is f(z) = det(A(z)) 10000 = 0 In octave this function can be defined as f=@(x) det([k 123;4x56; 78x 9; 10 11 12 x])-10000 Plotting f' (x) or trial and error shows that the root of f is between [14, 15]. With this initial interval at least 9 iterations are required for the bisection algorithm to reach the asked precision. To be save let us conduct 10 iterations which leads to #1) = 14.05029296875. The searched number zx can be approximated to 14.050 + 0.001 The correct answer is: 14.0505 Consider the following system 3-2 4\ (sz 30 A=| 27 -19 41| | y | =[ 303 12 -15 58/ \z 400 Solve this system using LU decomposition where L has the form 1 0 O L = la 1 0 Ig Igg 1 The component d, of the vector d obtained by solving Ld = 6 is equal to Answer: | 30 Vv The correct answer is: 30 Downloaded by NightShade Co (nghtshdeco@gmail.com) lOMoARcPSD|33438865
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Question 23 Correct Mark 0.33 out of 0.33 Question 24 Correct Mark 0.34 out of 0.34 Question 25 Correct Mark 0.33 out of 0.33 Question 26 Correct Mark 0.33 out of 0.33 The component d, of the vector d obtained by solving Ld = 6 is equal to Answer: | 33 iv The correct answer is: 33 The component dg of the vector d obtained by solving Ld = 6 is equal to Answer: | 49 Vv The correct answer is: 49 The component 7; of the vector x obtained by solving Az = 6 is equal to Answer: | 2 "4 The correct answer is: 2 The component x2 of the vector @ obtained by solving Az = 6 is equal to Answer: | 2 / The correct answer is: 2 Downloaded by NightShade Co (nghtshdeco@gmail.com) lOMoARcPSD|33438865
Question 27 The component 23 of the vector z obtained by solving Az = 6 is equal to Correct Mark 0.34 out of Answer: | 7 iv 0.34 The correct answer is: 7 Downloaded by NightShade Co (nghtshdeco@gmail.com) lOMoARcPSD|33438865
Question 28 Partially correct Mark 1.33 out of 2.00 Global temperature changes You can download here (excel file) the average world global temperature since 1880 (data from NASA's Goddard Institute for Space Studies). Fit the data set using the model T =a, + ayt + agt? + agt? where T’ is the average global world temperature in degree Celsius and ¢ is the numbers of years since 1880 (e.g. for 2020 that would be t = 2020 1880 = 140). Use 16 digits in your calculations and give the answers with at least 5 significant digits A, =| 13.760305 Vv a, =| .00039086888 x ay =| .0000064864117 Vv a3 =| .00000039811744 Vv The root mean square error RMSE is| 0.131513255 x According this model, how much will be the average world temperature in 2040? (Give your answer with at least three significant figures) Average world temperature in 2040 | 15.62 / This model can be fitted with the normal equations methodology the usual way. Assuming the column vectors x and y contain the data set (temperature for y and numbers of years since 1880 for x), the following lines of octave/Matlab code solves the problem: Coefficient matrix of inconsistent equations: A=[x.A0 x x.42 x.43]; Model parameters as solution of the normal equations: a=A"A\A"y; Residuals: r=(A*a)-y; RMSE: RMSE=norm(r,2)/sqrt(length(x)); Temperature in 2040: t=2040-1880; T2040=[1 t th2 t43]*a; Figure with the data points and fitted model: Downloaded by NightShade Co (nghtshdeco@gmail.com) lOMoARcPSD|33438865
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
15.5 15 / 14.5 5; 14 | 13.5 5 13 40 60 80 100 120 140 Downloaded by NightShade Co (nghtshdeco@gmail.com) lOMoARcPSD|33438865