Welcome to our community

Be a part of something great, join today!

Solve the following integral

ZaidAlyafey

Well-known member
MHB Math Helper
Jan 17, 2013
1,667
$$ \int^{\infty}_0 \frac{\tanh(x) }{xe^x} \, dx $$

$\tanh(x) \text{ is the tangent hyperbolic function }$
 

sbhatnagar

Active member
Jan 27, 2012
95
Cool Problem!(Drunk)

I will solve this using differentiation under the integral sign.

The integral can be written in another form

$$ \int_0^\infty \frac{\tanh(x)}{x e^x}dx = \int_0^1 \frac{t^2-1}{(t^2+1)\ln t}dt$$

Let us define

$$ I(\alpha) = \int_0^1 \frac{t^\alpha-1}{(t^2+1)\ln t}dt$$

$$\begin{aligned} I'(\alpha) &= \int_0^1 \frac{t^\alpha}{t^2+1}dt \\ &= \int_0^1 t^\alpha \sum_{k=0}^{\infty}(-1)^k t^{2k} \ dt \\ &= \sum_{k=0}^\infty (-1)^k \int_0^1 t^{\alpha + 2k}\ dt \\ &= \sum_{k=0}^\infty \frac{(-1)^k}{\alpha +2k+1} \\ &= \frac{1}{\alpha+1}\sum_{k=0}^\infty \frac{(-1)^k}{1+\left( \dfrac{2}{\alpha + 1}\right)k} \\ &= \frac{1}{4}\left\{ \psi \left( \frac{3+\alpha}{4} \right)-\psi \left( \frac{1+\alpha}{4} \right) \right\}\end{aligned}$$

\(\psi (*)\) is the Digamma Function.

$$\begin{aligned} I(\alpha) &= \frac{1}{4}\int \left\{ \psi \left( \frac{3+\alpha}{4} \right)-\psi \left( \frac{1+\alpha}{4} \right) \right\} d\alpha \\ &= \left(\ln \left( \Gamma \left( \frac{3+\alpha}{4}\right)\right)- \ln \left( \Gamma \left( \frac{1+\alpha}{4}\right)\right)\right)+C \end{aligned}$$

By letting \(\alpha = 0\), we obtain

$$ C= \ln \left( \frac{\Gamma \left( \dfrac{1}{4}\right)}{\Gamma \left( \dfrac{3}{4}\right)}\right)$$

Therefore

$$ \begin{aligned} I(\alpha)&= \ln \left( \frac{\Gamma \left( \dfrac{3+\alpha}{4}\right)}{\Gamma \left( \dfrac{1+\alpha}{4}\right)}\right)+\ln \left( \frac{\Gamma \left( \dfrac{1}{4}\right)}{\Gamma \left( \dfrac{3}{4}\right)}\right) \\ &= \ln \left( \frac{\Gamma \left( \dfrac{3+\alpha}{4}\right) \Gamma \left( \dfrac{1}{4}\right)}{\Gamma \left( \dfrac{1+\alpha}{4}\right) \Gamma \left( \dfrac{3}{4}\right)}\right)\end{aligned} $$

Our integral is a special case when \(\alpha = 2\), therefore

$$ I(2) = \int_0^1 \frac{t^2-1}{(t^2+1)\ln t}dt = $$

$$\ln \left( \frac{\Gamma \left( \dfrac{5}{4}\right) \Gamma \left( \dfrac{1}{4}\right)}{\Gamma \left( \dfrac{3}{4}\right)^2} \right) = {2\ln \left( \frac{2\Gamma \left(\dfrac{5}{4} \right)}{\Gamma \left( \dfrac{3}{4}\right)}\right)}$$
 

topsquark

Well-known member
MHB Math Helper
Aug 30, 2012
1,123
I will solve this using differentiation under the integral sign.
I thought only Physicists were allowed to do that! Of course we rarely check to see if we can....

-Dan
 

sbhatnagar

Active member
Jan 27, 2012
95
Here's another method to do it without using differentiation under the integral sign.

$$ \begin{aligned} I &= \int_0^1 \frac{t^2-1}{(t^2+1) \ln(t)}dt \\
&= \int_0^1 \frac{t+1}{t^2+1}\frac{t-1}{\ln(t)}dt \\
&= \int_0^1 \frac{t+1}{t^2+1} \int_0^1 t^x dx \ dt \\
&= \int_0^1 \int_0^1 \frac{t^{x+1}+t^x}{t^2+1}dt \ dx \\
&= \int_0^1 \int_0^1 (t^{x+1}+t^x)\sum_{n=0}^{\infty}(-1)^n t^{2k} dt \ dx \\
&= \int_0^1 \left( \frac{1}{x+1}+\frac{1}{x+2}-\frac{1}{x+3}-\frac{1}{x+4}+\cdots \right)dx \\
&=\ln\left(\frac{2}{1} \right)+\ln\left(\frac{3}{2} \right)-\ln\left(\frac{4}{3} \right)-\ln\left(\frac{5}{4} \right)+\cdots \\
&= \ln \left[ \prod_{k=0}^{\infty}\frac{(4k+3)^2}{(4k+1)(4k+5)} \right] \\
&= \ln \left[ \prod_{k=0}^{\infty}\frac{(k+\frac{4}{3})^2}{(k+ \frac{1}{4} )(k+\frac{5}{4})}\right]
\end{aligned}$$

This product can be tackled using the formula

$$ \prod_{k=0}^{\infty} \frac{(k+a_1)(k+a_2)(k+a_3) \cdots (k+a_j)}{(k+b_1)(k+b_2)(k+b_3) \cdots (k+b_j)} = \frac{\Gamma(b_1) \Gamma(b_2) \Gamma(b_3) \cdots \Gamma (b_j)}{\Gamma(a_1) \Gamma(a_2) \Gamma(a_3) \cdots \Gamma (a_j)}$$

where $a_1+a_2+\cdots +a_j = b_1+b_2+\cdots +b_j$ and no $b_j$ is 0 or a negative integer. Applying this gives

$$ I= \ln \left( \dfrac{\Gamma \left( \frac{1}{4}\right)\Gamma \left( \frac{5}{4}\right)}{\Gamma \left( \frac{3}{4}\right)^2}\right)$$