Question: Number 3 and 4 please in MATLAB code thank you Manually (i.e., with pencil and paper) evaluate the following integral with the trapezoid rule using
Number 3 and 4 please in MATLAB code thank you
Manually (i.e., with pencil and paper) evaluate the following integral with the trapezoid rule using two panels are I = integral^2_0 xe^-x dx Repeat Problem 1 using Simpson's rule instead of the trapezoid rule. The erf (t) function in MATLAB is defined as follows: er f(t) = 2/Squareroot pi integral^t_0 e^-x^2 dx. The MATLAB command er f(t) returns the exact value of er f(t). Please use the trapezoid rule to evaluate the er f(1) function for the following sequence of increasing npanel (decreasing h): npanel = 50: 10: 100. Compare your results with the exact erf (1) value and list all absolute errors. Repeat Problem 3 using the simpson function instead of the trapezoid function, and compare the absolute errors to the ones you obtained from Problem 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
