Consider the integral integral3420077400 xe00031x3 dx Estim

Consider the integral. = integral_3.4200^7.7400 xe^0.0031x^3 dx Estimate this integral with tin; mid-point rule and with the trapezoid rule, each using -187 equally spaced legions. Submit your result to the class Sakai Drop Box. Make a folder for the first assignment and upload each file individually without using the archive format. Double check that you are able to download your own file.

Solution

MATLAB Code

%% Midpoint Rule
a = 3.42; %initial point
b = 7.74; % Final point
N = 487; % Number of regions
h = (b-a)/N; % spacing
hf = 0;
x = (a+h/2);
for i = 1:N;
f = x*exp(0.0031*x^3);
hf = hf + h*f;
x = x + h;
end
Midpoint = hf

%% Trapezoidal Rule
hf1 = a*exp(0.0031*a^3); % start point function value
hfn = b*exp(0.0031*b^3); % end point function value
xT = a+h;
hfT = 0;
for j = 1:N-1;
fT = xT*exp(0.0031*xT^3);
hfT = hfT + 2*fT;
xT = xT + h;
end
Trap = (hfT+hf1+hfn)*h/2

Result

>> Integration

Midpoint =

52.4443


Trap =

52.4445

 Consider the integral. = integral_3.4200^7.7400 xe^0.0031x^3 dx Estimate this integral with tin; mid-point rule and with the trapezoid rule, each using -187 eq

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site