MHB Sammy's question at Yahoo Answers regarding approximate integration

AI Thread Summary
The discussion centers on approximating the integral of the function sqrt[2 - (sin x)^2] using the trapezoidal and Simpson's rules. The relationship between these methods is established with the equation 4T2n - Tn = 3Sn, demonstrating how the estimates relate to each other. Specific calculations for T1, T2, S1, and S2 yield approximate values of 1.0363, 1.0528, 1.0583, and 1.0581, respectively. These results show that Simpson's rule generally provides a more accurate estimate compared to the trapezoidal rule for this integral. The thread effectively illustrates the application of numerical integration techniques.
MarkFL
Gold Member
MHB
Messages
13,284
Reaction score
12
Here is the question:

Trapezoidal rule and Simpson's rule question help :'(?

Note: any letter beside "T" and "S" is a subscript.
Three estimates of int[f(x)*dx] are as follows: Tn is obtained by using trapezoidal rule with (n+1) ordinates while T2n is obtained with (2n+1) ordinates, and Sn is obtained by using Simpson's rule with (2n+1) ordinates.

(a) Show that 4T2n - Tn =3Sn
(b) Evaluate T1, T2, S1 and S2 for the integral int{sqrt[2-(sin x)^2]*dx} (between 0 and pi/4)

I have posted a link there to this topic so the OP can see my work.
 
Mathematics news on Phys.org
Hello again sammy,

We will need the following:

Trapezoidal Rule:

$$T_n=\frac{b-a}{2n}\left(f\left(x_0 \right)+2f\left(x_1 \right)+\cdots+2f\left(x_{n-1} \right)+f\left(x_n \right) \right)$$

Simpson's Rule:

$$S_n=\frac{b-a}{3n}\left(f\left(x_0 \right)+4f\left(x_1 \right)+2f\left(x_2 \right)+\cdots+2f\left(x_{n-2} \right)+4f\left(x_{n-1} \right)+f\left(x_n \right) \right)$$

(a) Using these definitions, we may write:

$$4T_{2n}=\frac{b-a}{2n}\left(2f\left(x_0 \right)+4f\left(x_1 \right)+\cdots+4f\left(x_{2n-1} \right)+2f\left(x_{2n} \right) \right)$$

$$T_n=\frac{b-a}{2n}\left(f\left(x_0 \right)+2f\left(x_2 \right)+\cdots+2f\left(x_{2(n-1)} \right)+f\left(x_{2n} \right) \right)$$

Subtracting, we find:

$$4T_{2n}-T_{n}=\frac{b-a}{2n}\left(f\left(x_0 \right)+4f\left(x_1 \right)+2f\left(x_2 \right)+\cdots+2f\left(x_{2n-2} \right)+4f\left(x_{2n-1} \right)+f\left(x_{2n} \right) \right)$$

Hence:

$$4T_{2n}-T_{n}=\frac{b-a}{n}\left(f\left(x_0 \right)+4f\left(x_1 \right)+2f\left(x_2 \right)+\cdots+2f\left(x_{n-2} \right)+4f\left(x_{n-1} \right)+f\left(x_{n} \right) \right)$$

$$4T_{2n}-T_{n}=3S_{n}$$

(b) We are given to approximate:

$$\int_0^{\frac{\pi}{4}}\sqrt{2-\sin^2(x)}\,dx$$

For comparison, W|A returns:

$$\int_0^{\frac{\pi}{4}}\sqrt{2-\sin^2(x)}\,dx\approx1.058095501392563$$

$$T_1=\frac{\frac{\pi}{4}-0}{2\cdot1}\left(f\left(0 \right)+f\left(\frac{\pi}{4} \right) \right)=$$

$$\frac{\pi}{8}\left(\sqrt{2-\sin^2(0)}+\sqrt{2-\sin^2\left(\frac{\pi}{4} \right)} \right)=\frac{\pi}{8}\left(\sqrt{2}+\sqrt{\frac{3}{2}} \right)\approx1.0363165535804948$$

$$T_2=\frac{\frac{\pi}{4}-0}{2\cdot2}\left(f\left(0 \right)+2f\left(\frac{\pi}{8} \right)+f\left(\frac{\pi}{4} \right) \right)=$$

$$\frac{\pi}{16}\left(\sqrt{2-\sin^2(0)}+2\sqrt{2-\sin^2\left(\frac{\pi}{8} \right)}+\sqrt{2-\sin^2\left(\frac{\pi}{4} \right)} \right)\approx1.0527994926632949$$

$$S_1=\frac{\frac{\pi}{4}-0}{3\cdot2}\left(f\left(0 \right)+4f\left(\frac{\pi}{8} \right)+f\left(\frac{\pi}{4} \right) \right)=$$

$$\frac{\pi}{24}\left(\sqrt{2-\sin^2(0)}+4\sqrt{2-\sin^2\left(\frac{\pi}{8} \right)}+\sqrt{2-\sin^2\left(\frac{\pi}{4} \right)} \right)\approx1.0582938056908950$$

$$S_2=\frac{\frac{\pi}{4}-0}{3\cdot4}\left(f\left(0 \right)+4f\left(\frac{\pi}{16} \right)+2f\left(\frac{\pi}{8} \right)+4f\left(\frac{3\pi}{16} \right)+f\left(\frac{\pi}{4} \right) \right)=$$

$$\frac{\pi}{48}\left(\sqrt{2-\sin^2(0)}+4\sqrt{2-\sin^2\left(\frac{\pi}{16} \right)}+2\sqrt{2-\sin^2\left(\frac{\pi}{8} \right)}+4\sqrt{2-\sin^2\left(\frac{3\pi}{16} \right)}+\sqrt{2-\sin^2\left(\frac{\pi}{4} \right)} \right)\approx$$

$$1.0581079075268218$$

In summary:

$$T_1\approx1.0363165535804948$$

$$T_2\approx1.0527994926632949$$

$$S_1\approx1.0582938056908950$$

$$S_2\approx1.0581079075268218$$
 
Suppose ,instead of the usual x,y coordinate system with an I basis vector along the x -axis and a corresponding j basis vector along the y-axis we instead have a different pair of basis vectors ,call them e and f along their respective axes. I have seen that this is an important subject in maths My question is what physical applications does such a model apply to? I am asking here because I have devoted quite a lot of time in the past to understanding convectors and the dual...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Back
Top