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$$
 
Seemingly by some mathematical coincidence, a hexagon of sides 2,2,7,7, 11, and 11 can be inscribed in a circle of radius 7. The other day I saw a math problem on line, which they said came from a Polish Olympiad, where you compute the length x of the 3rd side which is the same as the radius, so that the sides of length 2,x, and 11 are inscribed on the arc of a semi-circle. The law of cosines applied twice gives the answer for x of exactly 7, but the arithmetic is so complex that the...
Is it possible to arrange six pencils such that each one touches the other five? If so, how? This is an adaption of a Martin Gardner puzzle only I changed it from cigarettes to pencils and left out the clues because PF folks don’t need clues. From the book “My Best Mathematical and Logic Puzzles”. Dover, 1994.
Thread 'Imaginary Pythagoras'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top