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

  • Thread starter Thread starter peterianstaker
  • Start date Start date
Click For Summary
The discussion focuses on verifying calculations for estimating the integral of 1/(1+x^2) from 0 to 2 using the Mid-Ordinate and Simpson's rules with 4 strips. The Mid-Ordinate rule calculation yields an estimate of 0.904, while Simpson's rule provides an estimate of 1.105. Additional calculations using the midpoint rule and Simpson's rule yield results of approximately 1.1088 and 1.1, respectively. The exact value of the integral is approximately 1.1071, highlighting the accuracy of the methods discussed. Participants are encouraged to provide feedback on the calculations presented.
peterianstaker
Messages
2
Reaction score
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
We are given:

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

$$a=0,\,b=2,\,n=4$$

a) Midpoint Rule

$$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

$$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:

$$I=\arctan(2)\approx1.10714871779409$$
 
Thread 'Problem with calculating projections of curl using rotation of contour'
Hello! I tried to calculate projections of curl using rotation of coordinate system but I encountered with following problem. Given: ##rot_xA=\frac{\partial A_z}{\partial y}-\frac{\partial A_y}{\partial z}=0## ##rot_yA=\frac{\partial A_x}{\partial z}-\frac{\partial A_z}{\partial x}=1## ##rot_zA=\frac{\partial A_y}{\partial x}-\frac{\partial A_x}{\partial y}=0## I rotated ##yz##-plane of this coordinate system by an angle ##45## degrees about ##x##-axis and used rotation matrix to...

Similar threads

Replies
6
Views
2K
Replies
5
Views
4K