# Formula to estimate sum to nearly correct : $\sum_{n=1}^\infty\frac{(-1)^n}{n^3}$

Estimate the sum correct to three decimal places : $$\sum_{n=1}^\infty\frac{(-1)^n}{n^3}$$

This problem is in my homework. I find that n = 22 when use Maple to solve this. (with some programming) But, in my homework, teacher said find the formula for this problem.

Thanks :)

-
Does that sum really start at $n=0$? – WimC Jun 10 '12 at 17:08

By the Alternating Series Test, the error to an alternating series with monotonically decreasing terms is the next term to be added. Thus, to get three decimal places, we would need to find an $n$ so that $n^3>2000$, which would be $n=13$. Thus, summing the first 12 terms should get you to within 3 decimal places.

-
To get 3 decimal places accuracy, don't we need $n^3> 10,000$? (And the cube root of 10,000 is indeed about 21.5.) – Ragib Zaman Jun 10 '12 at 15:53
Three decimal places would mean an error of less than $.0005=\frac{1}{2000}$. – robjohn Jun 10 '12 at 15:58
In practice here even 22 terms is not enough to get the correct result (rounded!) since $s(22)=-0.90149891\cdots$ and $s(23)=-0.90158110\cdots$ (23 is fine since $s(24)=-0.901508\cdots$ !). – Raymond Manzoni Jun 10 '12 at 16:02
@RaymondManzoni: That is true. To make sure the first $3$ decimal places are correct, it could require many more places to be computed to make sure that rounding and subsequent terms don't affect the first three digits. That is why I consider "to $3$ places" to mean "an error of less than $.0005$" (and this is simply my opinion). – robjohn Jun 10 '12 at 16:13
@benmachine: with the $n=0$ term, there are some problems :-) – robjohn Jun 10 '12 at 17:57

For alternating sums $\sum(-1)^n a_n$ with $a_n> 0$ strictly decreasing there is a simple means to estimate the remainder $\sum^\infty_{k=n} (-1)^k a_k$. You can just use $a_{n-1}$.

-

$$\sum_{n=1}^{\infty} \dfrac{(-1)^n}{n^3} = \sum_{k=1}^{\infty} \left(\dfrac{1}{k^3}-\dfrac{1}{(k+1)^3}\right)= \sum_{n=1}^{\infty} \left(\dfrac{(k+1)^3-k^3}{k^3(k+1)^3}\right)$$

$$= \sum_{k=1}^{\infty} \dfrac{(k+1-k)(k^2+k+1)}{k^3(k+1)^3}$$

$$= \sum_{k=1}^{\infty} \dfrac{k^2+k+1}{k^3(k+1)^3}$$



Note that for the sum to be accurate within 3 decimal planes the nth term must be less than 0.001

Therefore we have $$\dfrac{k^2+k+1}{k^3(k+1)^3} < \dfrac{1}{1000}$$

You will notice that answer can either be $2k$ or $2k+1$

I will think about it later, how to pin point it, I will have to go now, let me know what you guys think about it

Using wolfram you will find that $k=5.18$ satisfies the inequality

Therefore the smallest value of $k$ to satisfy the inequality will be $6$

And hence the answer can either be $12$ or $13$

In fact it should be $n=13$ terms, do you need me to explain that? Try thinking first, there is a clear logical reason for $n = 13$ and not $n=12$.

-

With a little bit of approximation, we can achieve the desired $5\times 10^{-4}$ accuracy with fewer terms.

Notice

$$\sum_{n=1}^\infty \frac{(-1)^n}{n^3} = -\left[\sum_{n=1}^{\infty}\frac{1}{n^3}- \sum_{n=1}^\infty\frac{2}{(2n)^3}\right] = -\frac34\sum_{n=1}^\infty \frac{1}{n^3} = -\frac34\zeta(3)$$

If we want to estimate the sum at the left accurate up to $5\times 10^{-4}$, it just suffices to estimate $\zeta(3)$ accurate up to $6.67\times 10^{-4}$. In the sum of $\zeta(3)$, if we pick a $m$ and replace $\displaystyle\;\frac{1}{n^3}$ by $\displaystyle\;\frac{1}{n^3-n}$ for $n \ge m$, the error introduced $\mathcal{E}_m$ is

