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
  • Calculate , and apply the composite trapezoidal rule to numerically compute it with evenly spaced nodes where n = 10...

    Calculate , and apply the composite trapezoidal rule to numerically compute it with evenly spaced nodes where n = 10, 20, 40, 80. Compute absolute numerically errors. Please post your code in MATLAB and present your results in the table below: 1 0 We were unable to transcribe this imagen Result by the composite trapezoidal rule Absolute error Absolute errorxn2 10 20 40 80 1 0 n Result by the composite trapezoidal rule Absolute error Absolute errorxn2 10 20 40...

  • 2 Problem 3 (25 points) Let I = ïrdz. a) [by hand] Use a composite trapezoidal rule to evaluate 1 using N = 3 subintervals. b) MATLAB] Use a composite trapezoidal rule to evaluate I using N - 6 subin...

    2 Problem 3 (25 points) Let I = ïrdz. a) [by hand] Use a composite trapezoidal rule to evaluate 1 using N = 3 subintervals. b) MATLAB] Use a composite trapezoidal rule to evaluate I using N - 6 subinterval:s c) by hand] Use Romberg extrapolation to combine your results from a) and b) and obtain an improved approximation (you may want to compare with a numerical approximation of the exact value of the integral 2 Problem 3 (25 points)...

  • Question 1: Numerically integrate function f(x) given on the right from x=0 to x=10. Use the...

    Question 1: Numerically integrate function f(x) given on the right from x=0 to x=10. Use the f(x)= x2 - 6x + 16 Trapezoidal Rule and the Simpson's 1/3 Rule and compare the results. Use at least 4 50 + 15x - ye? decimal digits in your calculations and reporting. Organize and report each one of your solutions in a calculation table and identify your result clearly. a) Divide the interval into 5 subdivisions. Calculate the integral first using the Trapezoidal...

  • MATLAB Create a function that provides a definite integration using Simpson's Rule Problem Summar This example demo...

    MATLAB Create a function that provides a definite integration using Simpson's Rule Problem Summar This example demonstrates using instructor-provided and randomized inputs to assess a function problem. Custom numerical tolerances are used to assess the output. Simpson's Rule approximates the definite integral of a function f(x) on the interval a,a according to the following formula + f (ati) This approximation is in general more accurate than the trapezoidal rule, which itself is more accurate than the leftright-hand rules. The increased...

  • Find the midpoint rule approximations to the following integral. 3 X dx using n 1, 2, and 4 subintervals. 1 M(1)- (...

    Find the midpoint rule approximations to the following integral. 3 X dx using n 1, 2, and 4 subintervals. 1 M(1)- (Simplify your answer. Type an integer or a decimal.) Find the midpoint rule approximations to the following integral. 3 X dx using n 1, 2, and 4 subintervals. 1 M(1)- (Simplify your answer. Type an integer or a decimal.)

  • QUESTION 5 The integral 2 1 I= dx x +4 0 is to be approximated numerically....

    QUESTION 5 The integral 2 1 I= dx x +4 0 is to be approximated numerically. (a) Find the least integer M and the appropriate step size h so that the global error for the composite Trapezoidal rule, given by -haf" (), a< & <b, 12 is less than 10-5 for the approximation of I. b - a (b) Use the two-term Gaussian quadrature formula and 6 decimal place arithmetic to approximate I. (Hint: Parameters are ci = 1, i...

  • 2. Use the Trapezoidal Rule to numerically integrate the following polynomial from a tob 1.5 f(x)...

    2. Use the Trapezoidal Rule to numerically integrate the following polynomial from a tob 1.5 f(x) = 0.2 + 25x-200x' + 675xs_ 900x. + 400x5 Use three different numbers of segments (n- 2, n 3, and n 4) and show the effect of the number of segments on relative error considering the exact value of the integral which is 48.7719. (Note: Show the steps of calculation).

  • 1. Numerical Integration The integral of a function f(x) for a s x S b can be interpreted as the ...

    1. Numerical Integration The integral of a function f(x) for a s x S b can be interpreted as the area between the f(x) curve and the x axis, bounded by the limits x- a and x b. If we denote this area by A, then we can write A as A-f(x)dx A sophisticated method to find the area under a curve is to split the area into trapezoidal elements. Each trapezoid is called a panel. 1.2 0.2 1.2 13...

  • T-Mobile 5:33 PM < Back MATH 1620 Pr… aビ Phase 2 In this phase, we will evaluate the integral nu...

    T-Mobile 5:33 PM < Back MATH 1620 Pr… aビ Phase 2 In this phase, we will evaluate the integral numerically using the definition by Riemann sum. For numerical calculations, we will use MATLAB software. 3. First, use MATLAB to evaluate this time a definite integral. x ex dx = For that, type directly into command window in MATLAB: syms x; intx exp(x),0,2). Get the answer in a number with at least four decimals. Download an m-file, midPointRule.m, from Canvas and...

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