Problem 1 10 points hint trapezoidal method dxle6 for x dx d

Problem 1 (10 points) -hint: trapezoidal method\" dx-le-6; for x dx dx pi/2 s s 0.5* (cos (x-dx) +cos (x)) *dx. end pl round (s 1000) 1000

Solution

Matlab Code

>> dx = 1E-6;
>> s=0;
>> for x=dx:dx:pi/2
s = s+0.5*(cos(x-dx)+cos(x))*dx;
end
>> p1 = round(s*1000)/1000

Sample Output

p1 = 1

 Problem 1 (10 points) -hint: trapezoidal method\

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site