1. Compute first derivatives of the functions y = f(x) using forward-difference, backward-difference, 3 and 5 point form
Posted: Fri Jul 01, 2022 6:51 am
1. Compute first derivatives of the functions y = f(x) using forward-difference, backward-difference, 3 and 5 point formulas. Compare the numerical results to the exact (analytical) derivative. Which formula gives more accurate result? f(x) = x² e-x², at x = 1.5 using h = 0.1 2. a) Compute the integral ff(x) dx using 5 point composite rectangle, trapezoid and Simpson rules for the following function: f(x) = x cos(x), a = 0, b = π/2 b) Estimate error using a posteriori error estimation formulas. c) Compute the analytical value of the integral and compare it with the ones given by numerical methods. Which rule gives more accurate result? 3. Obtain numerical solution of an ordinary differential equation with initial condition A = y' (t) = t cos using Euler method. Perform 3 steps using At = 0.1 4. Solve (using pen and paper) a system of linear algebraic equations AX = B using Gauss elimination method, where 1 y(0) = 2 -1 1 -1 2 -1 2 -1 3 4 ; B 10 -16 -4