0% found this document useful (0 votes)
191 views2 pages

Simpson's Integral Rule Explained

1) Simpson's rule is used to approximate definite integrals. It weights the function values at the end points half as much as the interior points. 2) The document gives the Simpson's rule formula to approximate the integral from 0 to 4 of 1/(1+x^2) for various values of n. 3) The results show that the error decreases as n increases, providing a better approximation to the true value of the integral, which is calculated to be 1.325817664.

Uploaded by

Noor Mohammed
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)
191 views2 pages

Simpson's Integral Rule Explained

1) Simpson's rule is used to approximate definite integrals. It weights the function values at the end points half as much as the interior points. 2) The document gives the Simpson's rule formula to approximate the integral from 0 to 4 of 1/(1+x^2) for various values of n. 3) The results show that the error decreases as n increases, providing a better approximation to the true value of the integral, which is calculated to be 1.325817664.

Uploaded by

Noor Mohammed
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

2) Simpson’s Integral Rule:

To improve 𝑇1 𝑓 we obtain:


𝑠𝑛 𝑓 = 𝑓 𝑥0 + 4𝑓 𝑥1 + 2𝑓 𝑥2 + ⋯ + 2𝑓 𝑥𝑛−2 + 4𝑓 𝑥𝑛−1 + 𝑓 𝑥𝑛
3
Example :
4 𝑑𝑥
Calculate 𝑠𝑛 𝑓 and the error for different value of n for the integral 𝐼 = 0 1+𝑥 2
; 𝑛 = (2,4,16, 32,64,128)


Solution: 𝑠𝑛 𝑓 = 3 𝑓 𝑥0 + 4𝑓 𝑥1 + 2𝑓 𝑥2 + ⋯ + 2𝑓 𝑥𝑛−2 + 4𝑓 𝑥𝑛−1 + 𝑓 𝑥𝑛

4 𝑑𝑥 4
The true solution: 𝐼 = 0 1+𝑥 2
= tan−1 𝑥
0
= tan−1 (4) − tan−1 (0) = 1.325817664
𝑏−𝑎 4−0
n = 2; ℎ= = = 2; 𝑥𝑖+1 = 𝑥𝑖 + ℎ
𝑛 2

2
𝑠2 𝑓 = 𝑓 𝑥0 + 4𝑓 𝑥1 + 𝑓 𝑥2
3
2
𝑠2 𝑓 = 𝑓 0 + 4𝑓 2 + 𝑓 4
3
2 1 1
𝑆2 𝑓 = 1+4 + = 1.23921569
3 5 17

Actual error = I - 𝑆2 𝑓 = 0.08660197


𝑏−𝑎 4−0
n = 4; ℎ= = =1
𝑛 4

1
𝑆4 𝑓 = 𝑓 𝑥0 + 4𝑓 𝑥1 + 2𝑓 𝑥2 + 4𝑓 𝑥3 + 𝑓 𝑥4
3
1 n Actual error
𝑆4 𝑓 = 𝑓 0 + 4𝑓 1 + 2𝑓 2 + 4𝑓 3 + 𝑓 4
3
2 0.86 ∗ 10−1
1 1 1 1 1 4 0.39 ∗ 10−1
𝑆4 𝑓 = 1 + 4 +2 +4 + = 1.28627451
3 2 5 10 17 16 4.02 ∗ 10−6
Actual error = I - 𝑆2 𝑓 = 0.039543154 32 2.33 ∗ 10−8
64 1.46 ∗ 10−9
128 9.15 ∗ 10−11

You might also like