# Integration - Simpsons Rule Problem

• Aug 6th 2006, 03:32 PM
c00ky
Integration - Simpsons Rule Problem
Hi again guys,

Working my way through some little problems and i'm totally baffled with this one.

Could anybody help me out with it? Give me some sort of idea what the graph will look like? - Are there any online graph plotting programmes?

• Aug 6th 2006, 04:23 PM
galactus
Do you know how to calculate using Simpson's rule?.

Code:

                     endpoint          f(x)        mult.        result      0                      0                  3          1                3 1                    1/3                1.65      4                6.605  2                    2/3                1.235    2                2.47 3                      1                  1.406    4                5.624 4                      4/3                1.986    2              3.972 5                      5/3                2.885    4              11.54 6                      2                  4.055    1              4.055                                                                       -----------                                                                     37.266

Use $\frac{b-a}{3n}=\frac{2-0}{3(6)}=\frac{1}{9}$

37.266/9=4.141

• Aug 6th 2006, 04:34 PM
ThePerfectHacker
Quote:

Originally Posted by c00ky
Hi again guys,

Working my way through some little problems and i'm totally baffled with this one.

Could anybody help me out with it? Give me some sort of idea what the graph will look like? - Are there any online graph plotting programmes?

The number of partition needs to be an even number in this case $n=6$. On the interval of $[2,0]$. Therefore, the size of each partition is,
$\Delta x=\frac{2-0}{6}=\frac{1}{3}$
Thus, by Homer's Rule,
$\int_0^2 x^2+3e^{-2x}dx\approx$ $\frac{1}{3} [ f(0)+4f(\Delta x)+2f(2\Delta x)+$ $4f(3\Delta x)+2(4\Delta x)+4(5\Delta x)+f(2)]\Delta x$
Since,
$\Delta x=\frac{1}{3}$
We can write,
$\int_0^2 x^2+3e^{-2x}dx\approx$ $\frac{1}{9} [ f(0)+4f(1/3)+2f(2/3)+$ $4f(3/3)+2(4/3)+4(5/3)+f(2)]$
Now, create a table of values,
$\left\{ \begin{array}{cc}x&x^2-3e^{-2x}\\
0/3&3.0000\\
1/3&1.6514\\
2/3&1.2352\\
3/3&1.4060\\
4/3&1.9862\\
5/3&2.8848\\
6/3&4.0549$

Now substitute their values into your Homer's approximation,
$\frac{1}{9}( 3+4(1.6514)+$ $2(1.2352)+4(1.4060)+2(1.9862)+4(2.8848)+4.0549)$
Thus, calculate,
$\frac{1}{9}(3+6.6056+2.4704+5.624$ $+3.9724+11.5392+4.0549)$
Again,
$\frac{1}{9}(37.2665)$
Again,
$\approx 4.141$
Now the actual value is,
$\int_0^2 x^2+3e^{-2x}dx=\frac{1}{3}x^3-\frac{3}{2}e^{-2x} \big|^2_0$
$=\frac{8}{3}+\frac{3}{2}e^{-4}+\frac{3}{2}e^0=4.1392....$

Note very accurate to the approximation.