WOLFRAM|DEMONSTRATIONS PROJECT

Numerical Integration Examples

​
function
oscillator: f(x) =
c
1
+
c
2
sin(​
c
3
2π x)
integration rule
Simpson's:
nd
2
order
c
1
0
c
2
1
c
3
-2.2
segments
3
limits
lower, a
0
upper, b
1
Numerical integration is a method used to calculate an approximate value of a definite integral
I=
b
∫
a
f(x)dx
. This Demonstration compares various Newton–Cotes methods to approximate the integrals of several different functions over the interval
[a,b]
. Typically, the error decreases as the order of the method is increased. Likewise, more segments usually leads to a more accurate approximation of the integral.