# Thread: Using simpsons rule integration

1. ## Using simpsons rule integration

simpsons rule... (please let me know if I've copied this wrong!!)

w/3 [(y0+yn+4(y1+y3+y5....)+2(y2+y4+y6...)]

I got my q

∫(below)0 (above)2π /3 sin x dx (4 strips)

can I please have some help??

simpsons rule... (please let me know if I've copied this wrong!!)

w/3 [(y0+yn+4(y1+y3+y5....)+2(y2+y4+y6...)]

I got my q

∫(below)0 (above)2π /3 sin x dx (4 strips)

can I please have some help??
$\displaystyle \int_0^{\frac{2\pi}{3}} \sin{x} \, dx = \frac{\pi}{18}\left[\sin(0) + 4\sin\left(\frac{\pi}{6}\right) + 2\sin\left(\frac{\pi}{3}\right) + 4\sin\left(\frac{\pi}{2}\right) + \sin\left(\frac{2\pi}{3}\right)\right]$

3. $\displaystyle \int_0^{\frac{2\pi}{3}} \sin{x} \, dx = \frac{\pi}{18}\left[\sin(0) + 4\sin\left(\frac{\pi}{6}\right) + 2\sin\left(\frac{\pi}{3}\right) + 4\sin\left(\frac{\pi}{2}\right) + \sin\left(\frac{2\pi}{3}\right)\right]$

okay see I'm getting...

$\displaystyle \int_0^{\frac{2\pi}{3}} \sin{x} \, dx = pi/18 [sin (0) + sin (120) + 4 (0.5 + 1) + 2(sin 120)]$

which goes as pi/18 [0 + root3/2 + 4(1.5) + root3]

in which I get the answer as approximate to 1.5

The answer in the textbook is 3.0

I'm not sure I completely understand your working skeeter...

$\displaystyle \int_0^{\frac{2\pi}{3}} \sin{x} \, dx = \frac{\pi}{18}\left[\sin(0) + 4\sin\left(\frac{\pi}{6}\right) + 2\sin\left(\frac{\pi}{3}\right) + 4\sin\left(\frac{\pi}{2}\right) + \sin\left(\frac{2\pi}{3}\right)\right]$

okay see I'm getting...

$\displaystyle \int_0^{\frac{2\pi}{3}} \sin{x} \, dx = pi/18 [sin (0) + sin (120) + 4 (0.5 + 1) + 2(sin 120)]$

which goes as pi/18 [0 + root3/2 + 4(1.5) + root3]

in which I get the answer as approximate to 1.5

The answer in the textbook is 3.0

I'm not sure I completely understand your working skeeter...
$\displaystyle \frac{\Delta x}{3} \left(y_0 + 4y_1 + 2y_2 + 4y_3 + y_4\right)$

$\displaystyle \Delta x = \frac{\pi}{6}$

$\displaystyle y_0 = \sin(0)$

$\displaystyle y_1 = \sin\left(\frac{\pi}{6}\right)$

$\displaystyle y_2 = \sin\left(\frac{\pi}{3}\right)$

$\displaystyle y_3 = \sin\left(\frac{\pi}{2}\right)$

$\displaystyle y_4 = \sin\left(\frac{2\pi}{3}\right)$

you have the same values as I , except you are mixing degrees with radians. don't do that.

note that you were lucky since sin(120) = sin(60) ... you listed sin(120) twice.

5. Originally Posted by skeeter
$\displaystyle \frac{\Delta x}{3} \left(y_0 + 4y_1 + 2y_2 + 4y_3 + y_4\right)$

$\displaystyle \Delta x = \frac{\pi}{6}$

$\displaystyle y_0 = \sin(0)$

$\displaystyle y_1 = \sin\left(\frac{\pi}{6}\right)$

$\displaystyle y_2 = \sin\left(\frac{\pi}{3}\right)$

$\displaystyle y_3 = \sin\left(\frac{\pi}{2}\right)$

$\displaystyle y_4 = \sin\left(\frac{2\pi}{3}\right)$

you have the same values as I , except you are mixing degrees with radians. don't do that.

note that you were lucky since sin(120) = sin(60) ... you listed sin(120) twice.
okay... don't mix... makes sense... but if we are still getting the same answers I must have understood something... But I'm still getting 1.5 as the value? Can I ask what are you getting when you type it all in?