13
Definite integrals
The value of a definite integral can be approximated by Simpsons formula,
B
h
∫
f x ( ) x d
≈
-- - f A ( )
3
A
B A
–
h
=
------------ -
2n
n
As
becomes larger the approximation becomes better, and the limit as
infinity is consistent with the true answer.
In general, this method gives good approximations.
ON
MODE
MODE
?→ A:?→ B:?→ C:1→ D: (B - A)÷2 C → M:√ A → Y:Lbl 1:A +
2 DM - M → X:Y +4√ X → Y:X + M → X:Y +2√ X → Y:D +1→ D:C >
D ⇒ Goto 1 : B - M → X : Y +4√ X +√ B → Y : YM ÷3→ Y : Y < 105 STEP >
INPUT
A,B : interval of integration [
OUTPUT
Y : value of the definite integral
10
∫
x x d
Calculate
0
Prog
1
0
EXE
1
n
∑
f B ( )
+
+
4
f A
i
=
1
n
:number of stripes
MODE
20
10
=
------------- -
=
21.08185107
3
0
EXE
(Simpsons formula)
(
(
)h
)
+
2i 1
–
+
2
PRGM
COMP
1
MODE
,
]
C: number of stripes
A
B
.
S A
S A
n 1
–
∑
(
)
f A
+
2ih
i
=
1
n
1
1
P1 P1 P2 P3 P4
D R
P1 P1 P2 P3 P4
D R
approaches
G
G
21