# 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.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 20, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "http://mathhelpforum.com/calculus/4692-integration-simpsons-rule-problem-print.html", "fetch_time": 1516250682000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2018-05/segments/1516084887065.16/warc/CC-MAIN-20180118032119-20180118052119-00115.warc.gz", "warc_record_offset": 220447883, "warc_record_length": 3788, "token_count": 980, "char_count": 2686, "score": 4.0, "int_score": 4, "crawl": "CC-MAIN-2018-05", "snapshot_type": "longest", "language": "en", "language_score": 0.280181884765625, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00051-of-00064.parquet"}