Question: Please include MATLAB code in the answer 3. Construct an algorithm called simpsons7 that takes three inputs; the integrand, the lower bound of the integration
3. Construct an algorithm called simpsons7 that takes three inputs; the integrand, the lower bound of the integration and the upper bound of the integration. The function should compute and output three different approximations using seven segments to the integral for the given conditions. You may call simpson13 and simpson38 as sub-functions. Compute the integral below using: -x+8x-0.25x d (a) A single application of the trapezoidal rule (b) A composite application of the trap with n-7 (c) A single application of the simpson's 1/3 rule (d) A single application of the simpson's 3/8 method, and (e) Three approximations using the composite simpson's n-7 algorithms you created. ( Compare each numerical estimate to the analytical solution (calculate by hand) using true percent relative error. Display results in table with column header
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
