# Approximating f(x) with Midpoint, Trapezoidal & Simpson's Rule

• 413
In summary, the conversation is about computing approximations for the function f(x)=e^-x^2 using the midpoint, trapezoidal, and Simpson's rule with n=2. The computed values for each method are 0.88420 for midpoint, 0.87704 for trapezoidal, and 0.82994 for Simpson's. The next step is to compute the error estimates for each method using the given information that |f ''''(x)|<12 for 0<x<2. The error estimates are EM=0.14875, ET=0.07438, and ES=0.13333. The question then asks about finding the value of n that guarantees an absolute value
413
a) With f(x)= e^-x^2 , compute approximations using midpoint, trapezoidal and simpson's rule with n=2.
I found that from midpoint rule gives 0.88420, trapezoidal rule gives 0.87704, and simpson's rule gives 0.82994.

Compute the error esimates for midpoint, trapezoidal, simpson's. Carefully examine the extreme values of f ''(x). You may use that |f ''''(x)| < 12 for 0<x< 2. (the < signs all mean less than or equal to).
I found that EM=0.14875, ET=0.07438, ES=0.13333

My question is how big should we take n to guarntee absolute value of ET <0.0001? and for EM<0.0001 and ES<0.0001?
How would you figure this question out?

for how big should take n to guarntee absolute value

for example with ET <0.0001 plug in all the value for K, a, b

so in your case, K is 2, a is 0, b is 2

so it would be (2*2^3)/(12n^2) < 0.0001 and just do it as algebra question

(2*2^3)/(12*0.0001) < n^2 and find the square root of n

just curious, are you also taking MATH 152 in SFU? coz i did this question too =)

Your answers for the approximations and error estimates seem to be correct based on the given information.

To guarantee an absolute value of ET < 0.0001, we can use the formula for the error estimate of the trapezoidal rule: ET = -(b-a)^3*f''(c)/(12n^2), where b and a are the upper and lower limits of integration, and c is some value in between. Since we know that |f ''(x)| < 12 for 0<x<2, we can substitute this into the formula and solve for n:

0.0001 = -(2-0)^3*12/(12n^2)
n^2 = 12*2^3/0.0001
n^2 = 1,200,000
n = 1095.4

Therefore, we would need to take n = 1096 to guarantee an absolute value of ET < 0.0001.

A similar approach can be used for EM and ES. Using the error estimate formulas for midpoint and Simpson's rule, we can solve for n to guarantee an absolute value of error less than 0.0001.

EM: n = √(3*2*2.4/0.0001) = 490.5
ES: n = √(3*2*4.8/0.0001) = 690.7

Therefore, taking n = 491 for EM and n = 691 for ES would guarantee an absolute value of error less than 0.0001.

## 1. How do Midpoint, Trapezoidal & Simpson's Rule approximate f(x)?

Midpoint, Trapezoidal & Simpson's Rule are numerical methods used to approximate the value of a definite integral. They work by dividing the interval of integration into smaller subintervals and using the function values at specific points within each subinterval to estimate the area under the curve.

## 2. What is the difference between Midpoint, Trapezoidal & Simpson's Rule?

The main difference between these three methods is the number of function values used to approximate the integral. Midpoint Rule uses the function value at the midpoint of each subinterval, Trapezoidal Rule uses the function values at the endpoints of each subinterval, and Simpson's Rule uses the function values at the endpoints and the midpoint of each subinterval.

## 3. When should Midpoint, Trapezoidal & Simpson's Rule be used?

These methods are most useful when the function being integrated is difficult or impossible to integrate analytically. They can also be used to check the accuracy of other numerical integration methods.

## 4. How accurate are Midpoint, Trapezoidal & Simpson's Rule?

The accuracy of these methods depends on the number of subintervals used and the smoothness of the function being integrated. Generally, as the number of subintervals increases, the accuracy of the approximation also increases.

## 5. What are the limitations of Midpoint, Trapezoidal & Simpson's Rule?

These methods can only approximate definite integrals and cannot be used for indefinite integrals. They also rely on the function being integrated to be continuous and smooth. Additionally, the accuracy of the approximation can be affected by the choice of subintervals and can be computationally intensive for functions with complex or rapidly changing behavior.

• Calculus
Replies
2
Views
1K
• Calculus and Beyond Homework Help
Replies
3
Views
1K
• Calculus
Replies
8
Views
1K
• Calculus
Replies
3
Views
2K
• Calculus and Beyond Homework Help
Replies
2
Views
1K
• Calculus
Replies
1
Views
1K
• Calculus
Replies
6
Views
2K
• General Math
Replies
6
Views
2K
• Engineering and Comp Sci Homework Help
Replies
1
Views
214
• Calculus
Replies
1
Views
1K