# How to evaluate $\sum\limits_{k=0} ^{\infty} \frac{(-1)^k}{4k+3}$?

I was trying to solve the integral $$\int_0 ^{\frac{\pi}{4}} \sqrt{\tan{x}}dx$$ and I noticed I can do the following:

$$\int_0 ^{\frac{\pi}{4}} \sqrt{\tan{x}}dx=\int_0 ^{\frac{\pi}{4}} \sqrt{\tan{x}} \sec^2(x) -\int_0 ^{\frac{\pi}{4}} \sqrt{\tan{x}} \tan^2(x) dx$$ $$=\int_0 ^{\frac{\pi}{4}} \sqrt{\tan{x}} \sec^2(x) -\int_0 ^{\frac{\pi}{4}} \tan^{2+\frac{1}{2}}(x) \sec^2(x)dx + \int_0 ^{\frac{\pi}{4}} \tan^{4+\frac{1}{2}}(x)$$ continue with that and we will get $$\int_0 ^{\frac{\pi}{4}} \sqrt{\tan{x}}dx=\sum_{k=0}^n \left(\int_0 ^{\frac{\pi}{4}} \tan^{2k+\frac{1}{2}}(x) \sec^2(x)dx \right) + (-1)^{n+1}\int_0 ^{\frac{\pi}{4}} \tan^{2n+2+\frac{1}{2}}(x) dx$$ since for any converging positive sequence $$a_n$$ $$(\sum a_k)^n >\sum (a_k ^n)$$ $$\int_0 ^{\frac{\pi}{4}} \tan^{n}(x) dx <\left( \int_0 ^{\frac{\pi}{4}} \tan(x) dx \right) ^n \to 0$$ so we get $$\int_0 ^{\frac{\pi}{4}} \sqrt{\tan{x}}dx=2 \ \lim_{n \to \infty } \sum_{k=0} ^ n \frac{(-1)^k}{4k+3}=\frac{\pi +\ln{(3-2 \sqrt{2})}}{2 \sqrt{2}}$$

I don't know if my approach is correct or not but even if it is correct I am interested in finding out if there are any other more obvious ways to evaluate $$\sum\limits_{k=0} ^{\infty} \frac{(-1)^k}{4k+3}$$ as my approach is very difficult to notice if try to solve $$\sum\limits_{k=0} ^{\infty} \frac{(-1)^k}{4k+3}$$ without any mention of the integral.

another question can we generalise this result for all $$m \in \mathbb{R}$$ st $$m>1$$ $$\int_0 ^{\frac{\pi}{4}} \left(\tan{x} \right)^{\frac{1}{m}} dx=m \ \sum_{k=0} ^ {\infty } \frac{(-1)^k}{2mk+m+1}$$

• Is there a reason you are writing $\lim_{n \to \infty } \sum_{k=0} ^ n \frac{(-1)^k}{4k+3}$ instead of the usual easier notation $\sum_{k=0} ^ \infty \frac{(-1)^k}{4k+3}$? Oct 29, 2023 at 19:56
• Your argument to prove that $\displaystyle \lim_{n\rightarrow \infty}\int_0 ^{\frac{\pi}{4}} \tan^{n}(x) dx=0$ is not good but this limit is, indeed, $0$.
– FDP
Oct 31, 2023 at 2:59
• @FDP I noticed that it is not complete and I don't know how to fix it maybe you can help me with that
– pie
Oct 31, 2023 at 3:01
• If $\displaystyle J_n=\int_0 ^{\frac{\pi}{4}} \tan^{n}(x) dx$, to prove that $\displaystyle \lim_{n\rightarrow \infty}J_n=0$, perform the change of variable $u=\tan x$, you get $\displaystyle J_n=\int_0^1 \frac{x^n}{1+x^2}dx$. Now, the integrand is bound by $x^n$ so $\displaystyle 0\leq J_n\leq \int_0^1 x^ndx$ the latter integral is $\dfrac{1}{n+1}$
– FDP
Oct 31, 2023 at 3:08
• @FDP thank you very much
– pie
Oct 31, 2023 at 5:28

