I need help using simpsons rule

kggirl

New member
Joined
Oct 5, 2005
Messages
43
evaluate the integral from 0 to 1 xsin[x] dx where n = 4 steps.

I don't know where to begin with this one.
 
Hello, kggirl!

Simpson's Rule
Evaluate: \(\displaystyle \L\int^{\;\;\;\;1}_0 x\cdot\sin(x)\,dx\;\) where \(\displaystyle \,n = 4\,\) steps.

I don't know where to begin with this one. . . . . really?
Do you know the formula for Simpson's Rule?

\(\displaystyle A\;\approx\;\frac{h}{3}\left(y_0\,+\,4y_1\,+\,2y_2\,+\,4y_3\,+\,\cdots\,+\,2y_{n-2}\,+\,4y_{n-1}\,+\,y_n\right)\)

where \(\displaystyle h\) is the width of the intervals, and \(\displaystyle y_i\) are the "heights" of the function at each \(\displaystyle x_i\).


With 4 steps, we have: \(\displaystyle \;\begin{array}{ccccc}x_0\,=\,0.00\\x_1\,=\,0.25 \\x_2\,=\,0.50\\x_3\,=\,0.75\\x_4\,=\,1.00\end{array}\;\;\Rightarrow\;\;\begin{array}{cccc}y_0\,=\,0.00\cdot\sin(0.00)\,= 0.0000\\ y_1\,=\,0.25\cdot\sin(0.25)\,\approx\,0.0619 \\ y_2\,=\,0.50\cdot\sin(0.50)\,\approx\,0.2397\\ y_3\,=\,0/75\cdot\sin(0.75)\,\approx\,0.5112 \\ y_4\,=\,1.00\cdot\sin(1.00)\,\approx\,0.8415\end{array}\)

. . and we have: \(\displaystyle \;h\,=\,0.25\)


Hence: \(\displaystyle \;A\;\approx\;\frac{0.25}{3}[0\,+\,4(0.0619)\,+\,2(0.2397)\,+\,4(0.5122)\,+\,0.8415]\;=\;0.301108333\)

Therefore: \(\displaystyle \L\;A\;\approx\;0.3011\)

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

The actual area is: \(\displaystyle \L\int^{\;\;\;\;1}_0 x\cdot\sin(x)\,dx\;=\;0.301168679\)

. . Our approximation is very good!
 
Thank you, i was trying to solve using h = 1/4 so my answers are different than yours. Thanks again.
 
Top