Finding area under cosx using midpoint rule

  • Thread starter pvpkillerx
  • Start date
  • Tags
    Area
In summary, the conversation discusses the use of the midpoint rule to approximate the integral of sin(x) dx. The individual uses a partition of four points and calculates the average of the function at each midpoint. However, they initially receive an incorrect answer and upon further questioning, discover that their calculator was in the wrong mode. Ultimately, they are able to find the correct answer and complete the problem.
  • #1
pvpkillerx
22
0
Use the midpoint rule to approximate the following integral:
∫sin(x) dx


This is what I did:
Δx = (1-0)/4 = 1/4

1/4(f(1/8) + f(3/8) + f(5/8) + f(7/8) + f(9/8))

But the answer i get is wrong. Is that the correct midpoint rule formula, and are the values I plugged in right? Any help is appreciated, thanks.
 
Physics news on Phys.org
  • #2
pvpkillerx said:
Use the midpoint rule to approximate the following integral:
∫sin(x) dx


This is what I did:
Δx = (1-0)/4 = 1/4

1/4(f(1/8) + f(3/8) + f(5/8) + f(7/8) + f(9/8))

But the answer i get is wrong. Is that the correct midpoint rule formula, and are the values I plugged in right? Any help is appreciated, thanks.

Are the limits on your integral 0 and 1?. How many points in your partition? Is 9/8 in your interval?
 
  • #3
Ye, its from 1 to 0, and n = 4.
 
  • #4
LCKurtz said:
Are the limits on your integral 0 and 1?. How many points in your partition? Is 9/8 in your interval?[/QUOTE]

pvpkillerx said:
Ye, its from 1 to 0, and n = 4.

What about my last question?
 
  • #5
I tried with and without 9/8, both don't give me the right answer.
 
  • #6
pvpkillerx said:
I tried with and without 9/8, both don't give me the right answer.

Why would you try it with 9/8 in the first place? Unless you show us your work how can we help you find what you are doing wrong? Maybe something simple like having your calculator in degree mode instead radians? Show us your calculations.
 
  • #7
ohh, i got the answer, u were right, the calculator was suppose to be in radians mode -_- oops. Thanks.
 
  • #8
pvpkillerx said:
Use the midpoint rule to approximate the following integral:
¢
 
  • #9
pvpkillerx said:
Use the midpoint rule to approximate the following integral: [itex]\int[/itex]sin(x) dx

But title says: Finding area under cosx using midpoint rule

Better establish whether sine or cosine :confused:
 

FAQ: Finding area under cosx using midpoint rule

What is the midpoint rule for finding area under cosx?

The midpoint rule is a numerical method used to approximate the area under a curve by dividing the interval into smaller subintervals and using the midpoint of each subinterval to calculate the area of a rectangle.

How do you use the midpoint rule to find the area under cosx?

To use the midpoint rule, you first need to divide the interval [a,b] into n equally spaced subintervals. Then, calculate the midpoint of each subinterval by taking the average of the endpoints. Finally, multiply the width of the subinterval by the value of cosx at the midpoint and sum up all the areas to approximate the total area under the curve.

What are the advantages of using the midpoint rule over other numerical methods?

The midpoint rule is relatively easy to implement and requires minimal calculations compared to other methods such as the trapezoidal rule or Simpson's rule. It also tends to give more accurate results for functions that are smooth and continuously differentiable.

What are the limitations of using the midpoint rule?

The midpoint rule can only approximate the area under a curve and is not an exact solution. The accuracy of the approximation depends on the number of subintervals used, and it may not work well for functions with sharp turns or discontinuities. Additionally, the midpoint rule can underestimate or overestimate the actual area, especially for highly oscillatory functions.

How can the accuracy of the midpoint rule be improved?

The accuracy of the midpoint rule can be improved by increasing the number of subintervals used, which will result in smaller rectangles and a better approximation of the area. Alternatively, using other numerical methods such as the trapezoidal rule or Simpson's rule can also improve the accuracy of the approximation.

Similar threads

Back
Top