Is My Calculation Correct for Mid-Ordinate and Simpson's Rule?

  • MHB
  • Thread starter peterianstaker
  • Start date
In summary, the conversation is about estimating the definite integral of a given function using the Mid-Ordinate rule and Simpson's rule with 4 strips. The working is shown for both methods and the final estimates are 0.904 and 1.105 respectively, with the exact value being approximately 1.107. The question has also been posted on other forums for further feedback.
  • #1
peterianstaker
2
0
Can someone check my working to see if this is correct for both questions?

Estimate: ∫(2,0) 1/1+x^2 dx
i) Using the Mid-Ordinate rule with 4 strips
ii) Using Simpson's rule with 4 strips

i) h=b-a/n

= 2-0/4 = 0.5

x 0 0.5 1 1.5 2
y 1 0.8 0.5 0.308 0.2

=h(y1+y2+y3+...yn)
=0.5(0.8+0.5+0.308+0.2)
= 0.904 (3.d.p)

ii) = h/3(y0+4y1+2y2+4y3+y4)
= 0.5/3(1+4x0.8+2x0.5+4x0.3+4x0.308+0.2)
= 1.105 (3.d.p)

Any comments welcome!
 
Physics news on Phys.org
  • #2
We are given:

\(\displaystyle f(x)=\frac{1}{x^2+1}\)

\(\displaystyle a=0,\,b=2,\,n=4\)

a) Midpoint Rule

\(\displaystyle M_4=\frac{1}{2}\left(\frac{1}{\frac{1}{16}+1}+\frac{1}{\frac{9}{16}+1}+\frac{1}{\frac{25}{16}+1}+\frac{1}{\frac{49}{16}+1}\right)=\frac{251168}{226525}\approx1.10878710959055\)

b) Simpson's Rule

\(\displaystyle S_4=\frac{1}{6}\left(\frac{1}{0+1}+4\frac{1}{\frac{1}{4}+1}+2\frac{1}{1+1}+4\frac{1}{\frac{9}{4}+1}+\frac{1}{4+1}\right)=\frac{431}{390}=1.1\overline{051282}\)

For comparison, the exact value of the given definite integral is:

\(\displaystyle I=\arctan(2)\approx1.10714871779409\)
 

FAQ: Is My Calculation Correct for Mid-Ordinate and Simpson's Rule?

What is Mid-Ordinate Rule?

Mid-Ordinate Rule is a method used for approximating the area under a curve by dividing the given interval into equal subintervals and finding the area of rectangles whose heights are determined by the midpoints of each subinterval.

How is Mid-Ordinate Rule different from other numerical integration methods?

Mid-Ordinate Rule is a type of rectangle rule, which means that it uses rectangles to approximate the area under a curve. Other numerical integration methods, such as Trapezoidal Rule and Simpson's Rule, use trapezoids and parabolas, respectively, to approximate the area.

What is Simpson's Rule?

Simpson's Rule is a numerical integration method used to approximate the area under a curve by dividing the given interval into smaller subintervals and using a quadratic function to approximate the curve within each subinterval.

How accurate is Mid-Ordinate and Simpson's Rule?

Both Mid-Ordinate and Simpson's Rule have an error of order h^3, meaning that the error decreases as the subintervals become smaller. However, Simpson's Rule is generally more accurate than Mid-Ordinate Rule, especially for curves with higher degrees of curvature.

When should I use Mid-Ordinate and Simpson's Rule?

Mid-Ordinate and Simpson's Rule are useful when the function of the curve is known and can be integrated analytically. They are commonly used in scientific and engineering fields for approximating areas and volumes in situations where the exact solution is not feasible.

Back
Top