use Simpson's with n=10 to approx. f(x)= x sin x, 0¡Ü x ¡Ü2¦Ð

round to 6 decimal places

I know I set up the calculation correctly like this:
(pi/15)(f(0)+4f(pi/5)+2f(2pi/5)+...+2f(8pi/5)+4f(9pi/5)+f(2pi)

I keep getting a negative answer but I know that the answer is somewhere in the 15's. Please help me out here.

Sorry, supposed to be from 0 to 2pi

there are lots of online calculators you can use to verify your answer, such as

http://www.wolframalpha.com/widgets/view.jsp?id=174a81e7a9ffb5aed0a790093981aaab

It seems like you have set up the Simpson's rule correctly to approximate the integral of f(x) = x*sin(x) over the interval [0, 2π]. However, the negative result you are getting could be due to a sign error in your calculations or an issue with rounding. Let's go through the steps to ensure accuracy.

First, let's calculate the values of f(x) at the given points:

f(0) = 0*sin(0) = 0
f(π/5) = (π/5)*sin(π/5)
f(2π/5) = (2π/5)*sin(2π/5)
...
f(9π/5) = (9π/5)*sin(9π/5)
f(2π) = (2π)*sin(2π) = 0

Now, plug these values into the Simpson's rule formula:

Approximation = (π/15) * (f(0) + 4*f(π/5) + 2*f(2π/5) + ... + 2*f(8π/5) + 4*f(9π/5) + f(2π))

Note: Make sure to use the exact value of π, up to the desired decimal places. Round the final result to 6 decimal places.

Now calculate each term separately, making sure to use the exact value of π:

Term 1: (π/15) * f(0)
Term 2: (π/15) * (4 * f(π/5))
Term 3: (π/15) * (2 * f(2π/5))
...
Term 10: (π/15) * f(2π)

Add up all the terms and round the final result to 6 decimal places. This should give you the correct approximation. Keep in mind that the answer should be positive since the function f(x) = x*sin(x) is positive over the given interval [0, 2π].