Question

Numerically compute the integral of (x) = 5 + sin2(x) on the interval [0,지 for n-2, 4, 8, 16, 32, and 64 equally spaced subintervals using the midpoint, trapezoidal, and Simpson 1/3 rule. Compare the results with the exact value of the integral, and determine the order of accuracy for each method based on the n = 32 and n 64 results Perform hand calculations for the n = 2 cases, but develop MATLAB programs to perform the rest of the calculations. Submit print copies of your program(s) with your assignment.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

) mid pint Prnetfod KE-12, n IT6 2- IIT.2 卩6 2t3 .2139] : 113.Midpoint method for numerical integral b-180 m-input (Number of Sub intervals:: h-(b-a) /m; f-O: for i-1length (c) f-f+5+ (siSimpson method for numerical integral a 0 b=180; n= input( Number of subintervals :); h= (b-a) /n; k= 1 : n; c (k) =h. ; f1Number of Sub_intervals:2 Midpoint Method value 16.8575 Number 4 Midpoint Method value17.0575 of Sub intervals: Number of SubNumber 2 SImpson method value17.7179 of Sub intervals: Number of Sub_intervals:4 SImpson method value17.0609 Number of Sub_in

Add a comment
Know the answer?
Add Answer to:
Numerically compute the integral of (x) = 5 + sin2(x) on the interval [0,지 for n-2,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT