`Hey,
Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries
clc
clear all
h=2;
hh=[];
for i=0:8
x=1:h:3;
hh(i+1)=h;
h=h/2;
y=(x.^2).*log(x);
I(i+1)=trapz(x,y);
end
loglog(hh,I);
xlabel('Log of step size');
ylabel('Log of Integral');
title('Part d');
figure;
h=2*sqrt(3);
hh=[];
for i=0:8
x=0:h:2*sqrt(3);
hh(i+1)=h;
h=h/2;
y=1./sqrt(x.^2+4);
I(i+1)=trapz(x,y);
end
loglog(hh,I);
xlabel('Log of step size');
ylabel('Log of Integral');
title('Part g');
Kindly revert for any queries
Thanks.
SHOW FULL MATLAB CODE NOT ONE FROM TEXT BOOK!! Solve mumber 9 d and g using...