Use Simpson's Rule with N=8 to estimate

π/2

∫ sin x / x dx

0

where we take the value of (sin x) / x at x=0 to be 1.

Printable View

- Sep 17th 2009, 10:26 AMjohnleyUsing Simpson's Rule For sin x / x
Use Simpson's Rule with N=8 to estimate

π/2

∫ sin x / x dx

0

where we take the value of (sin x) / x at x=0 to be 1. - Sep 17th 2009, 10:35 AMCaptainBlack
See the PlanetMath article, the method is quite simple, if you have problems with that tell us what they are and we will help you with those specific problems.

CB - Sep 17th 2009, 10:46 AMjohnley
The thing I am having trouble with are the different conditions. The limits are from 0 to pi/2, but then what does it mean by saying "x=0 to be 1"?

- Sep 17th 2009, 11:26 AMjohnley
Ok, this is what I did and I'm pretty sure I did it right, but I am getting a different answer from what is in the solution's manual.

pi/48 * (f(0) + 4*f(pi/16) + 2*f(2*pi/16) + 4*f(3*pi/16) + 2*f(4*pi/16) + 4*f(5*pi/16) + 2*f(6*pi/16) + 4*f(7*pi/16) +f(8*pi/16) )

If I do all this, I get 0.026272 which is exactly what the answer would be if you integrated the problem, but the answer is supposed to be 1.37076. What am I doing wrong? - Sep 17th 2009, 12:00 PMCaptainBlack
- Sep 17th 2009, 12:02 PMjohnley
Sure, delta x is (pi/2)/8 * (1/3) = pi/48.

If I'm doing it wrong, please correct me as that very well could be where I went wrong. - Sep 17th 2009, 12:09 PMCaptainBlack
- Sep 17th 2009, 12:12 PMJameson
- Sep 17th 2009, 12:14 PMjohnley
Right. When I just calculated it with my values, I got an answer of 1.305314.

One thing that can be throwing off the answer is calculating the first term - f(0). Sin 0/0 is not possible, so is that where the "x=0 to be 1" condition comes in? (i.e plugging in 1 to the to the function instead of 0?) If that is the case, I get a closer number in 1.36038, but still not quite there. - Sep 17th 2009, 10:12 PMjohnley
Anyone?

- Sep 17th 2009, 10:19 PMCaptainBlack
You are giving us nothing new to go on to help identify the reason you are not getting the given answer.

As I said earlier check you arithmetic, with f(0)=1 the rest of the world gets the given answer.

Also I will say it again, make sure your calculator is in radian mode.

Attached is a image of the calculation in Excel

Attachment 12951

CB