One way is to use the power series trick: For $$1\leq m, we have

\begin{align} S(m,n)&:=\sum_{k=0}^\infty\frac{(-1)^k}{nk+m}\\[.4em] &=\sum_{k=0}^\infty\int_0^1(-1)^kx^{nk+m-1}dx\\[.4em] &=\int_0^1x^{m-1}\sum_{k=0}^\infty(-x^n)^kdx\\[.4em] &=\int_0^1\frac{x^{m-1}}{x^n+1}dx. \end{align}

Now for your generalisation, taking $$(m,n)=(m+1,2m)$$ leads to

$$S(m+1,2m)=\int_0^1\frac{x^m}{x^{2m}+1}dx=\frac1m\int_0^{\pi/4}(\tan u)^\frac1mdu$$

where the second step is by the substitution $$x=(\tan u)^\frac1m$$.

If $$1\leq m are integers, we can evaluate the integral using digamma function $$\psi$$, that is,

\begin{align} S(m,n)&=\frac1{2n}\left(\psi\left(\frac{m+n}{2n}\right)-\psi\left(\frac{m}{2n}\right)\right)\\ &=\frac\pi{2n}\csc\left(\frac{m\pi}n\right)+\frac2n\sum_{k=1}^{n-1}\ln\left(\csc\left(\frac{k\pi}{2n}\right)\right)\sin\left(\frac{mk\pi}n+\frac{k\pi}2\right)\sin\left(\frac{k\pi}2\right). \end{align}

For the first equality you can find a proof in this post, and for the second we use Gauss's digamma theorem with a few trig identities.

$$\begin{gathered} \sum\limits_{k = 0}^\infty {\frac{{{{\left( { - 1} \right)}^k}}}{{4k + 3}} = } \sum\limits_{k = 0}^\infty {{{\left( { - 1} \right)}^k}\int\limits_0^1 {{x^{4k + 2}}dx} = } \int\limits_0^1 {\left( {\sum\limits_{k = 0}^\infty {{{\left( { - 1} \right)}^k}{x^{4k + 2}}} } \right)dx} \hfill \\ = \int\limits_0^1 {\frac{{{x^2}}}{{1 + {x^4}}}dx} = \frac{1}{2}\int\limits_0^1 {\frac{{2{x^2}}}{{1 + {x^4}}}dx} = \frac{1}{2}\int\limits_0^1 {\frac{{{x^2} + 1}}{{1 + {x^4}}}dx} + \frac{1}{2}\int\limits_0^1 {\frac{{{x^2} - 1}}{{1 + {x^4}}}dx} \hfill \\ = \frac{1}{2}\int\limits_0^1 {\frac{{1 + \frac{1}{{{x^2}}}}}{{\frac{1}{{{x^2}}} + {x^2}}}dx} + \frac{1}{2}\int\limits_0^1 {\frac{{1 - \frac{1}{{{x^2}}}}}{{\frac{1}{{{x^2}}} + {x^2}}}dx} = \frac{1}{2}\int\limits_0^1 {\frac{1}{{{{\left( {x - \frac{1}{x}} \right)}^2} + 2}}d\left( {x - \frac{1}{x}} \right)} + \frac{1}{2}\int\limits_0^1 {\frac{1}{{{{\left( {x + \frac{1}{x}} \right)}^2} - 2}}d\left( {x + \frac{1}{x}} \right)} \hfill \\ = \left. {\frac{1}{2}\frac{1}{{\sqrt 2 }}\arctan \left( {\frac{1}{{\sqrt 2 }}\left( {x - \frac{1}{x}} \right)} \right)} \right|_0^1 + \left. {\frac{1}{2}\frac{1}{{2\sqrt 2 }}\ln \left| {\left. {\frac{{\sqrt 2 - x - \frac{1}{x}}}{{\sqrt 2 + x + \frac{1}{x}}}} \right|} \right.} \right|_0^1 \hfill \\ = \frac{1}{2}\frac{1}{{\sqrt 2 }}\frac{\pi }{2} + \frac{1}{2}\frac{1}{{2\sqrt 2 }}\ln \left( {3 - 2\sqrt 2 } \right) = \frac{\pi }{{4\sqrt 2 }} + \frac{1}{{2\sqrt 2 }}\ln \left( {\sqrt 2 - 1} \right) \hfill \\ \end{gathered}$$

