# Asymptotic Behaviour of the Remainder of Certain Alternating Series

Let $$a,b >0$$ be real constants. Empirical observation (as in: asking WolframAlpha) suggests

$$\lim_{n\to \infty} n \cdot \sum_{k=0}^\infty (\frac{1}{n+ak} - \frac{1}{n+b+ak}) = \frac{b}{a} \tag{*}$$

Note that the series in question can be interpreted as the "remainder" / "tail end" of a (conditionally!) convergent alternating series. To see what is going on, confirm that e.g. ($$a=3, b=1, n=1000$$)

$$1000 \cdot (\frac{1}{1000}-\frac{1}{1001}+\frac{1}{1003}-\frac{1}{1004}+\frac{1}{1006}-\frac{1}{1007} + \dots) \approx \frac{1}{3}$$

Questions:

1. Is there a better proof for $$(*)$$ than my attempt at the bottom of this question?
2. What references treat estimates for the asymptotic behaviour of "remainders" like the above? Would there be finer estimates, after subtracting the above error "of order $$1/n$$", of order $$1/n^2$$, $$1/n^3$$, ...?

Context: A student challenged me to (show existence of, and) find

$$\lim_{n\to \infty} n \cdot \int_0^{\frac{\pi}{4}}\tan^n(x) dx$$

Now the easy and well-known recursive formula

$$\int \tan^{n}(x)dx = \frac{1}{n-1}\tan^{n-1}(x) - \int \tan^{n-2}(x) dx$$

gives $$\int_0^{\frac{\pi}{4}}\tan^n(x) dx = \begin{cases} \frac{1}{n-1}-\frac{1}{n-3}+\frac{1}{n-5} - \dots \pm 1\mp \frac{\pi}{4} \text{ if } n \text{ even}\\ \frac{1}{n-1}-\frac{1}{n-3}+\frac{1}{n-5} - \dots \pm \frac{1}{2}\mp \frac{\ln(2)}{2} \text{ if } n \text{ odd}\end{cases}$$

This is a funny case distinction because of course $$\frac{\pi}{4} = 1-\frac{1}{3} +\frac{1}{5} \dots$$ (Leibniz-Madhava) while $$\frac{\ln(2)}{2} = \frac{1}{2}-\frac{1}{4}+\frac{1}{6} -\dots$$, so in both cases, the question becomes to estimate the "$$1/n$$-order" growth of the "tail end" of the series,

$$\lim_{n\to \infty} n \cdot (\frac{1}{n+1}-\frac{1}{n+3}+\frac{1}{n+5} \dots)$$

which by a slight adjustment of $$(*)$$ (for $$b=2, a=4$$) is $$\dfrac{1}{2}$$.

My own proof idea for $$(*)$$: By a standard estimate for convergent alternating series, for $$K$$ big enough (e.g. $$n+aK > n^2$$) we have

$$\sum_{k=0}^\infty (\frac{1}{n+ak} - \frac{1}{n+b+ak}) = \sum_{k=0}^K(\frac{1}{n+ak} - \frac{1}{n+b+ak}) + O \left(\frac{1}{n^2}\right)$$

and now that finite sum can be split up into its positive and negative terms, and we get

$$\sum_{k=0}^K \frac{1}{n+ak} - \sum_{k=0}^K \frac{1}{n+b+ak}\\ =\frac{1}{a} \left(\sum_{k=0}^K \frac{1}{\frac{n}{a}+k} - \sum_{k=0}^K \frac{1}{\frac{n+b}{a}+k} \right)\\ \stackrel{**}\approx \frac{1}{a} \left((\ln (\frac{n}{a}+K) -\ln(\frac{n}{a})) - (\ln(\frac{n+b}{a}+K) - \ln(\frac{n+b}{a})) \right) \\ = \frac{1}{a}\ln(\frac{n+b}{n}) + \frac{1}{a}\ln(\dfrac{\frac{n}{a}+K}{\frac{n+b}{a}+K})$$

Since we can choose $$K$$ as big as we want, the second term becomes irrelevant. So when we take the limit $$n\to \infty$$, the whole things behaves like $$\frac{n}{a}\ln(\frac{n+b}{n}) = \frac{1}{a}\ln((1+\frac{b}{n})^n)$$ which of course goes to $$\frac{b}{a}$$.

To justify $$**$$ up to $$O(\frac{1}{n^2})$$: Taylor expansion says that for big enough $$c$$ (namely, $$\frac{n}{a}+k$$ and $$\frac{n+b}{a}+k$$),

