(a) Use the composite trapezoidal method (b) Use the composite Simpson\'s 1/3 me
ID: 3109064 • Letter: #
Question
(a) Use the composite trapezoidal method
(b) Use the composite Simpson's 1/3 method
(c) Use the composite Simpson's 3/8 method
Solve the following problem by hand. When needed, use a calculator, or write a MATLAB script file to carry out the calculations. If using MATLAB, do not use built-in functions for integration. To estimate the surface area and volume of a wine barrel, the diameter of the barrel is measured at different points along the barrel. The surface area, S, and volume, can be determined by: and V rd Use the data given in the table to determine the volume and surface area of the barrel. z (in) -18 12 -6 0 6 12 18 L d (in) 28 30.2 31.5 32 31.5 30.2 28Explanation / Answer
r=d/2
clc;
clear all;
close all;
a=0;
b=18;
n=3;
h=(b-a)/n;
r=[32/2 31.5/2 30.2/2 28/2];
% % % trapezoidal rule
sur_area_tr=2*pi*h/2*(r(1)+r(3)+2*(r(2)+r(3)));
vol_tr=pi*h/2*(r(1)^2+r(3)^2+2*(r(2)^2+r(3)^2));
%%%Simpson 1/3 rule
sur_area_s13=2*pi*h/3*(r(1)+r(3)+4*r(2)+2*r(3));
vol_s13=pi*h/3*(r(1)^2+r(3)^2+4*r(2)^2+2*r(3)^2);
%%%Simpson 3/8th rule
sur_area_s38=2*pi*3/8*h*(r(1)+r(3)+3*r(2)+3*r(3));
vol_38=pi*h*3/8*(r(1)^2+r(3)^2+3*r(2)^2+3*r(3)^2);
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.