$$\mathcal{E}_m =_{def} \sum_{n=m}^\infty\left(\frac{1}{n^3-n} - \frac{1}{n^3}\right) = \sum_{n=m}^\infty \frac{1}{(n^2-1)n^3} \le \frac{m^2}{m^2-1}\sum_{n=m}^\infty \frac{1}{n^5}$$ Since $\displaystyle\;\frac{1}{x^5}$ is a convex function, we have

$$\frac{1}{n^5} \le \int_{n-1/2}^{n+1/2} \frac{dx}{x^5} \quad\implies\quad \mathcal{E}_m \le \frac{m^2}{m^2-1}\int_{m-1/2}^\infty \frac{dx}{x^5} = \frac{m^2}{4(m^2-1)(m-1/2)^4}$$ For $m = 5$, we have $\displaystyle\;\mathcal{E}_5 = \frac{25}{39366} \approx 6.35\times 10^{-4}\;$. This is already good enough for our purposes. Notice

$$\sum_{n=m}^{\infty}\frac{1}{n^3-n} = \sum_{n=m}^{\infty}\frac{1}{(n-1)n(n+1)} = \sum_{n=m}^{\infty}\left(\frac{1}{2(n-1)n}-\frac{1}{2n(n+1)}\right) = \frac{1}{2(m-1)m}$$ We find the original sum is approximately equal to $$-\frac34 \left( 1 + \frac{1}{2^3} + \frac{1}{3^3} + \frac{1}{4^3} + \frac{1}{2\cdot 4\cdot5} \right) = -\frac{10391}{11520} \approx -0.90199653$$ with an error smaller than $5\times 10^{-4}$. Compare this with the exact value of the sum $\approx -0.90154268$, the difference $\approx -4.5385 \times 10^{-4}$ is indeed smaller than $5 \times 10^{-4}$.

-

I recommend the Euler–Maclaurin formula for this task. However, since this is the Dirichlet eta function there is a rich bounty of numerical approximations for the values + derivations of said approximations.

-
Although i think the Euler-Maclauring Sum Formula is wonderful, it might be a bit of overkill for the given problem. – robjohn Jun 10 '12 at 15:57

Averaging the 9th and 10th partial sums will do it, as in robjohn's answer and my comment there. Just for fun, as an alternative to alternating series methods, you could group consecutive terms to give a positive series and then use integral approximation.

\begin{align} S:=\sum_{n=1}^\infty\frac{(-1)^n}{n^3} &=-1+\sum_{n=1}^\infty\frac{1}{8n^3}-\frac{1}{(2n+1)^3}=-1+\sum_{n=1}^\infty f(n)\\ \end{align}

And then \begin{align} -1+\sum_{n=1}^{N}\frac{1}{8n^3}-\frac{1}{(2n+1)^3}+\int_{N}^\infty\frac{1}{8x^3}-\frac{1}{(2x+1)^3}\,dx<S<-1+\sum_{n=1}^N\frac{1}{8n^3}-\frac{1}{(2n+1)^3}+\int_{N-1}^\infty\frac{1}{8x^3}-\frac{1}{(2x+1)^3}\,dx\\ \end{align}

The difference between the outer bounds is \begin{align} \int_{N-1}^{N}\frac{1}{8x^3}-\frac{1}{(2x+1)^3}\,dx &=\left[{-{\frac1{16x^2}}}+\frac{1}{4(2x+1)^2}\right]_{N-1}^{N}\\ &={-{\frac1{16N^2}}}+\frac{1}{4(2N+1)^2}+{{\frac1{16(N-1)^2}}}-\frac{1}{4(2N-1)^2}\\ \end{align} We'd like this difference to be less than $0.001$. This way we could average the two outer bounds as an estimate for the sum and know that our estimate was within $0.0005$. This happens for $N=5$. So an estimate that will work out to within $0.0005$ is

$$\sum_{n=1}^{11}\frac{(-1)^n}{n^3}+\frac12\int_4^{5}\frac{1}{8x^3}-\frac{1}{(2x+1)^3}\,dx$$

which works out to

$$\sum_{n=1}^{11}\frac{(-1)^n}{n^3}+\frac{24209}{125452800}\approx-0.9016748\ldots$$

-