$$\ln(\frac{c+1}{c}) = \frac{1}{c} - \frac{1}{2c^2} + \frac{1}{3c^3} - \dots$$

so that

$$(\ln (\frac{n}{a}+K) -\ln(\frac{n}{a})) - (\ln(\frac{n+b}{a}+K) - \ln(\frac{n+b}{a})) - \left(\sum_{k=0}^K \frac{1}{\frac{n}{a}+k} - \sum_{k=0}^K \frac{1}{\frac{n+b}{a}+k}\right) \\ = -\frac{1}{2} \underbrace{\left( \sum_{k=0}^K \frac{1}{(\frac{n}{a}+k)^2} - \sum_{k=0}^K \frac{1}{(\frac{n+b}{a}+k)^2}\right)}_{<\frac{1}{(\frac{n}{a}+K)^2} \in O(1/n^2)} + \frac{1}{3}\underbrace{\left( \sum_{k=0}^K \frac{1}{(\frac{n}{a}+k)^3} - \sum_{k=0}^K \frac{1}{(\frac{n+b}{a}+k)^3}\right)}_{<\frac{1}{(\frac{n}{a}+K)^3} \in O(1/n^3)} +\dots$$

with the estimates in the bottom again by interpreting these as alternating series.

• Using $\frac{1}{t}=\int_{0}^{1}x^{t-1}dx$ (compare math.stackexchange.com/q/3561986/42969) you can express the sum nicely as an integral. Apr 15 at 5:05
• Just in case... denoting $E_k$ the Euler' numbers, $$\int_0^{\frac{\pi}{4}}\tan^n(x)\,dx\overset{x=\arctan t}{=}\int_0^1\frac{t^n}{1+t^2}dt\overset{t=e^{-x}}{=}\frac12\int_0^\infty\frac{e^{-nx}}{\cosh x}dx=\frac1{2n}\int_0^\infty\frac{e^{-x}}{\cosh \frac xn}dx$$ $$=\frac1{2n}\int_0^\infty e^{-x}\sum_{k=0}^\infty\frac{E_k}{k!}\left(\frac xn\right)^kdx\sim\frac1{2n}\sum_{k=0}^\infty\frac{E_k}{n^k}$$ Apr 15 at 9:06

Let $$a,b>0$$. Firstly, not that $$\frac{1}{{n + ak}} - \frac{1}{{n + b + ak}} = \int_0^{ + \infty } {\!\!\left( {{\rm e}^{ - (n + ak)t} - {\rm e}^{ - (n + b + ak)t} } \right){\rm d}t} = \int_0^{ + \infty } {\!\!{\rm e}^{ - akt}\! \left( {{\rm e}^{ - nt} - {\rm e}^{ - (n + b)t} } \right){\rm d}t}.$$ Hence, by interchanging the order of summation and integration and utilising the geometric series $$\sum\limits_{k = 0}^\infty {\left( {\frac{1}{{n + ak}} - \frac{1}{{n + b + ak}}} \right)} = \int_0^{ + \infty } {\frac{{{\rm e}^{ - nt} - {\rm e}^{ - (n + b)t} }}{{1 - {\rm e}^{ - at} }}{\rm d}t} = \int_0^{ + \infty } {{\rm e}^{ - nt} \frac{{1 - {\rm e}^{ - bt} }}{{1 - {\rm e}^{ - at} }}{\rm d}t} .$$ With the change of integration variables $$s=nt$$, we derive $$n\sum\limits_{k = 0}^\infty {\left( {\frac{1}{{n + ak}} - \frac{1}{{n + b + ak}}} \right)} = n\int_0^{ + \infty } {{\rm e}^{ - nt} \frac{{1 - {\rm e}^{ - bt} }}{{1 - {\rm e}^{ - at} }}{\rm d}t} = \frac{b}{a}\int_0^{ + \infty } {{\rm e}^{ - s} \cfrac{{\cfrac{{1 - {\rm e}^{ - bs/n} }}{{bs/n}}}}{{\cfrac{{1 - {\rm e}^{ - as/n} }}{{as/n}}}}{\rm d}s} .$$ Finally, by dominated convergence $$\mathop {\lim }\limits_{n \to + \infty } \frac{b}{a}\int_0^{ + \infty } {{\rm e}^{ - s} \cfrac{{\cfrac{{1 - {\rm e}^{ - bs/n} }}{{bs/n}}}}{{\cfrac{{1 - {\rm e}^{ - as/n} }}{{as/n}}}}{\rm d}s} = \frac{b}{a}\int_0^{ + \infty } {{\rm e}^{ - s} \cfrac{{\mathop {\lim }\limits_{n \to + \infty } \cfrac{{1 - {\rm e}^{ - bs/n} }}{{bs/n}}}}{{\mathop {\lim }\limits_{n \to + \infty } \cfrac{{1 - {\rm e}^{ - as/n} }}{{as/n}}}}{\rm d}s} = \frac{b}{a}\int_0^{ + \infty } {{\rm e}^{ - s} {\rm d}s} = \frac{b}{a}.$$

