Question: !!! PLEASE USE MATLAB IN FINDING CODES FOR THIS QUESTION !!! !!! ALSO INCLUDE OUTPUT AT THE END !!! !!! I UPVOTE FAIRLY !!! (BELOW
!!! PLEASE USE MATLAB IN FINDING CODES FOR THIS QUESTION !!! !!! ALSO INCLUDE OUTPUT AT THE END !!!
!!! I UPVOTE FAIRLY !!!

(BELOW IS EXERCISE 22.1)

22.2 Write a well-commented MATLAB function program mymidpoint that calculates the midpoint rule approximation for Sf on the interval [a, b] with n subintervals. The inputs should be f. a, b and n. Use your program on the integral veda to obtain M, and M100. Compare these with exercise 22.1 and the true value of the integral. Solution i se dx 3 1195, 15, 1:75,2 =a=!,b=2084 +1.25 2 23 . 74 = 2 -1.185 4,25 1.66 ng 7.95 +1.5 -1.375 + y - 1375=017 15+1.75 5-1625 43=1625 21:37 1.45+2 -1875 Ty = V1-895=1.375 20=1 - Yo=V1 = 1 91-1995 yis vias = 112 % = 1.5 Yo=V15 = 1.22 93=19543-1.75 -1:32 Xy= 2 -44=V2 = 1.41 Mon (1:06+117+1.97 +1137) = 1.9175 So toda la (1+4 (112) +3(123)+4(122) +1-41) 4.3 = 1.2175 9 fra de 122) = %(342,44)= 1.2189 X100 % error: 12189-12195 12189 = 01115%
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