\begin{align}J&=\int_0^{\frac{\pi}{4}}\sqrt{\tan x}dx\\ &\overset{u=\sqrt{\tan x}}=\int_0^1\frac{2u^2}{1+u^4}du\\ &=\int_0^1 \left(2u^2\sum_{n=0}^\infty (-1)^nu^{4n}\right)du\\ &=2\int_0^1 \left(u^2\sum_{n=0}^\infty (-1)^nu^{4n+2}\right)du\\ &=2\sum_{n=0}^\infty(-1)^n\left(\underbrace{\int_0^1 u^{4n+2}du}_{=\frac{1}{4n+3}}\right)\\ &=2\sum_{n=0}^\infty\frac{(-1)^n}{4n+3}\\ \end{align} On the other hand, \begin{align}K&=\int_0^1 \frac{u^2}{1+u^4}du\\&\overset{z=\frac{1}{u}}=\int_1^{\infty}\frac{1}{1+z^4}dz\\ 2K&=\int_0^1 \frac{u^2}{1+u^4}du+\int_0^{\infty}\frac{1}{1+z^2}dz-\int_0^1\frac{1}{1+z^4}dz\\ &=\int_0^1 \frac{u^2-1}{1+u^4}du+\underbrace{\int_0^\infty\frac{1}{1+z^4}dz}_{=L}\\ L&\overset{w=\frac{1}{z}}=\int_0^\infty \frac{w^2}{1+w^4}dw\\ 4K&=2\int_0^1 \frac{u^2-1}{1+u^4}du+\int_0^\infty\frac{1+z^2}{1+z^4}dz\\ &=2\underbrace{\int_0^1 \frac{1-\frac{1}{u^2}}{\left(u+\frac{1}{u}\right)^2-2}du}_{w=u+\frac{1}{u}}+\underbrace{\int_0^\infty\frac{1+\frac{1}{z^2}}{\left(z-\frac{1}{z}\right)^2+2}dz}_{w=z-\frac{1}{z}}\\ &=-2\int_2^\infty\frac{1}{w^2-2}dw+\int_{-\infty}^{+\infty}\frac{1}{w^2+2}dw\\ &=-\frac{1}{\sqrt{2}}\left[\ln\left(\frac{w-\sqrt{2}}{w+\sqrt{2}}\right)\right]_2^{\infty}+\frac{1}{\sqrt{2}}\left[\arctan\left(\frac{w}{\sqrt{2}}\right)\right]_{-\infty}^{+\infty}\\ &\boxed{K=\frac{1}{4\sqrt{2}}\ln\left(\frac{\sqrt{2}-1}{\sqrt{2}+1}\right)+\frac{\pi}{4\sqrt{2}}}\\ \end{align}

Therefore, \begin{align}\boxed{J=\frac{1}{2\sqrt{2}}\ln\left(\frac{\sqrt{2}-1}{\sqrt{2}+1}\right)+\frac{\pi}{2\sqrt{2}}}\\ \boxed{\sum_{n=0}^\infty\frac{(-1)^n}{4n+3}=\frac{1}{4\sqrt{2}}\ln\left(\frac{\sqrt{2}-1}{\sqrt{2}+1}\right)+\frac{\pi}{4\sqrt{2}}} \end{align}

PS: Sorry,i have just observed my solution is the same than the one of OnTheWay.