-sin( x1 ) richardson22( @Dc, @cos, x2, 0.1, 5, 1e-8 ) -sin( x2 ) richardson22( @D2c, @sin, x1, 0.1, 5, 1e-8 ) -sin( x1 ) richardson22( @D2c, @sin, x2, 0.1, 5, 1e-8 ) -sin( x2 ) richardson22( @D2c, @cos, x1, 0.1, 5, 1e-8 ) -cos( x1 ) richardson22( @D2c, @cos, x2, 0.1, 5, 1e-8 ) -cos( x2 ) Copy and paste your Matlab commands and the output here. 2.8b The Matlab function function [y] = f2a(x) y = x.^2.*exp(-x); end is the Matlab implementation of the function defined by . Use calculus to determine the values of the derivative at = 1, 2, 3, and 4 and demonstrate that your function produces x similar results using = 0.1, = 5 and = 10–5. Find the absolute and relative h Nmax abs errors of these approximations. Copy and paste your Matlab commands and the output here.
-sin( x1 ) richardson22( @Dc, @cos, x2, 0.1, 5, 1e-8 ) -sin( x2 ) richardson22( @D2c, @sin, x1, 0.1, 5, 1e-8 ) -sin( x1 ) richardson22( @D2c, @sin, x2, 0.1, 5, 1e-8 ) -sin( x2 ) richardson22( @D2c, @cos, x1, 0.1, 5, 1e-8 ) -cos( x1 ) richardson22( @D2c, @cos, x2, 0.1, 5, 1e-8 ) -cos( x2 ) Copy and paste your Matlab commands and the output here. 2.8b The Matlab function function [y] = f2a(x) y = x.^2.*exp(-x); end is the Matlab implementation of the function defined by . Use calculus to determine the values of the derivative at x = 1, 2, 3, and 4 and demonstrate that your function produces similar results using h = 0.1, Nmax = 5 and abs = 10–5. Find the absolute and relative errors of these approximations. Copy and paste your Matlab commands and the output here.
AdvCalc1.Lab.2.uwuserid.uwuserid.docx