[go: up one dir, main page]

0% found this document useful (0 votes)
76 views1 page

Trapezoidal Rule Example: Prof. K. Tebeest, Kettering University File Trap - Tex 10/27/2017

The document uses the Trapezoidal rule to approximate the integral of sin(x) from 0 to π using: 1) 6 subintervals, with an error of 2.2951% 2) 12 subintervals, with an error of 0.5718% 3) Richardson extrapolation of the results from 1) and 2), achieving the most accurate result of 2.00005262 with an error of 0.0026%.

Uploaded by

muhammed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views1 page

Trapezoidal Rule Example: Prof. K. Tebeest, Kettering University File Trap - Tex 10/27/2017

The document uses the Trapezoidal rule to approximate the integral of sin(x) from 0 to π using: 1) 6 subintervals, with an error of 2.2951% 2) 12 subintervals, with an error of 0.5718% 3) Richardson extrapolation of the results from 1) and 2), achieving the most accurate result of 2.00005262 with an error of 0.0026%.

Uploaded by

muhammed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Trapezoidal Rule Example

Z π
Use the Trapezoidal rule to approximate sin x dx using
0

1. n = 6 subintervals,
2. n = 12 subintervals, and
3. Richardson extrapolation.


Here a = 0, b = π, and f x = sin x.

b−a π
1. n = 6 =⇒ h = = , and xi = a + ih = 0 + π6 i, i = 0, 1, . . . , 6.
n 6

i 0 1 2 3 4 5 6
π 2π 3π 4π 5π 6π
xi 0 6 6 6 6 6 6

π 2π 3π 4π 5π 6π
     
fi sin 0 sin 6 sin 6 sin 6 sin 6 sin 6 sin 6

So
Z π
hh i
sin x dx ≈ f0 + 2f1 + 2f2 + 2f3 + 2f4 + 2f5 + f6
0 2
= 1.9540 9723 3313 , Error = 2.2951% (1)

b−a π π
2. n = 12 =⇒ h = = , and xi = a + ih = 0 + 12 i, i = 0, 1, . . . , 12.
n 12

i 0 1 2 3 ··· 11 12
π 2π 3π 11π 12π
xi 0 12 12 12 ··· 12 12

π 2π 3π 11π 12π
    
fi sin 0 sin 12 sin 12 sin 12 ··· sin 12 sin 12

So
Z π
hh i
sin x dx ≈ f0 + 2f1 + 2f2 + 2f3 + . . . + 2f11 + f12
0 2
= 1.9885 6377 6584 , Error = 0.5718% (2)

3. Richardson extrapolation:
Better − Poorer
Imp. Est. = Better +
22 − 1
 
 Result 2 − Result 1
= Result 2 +
22 − 1
1.9885 6377 6584 − 1.9540 9723 3313
= 1.9885 6377 6584 +
22 − 1
= 2.0000 5262 4341 , Error = 0.0026% (3)

Error in Result 1 2.2951
NOTE:  = = 4.013 ≈ 4 as expected
Error in Result 2 0.5718

Prof. K. TeBeest, Kettering University file trap.tex 10/27/2017

You might also like