1. ## Simpson's Approximation

I am not getting the correct answer for this so I'm sure I'm messing up some arithmetic or missing a step. Any help would be appreciated.

Use Simpson's Approx. for: $\displaystyle \int^1_0 \frac{tan(x)}{x}dx\;n=10$
$\displaystyle \frac{b-a}{n}= \frac {1-0}{10}=.1=\Delta x$
$\displaystyle \frac{\Delta x}{3}=\frac{1}{30}$

Plugging in 0,.1,.2,...,.9,1 into the function I get
$\displaystyle S_{10}=\frac{1}{30}(0+4(1.003)+2(1.0136)+4(1.0311) +2(1.0570)+4(1.0930)+2(1.1402)+4(1.2033)+2(1.2870) +4(1.4002)+1.5574)$

This equals roughly 1.11585

However, when I evaluate the integral

$\displaystyle \int^1_0 \frac{tan(x)}{x}dx$

I end up with 1.14915. Where is the discrepancy coming from? Thanks for the help!

2. ## Re: Simpson's Approximation

Originally Posted by Bowlbase
I am not getting the correct answer for this so I'm sure I'm messing up some arithmetic or missing a step. Any help would be appreciated.

Use Simpson's Approx. for: $\displaystyle \int^1_0 \frac{tan(x)}{x}dx\;n=10$
$\displaystyle \frac{b-a}{n}= \frac {1-0}{10}=.1=\Delta x$
$\displaystyle \frac{\Delta x}{3}=\frac{1}{30}$

Plugging in 0,.1,.2,...,.9,1 into the function I get
$\displaystyle S_{10}=\frac{1}{30}(0+4(1.003)+2(1.0136)+4(1.0311) +2(1.0570)+4(1.0930)+2(1.1402)+4(1.2033)+2(1.2870) +4(1.4002)+1.5574)$

This equals roughly 1.11585

However, when I evaluate the integral

$\displaystyle \int^1_0 \frac{tan(x)}{x}dx$

I end up with 1.14915. Where is the discrepancy coming from? Thanks for the help!
Reconsider the value of the integrand at x=0.

CB

3. ## Re: Simpson's Approximation

Tan(0)/0 should be 0 no? Or, at the very least, undefined.

I should add that I'm using a calculator and Wolframalpha alpha to evaluate. Is this just a reasonable amount of error from the approximation?

4. ## Re: Simpson's Approximation

Okay, I got it.

I needed to use limit as x approaches 0 = 1. That gets me a lot closer to the answer.