Addendum. By $$\S24.2$$(i), we have $$\frac{{1 - {\rm e}^{ - bt} }}{{1 - {\rm e}^{ - at} }} = \frac{1}{{at}}\left( {\frac{{ - at}}{{{\rm e}^{ - at} - 1}} - \frac{{ - at{\rm e}^{ - (b/a)at} }}{{{\rm e}^{ - at} - 1}}} \right) = \sum\limits_{k = 0}^\infty {( - a)^k (B_{k + 1} (b/a) - B_{k + 1} )\frac{{t^k }}{{(k + 1)!}}}$$ as $$t\to 0$$. Consequently, by Watson's lemma, \begin{align*} n\sum\limits_{k = 0}^\infty {\left( {\frac{1}{{n + ak}} - \frac{1}{{n + b + ak}}} \right)} & \sim \sum\limits_{k = 0}^\infty {( - a)^k \frac{{B_{k + 1} (b/a) - B_{k + 1} }}{{k + 1}}\frac{1}{{n^k }}} \\ & = \frac{b}{a}\left( {1 + \frac{{a - b}}{2}\frac{1}{n} + \frac{{a^2 - 3ab + 2b^2 }}{6}\frac{1}{{n^2 }} + \ldots } \right), \end{align*} as $$n\to+\infty$$.

• This is the cleanest answer so far, avoiding several problems from the other approach by modeling $\frac{1}{r}$ not with the integral $\int_0^1 x^{r-1} dx$ but with $\int_0^\infty e^{-rx} dx$ which is somewhat better behaved (although essentially that's a change of variable, and we're using the same geometric series). -- Do you have any leads regarding my question 2? Apr 20 at 4:55
• Regarding question 2, an asymptotic expansion in negative powers of $n$ follows from Watson's lemma. I will try to update my answer later today.
– Gary
Apr 20 at 6:14

To flesh out a comment by user Martin R:

Using $$\frac{1}{t} = \int_0^1 x^{t-1} dx$$ like in the answer to Calculate the sum $\sum_{n=0}^{\infty}\frac{1}{3n+2}-\frac{1}{3n+3}$, the series in question becomes, say

$$\frac{n}{a} \cdot \sum_{k=0}^\infty \int_0^1 x^{\frac{n}{a} +k-1} - x^{\frac{n+b}{a} +k-1} dx = \frac{n}{a} \cdot \sum_{k=0}^\infty \int_0^1 x^{\frac{n}{a} -1} \cdot (1-x^\frac{b}{a}) \cdot x^k dx$$

and using a justifiable change of the series and the integral, geometric series the $$\sum x^k = \frac{1}{1-x}$$ as well as

$$\dfrac{1-x^{\frac{b}{a}}}{1-x} = \dfrac{1+x+ \dots +x^{b-1}}{1+x^{\frac{b}{a}}+ x^{\frac{2b}{a}}+ \dots x^{\frac{b(a-1)}{a}} } =:g(x)$$

the expression becomes

$$= \frac{n}{a} \cdot \int_0^1 x^{\frac{n}{a} -1} \cdot g(x) dx \qquad (*)$$

But for $$x\to 1$$, $$g(x)$$ is basically $$\frac{b}{a}$$ and so the integral becomes $$\frac{n}{a} \cdot \frac{a}{n} \cdot \frac{b}{a} =b/a$$. To be slightly more precise, for any $$\varepsilon>0$$ there is $$c\in (0,1)$$ such that for $$x\in [c,1]$$ we have that $$|g(x) -\frac{b}{a}|<\varepsilon$$ so for all $$n$$,

$$\lvert \int_c^1 \frac{n}{a} x^{\frac{n}{a} -1} \cdot g(x) dx - (1-c^\frac{n}{a})\cdot \frac{b}{a} \rvert < (1-c)\varepsilon$$

and since for $$n\to \infty$$ also $$\int_0^c \frac{n}{a} x^{\frac{n}{a} -1} \cdot g(x) dx \to 0$$ and $$c^{\frac{n}{a}} \to 0$$, we can conclude that $$(*) \to \frac{b}{a}$$.