Question 2 Consider the following nonlinear equation: f (x) = x3 — x2 — 10 cos(x) = 0. (a) Let x0 = 100 and x1 = 50. Calculate x3 using the following Secant scheme:Xn Xn-1 Xn+1 = Xn f (x.) f(xn) — f (xn_i)'n= 1, 2, .(4 marks)(b) Write a complete Fortran program that: (i) finds a solution using the iteration scheme given in (a) with xo = 100 and xi = 50; (ii) stops when Ix, — xn-ii(6 marks) (c) Run your program and show the numerical solution to the considered nonlinear equation. (2 marks)Question 3 Consider the following linear system of equations:{xi + 2x2 + 3x3 = 14 2x1 + 5x2 + 2x3 = 18 3x1 + x2 + 5x3 = 20Use LU (Doolittle) factorisation method to solve the above system.Question 4 Suppose we are given the following values of a function:sill 0.32 sin 0.34 sin 0.360.314567 0.333487 0.352274(a) Construct a Lagrange polynomial of degree one to approximate sin 0.3367, and show the approximation error. (6 marks) (b) Construct a Lagrange polynomial of degree two to approximate sin 0.3367, and show the approximation error. (6 marks)
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here