# Integrating for approximation of a sum

1. May 15, 2014

### goraemon

1. The problem statement, all variables and given/known data

Find an N so that $∑^{\infty}_{n=1}\frac{log(n)}{n^2}$ is between $∑^{N}_{n=1}\frac{log (n)}{n^2}$ and $∑^{N}_{n=1}\frac{log(n)}{n^2}+0.005.$

2. Relevant equations
Definite integration

3. The attempt at a solution
I began by taking a definite integral: $\int^{\infty}_{N}\frac{log(n)}{n^2}dn$ and, using integration by parts, arrived at the following answer: $\frac{log(N)+1}{N}$. (Is this right? If not, I could post the steps I used to try to see where I made an error)

Next we need $\frac{log(N)+1}{N}$ to be within 0.005 as given by the problem, so:

$\frac{log(N)+1}{N}=0.005=\frac{1}{200}$

But I'm having trouble how to solve for N algebraically. Would appreciate any help.

2. May 15, 2014

### BiGyElLoWhAt

I actually got -1 times what you have. remember: $\int \frac{1}{n^2} = -\frac{1}{n}$

3. May 15, 2014

### goraemon

Right but since we're taking a definite integral on the interval from N to ∞, and since $\frac{-log(N)-1}{N}$ as N approaches infinity equals zero, shouldn't the definite integral work out to:
$0-\frac{-log(N)-1}{N}=\frac{log(N)+1}{N}$?

4. May 15, 2014

### pasmith

The graph of $x^{-2}\log(x)$ has a maximum in $[1,2]$, so it's difficult to say whether the integral is an over-estimate or under-estimate of the sum. To be safe I'd require that $$\frac{\log(N) + 1}{N} < \frac{1}{400}$$.

Equations of that type have to be solved numerically. You're looking for zeroes in $x > 0$ of $$f(x) = \frac{x}{200} - 1 - \log x$$. The derivative of this function is $$f'(x) = \frac{1}{200} - \frac{1}{x}$$ so the second derivative ($x^{-2}$) is everywhere positive. There is a minimum at $x = 200$ where $f(200) < 0$. Since $f(x) \to +\infty$ as $x \to 0$ or $x \to \infty$ there are exactly two solutions. Logic dictates you want the larger, since if $N$ works then any larger $M$ should also work.

5. May 15, 2014

### goraemon

Thanks, I tried solving it numerically and came up with N = 1687, which the textbook confirms is correct.