MHB What's Wrong with My Approach to This Integral?

Saitama
Messages
4,244
Reaction score
93
Problem:
$$\int_0^{\infty} \frac{1}{x}\left(\frac{1}{1+e^x}-\frac{1}{1+e^{2x}}\right)\,dx$$

Attempt:
I use the following two series expansions:
$$\frac{1}{1+e^x}=\frac{e^{-x}}{1+e^{-x}}=e^{-x}\sum_{k=0}^{\infty} (-1)^k e^{-kx}=\sum_{k=0}^{\infty} (-1)^k e^{-(k+1)x}$$
$$\frac{1}{1+e^{2x}}=\sum_{k=0}^{\infty} (-1)^k e^{-2x(k+1)}$$
Hence, the given definite integral can be written as:
$$\int_0^{\infty} \frac{1}{x}\left(\sum_{k=0}^{\infty} (-1)^k e^{-x(k+1)}-\sum_{k=0}^{\infty} (-1)^k e^{-2x(k+1)}\right)\,dx$$
$$=\sum_{k=0}^{\infty} (-1)^k\int_0^{\infty} \frac{e^{-x(k+1)}-e^{-2x(k+1)}}{x}\,dx$$
Use the substitution, $x(k+1)=t$ to get the following definite integral:
$$=\sum_{k=0}^{\infty} (-1)^k \int_0^{\infty} \frac{e^{-t}-e^{-2t}}{t}\,dt$$
$$=\ln 2 \sum_{k=0}^{\infty} (-1)^k$$
The sum $\displaystyle \sum_{k=0}^{\infty} (-1)^k$ is divergent but W|A gives a nice answer to the above definite integral. What's wrong with my approach?

Any help is appreciated. Thanks!
 
Physics news on Phys.org
Pranav said:
$$\frac{1}{1+e^{2x}}=\sum_{k=0}^{\infty} (-1)^k e^{-2x(k+1)}$$

This is not a valid series expansion in the specified interval since we require that $|e^{2x}| \leq 1$ which is not true in $$(0, \infty ) $$
 
I'll provide you with another way to solve the problem

To solve $I$ let

$$I(s)=\int^\infty_0\frac{x^{s-1}}{1+e^x}\,dx-\frac{1}{2^s}\int^\infty_0\frac{x^{s-1}}
{1+e^{x}}\,dx$$

Notice that the eta function is defined as $\eta(s)$ where

$$\eta(s)\Gamma(s)=\int^\infty_0\frac{x^{s-1}}{e^x+1}\,dx$$

$$I(s)=\Gamma(s)\eta(s)-\frac{\Gamma(s)\eta(s)}{2^s}=\left( 1-\frac{1}{2^s}\right)\eta(s)\Gamma(s)$$

Now use that

$$\eta(s)=(1-2^{1-s})\zeta(s)$$

$$I=\lim_{s\to 0}I(s)=\lim_{s \to 0}\frac{(1-2^{1-s})\left( 1-\frac{1}{2^s}\right)\zeta(s)}{s}=\frac{1}{2}\lim_{s \to 0}\frac{1-2^{-s}}{s}=\frac{\ln(2)}{2}$$

where we use that $\zeta(0)=\frac{-1}{2}$ and $\Gamma(s+1)=s\Gamma(s)$

To know more about zeta, gamma and eta look at my integration lessons.
 
ZaidAlyafey said:
This is not a valid series expansion in the specified interval since we require that $|e^{2x}| \leq 1$ which is not true in $$(0, \infty ) $$

I don't see anything wrong with the series expansion.
$$\frac{1}{1+e^{2x}}=\frac{e^{-2x}}{1+e^{-2x}}=e^{-2x}\sum_{k=0}^{\infty} (-1)^ke^{-2kx}=\sum_{k=0}^{\infty}(-1)^k e^{-2x(k+1)}$$
What is wrong with above?
 
Pranav said:
I don't see anything wrong with the series expansion.
$$\frac{1}{1+e^{2x}}=\frac{e^{-2x}}{1+e^{-2x}}=e^{-2x}\sum_{k=0}^{\infty} (-1)^ke^{-2kx}=\sum_{k=0}^{\infty}(-1)^k e^{-2x(k+1)}$$
What is wrong with above?

Sorry, I missed that step.

The problem is with interchanging the integral with sum which doesn't always hold. Consider the following

$$\int^\infty_0\frac{\sin(x)}{x} \, dx \neq \sum_{n\geq 0}\frac{(-1)^n}{(2n+1)!} \int ^\infty_0x^{2n+1}\,dx$$

But the integral on the right diverges so we cannot always interchange.
 
ZaidAlyafey said:
The problem is with interchanging the integral with sum which doesn't always hold. Consider the following

$$\int^\infty_0\frac{\sin(x)}{x} \, dx \neq \sum_{n\geq 0}\frac{(-1)^n}{(2n+1)!} \int ^\infty_0x^{2n+1}\,dx$$

But the integral on the right diverges so we cannot always interchange.

That makes sense, thank you! :)

But now, how to solve the problem? Is there no other way to solve it besides the way you have shown?

BTW, using this gives the right answer.
 
Maybe there is a way using differentiation under the integral sign. But believe it or not the idea will be the same as the answer above but more elementary and using less (weird) symbols.
 
ZaidAlyafey said:
Maybe there is a way using differentiation under the integral sign. But believe it or not the idea will be the same as the answer above but more elementary and using less (weird) symbols.

Thanks ZaidAlyafey for all the help. :)
 
My first thought was to integrate on $[b, \infty)$ and then take the limit at the very end.

But even that doesn't seem to be justified by Fubini's theorem.

criterion for interchanging summation and integration | planetmath.org


EDIT: On second thought, it does seem justified.$ \displaystyle |(-1)^{k} \frac{e^{-x(k+1)}}{x}| \le \frac{e^{-x(k+1)}}{x} $

$\displaystyle \sum_{k=0}^{\infty} \frac{e^{-x(k+1)}}{x} < \infty$

and $ \displaystyle\sum_{k=0}^{\infty} \int_{b}^{\infty}\frac{e^{-x(k+1)}}{x} \ dx < \infty$ (at least according to Maple)
 
Last edited:
  • #10
Random Variable said:
[/URL]
EDIT: On second thought, it does seem justified according to the theorem.

$ \displaystyle |(-1)^{k} \frac{e^{-x(k+1)}}{x}| \le \frac{e^{-x(k+1)}}{x} $

$\displaystyle \sum_{k=0}^{\infty} \frac{e^{-x(k+1)}}{x} < \infty$

and $ \displaystyle\sum_{k=0}^{\infty} \int_{b}^{\infty}\frac{e^{-x(k+1)}}{x} \ dx < \infty$

I have no idea what is going on here, I haven't learned this yet. Maybe I can return to this thread someday when I learn this stuff. :)

Thanks Random Variable!
 
  • #11
Pranav

I'm looking for justification to switch the order of integration and summation.

According to Fubini's theorem, the problem seems to be $x=0$.

To get around that you could seemingly evaluate

$$ \lim_{b \to 0^{+}}\int_b^{\infty} \frac{1}{x}\left(\sum_{k=0}^{\infty} (-1)^k e^{-x(k+1)}-\sum_{k=0}^{\infty} (-1)^k e^{-2x(k+1)}\right)\,dx$$

and take the limit at the very end.

But that wouldn't be fun.
 
Last edited:
  • #12
And the convergence of $

\displaystyle\sum_{k=0}^{\infty} \int_{b}^{\infty}\frac{e^{-x(k+1)}}{x} \ dx $ could be shown using the asymptotic expansion of the incomplete gamma function $\Gamma(0,x)$ at infinity.OK. I'm done. Sorry about all the edits. (Sadface)
 
Last edited:
  • #13
Random Variable said:
Accorinding to Fubini's theorem, the problem seems to be $x=0$.
I don't know about Fubini's theorem.
To get around that you could seemingly evaluate

$$ \lim_{b \to 0^{+}}\int_b^{\infty} \frac{1}{x}\left(\sum_{k=0}^{\infty} (-1)^k e^{-x(k+1)}-\sum_{k=0}^{\infty} (-1)^k e^{-2x(k+1)}\right)\,dx$$
Can I interchange the summation and the integral? If so, I get the following definite integral (I am not writing the summation symbol):

$$\int_{b(k+1)}^{\infty} \frac{e^{-t}-e^{-2t}}{t}\,dt$$

How do I evaluate this? :confused:

Random Variable said:
And the convergence of $

\displaystyle\sum_{k=0}^{\infty} \int_{b}^{\infty}\frac{e^{-x(k+1)}}{x} \ dx $ could be shown using the asymptotic expansion of the incomplete gamma function $\Gamma(0,x)$ at infinity.
Okay, I give up. :p
 
  • #14
Yes, you can interchange. But don't try to do it this way. I was just showing what you would have to do in theory.
 
  • #15
Pranav said:
$$=\sum_{k=0}^{\infty} (-1)^k \int_0^{\infty} \frac{e^{-t}-e^{-2t}}{t}\,dt$$
$$=\ln 2 \sum_{k=0}^{\infty} (-1)^k$$

How did you find this?
$$\int_0^{\infty} \frac{e^{-t}-e^{-2t}}{t}\,dt = \ln 2$$
 
  • #16
$ \displaystyle\int_{0}^{\infty} \frac{e^{-x}-e^{-2x}}{x} \ dx = \int_{0}^{\infty}\int_{1}^{2} e^{-xt} \ dt \ dx = \int_{1}^{2} \int_{0}^{\infty} e^{-tx} \ dx \ dt $

since the integrand is always nonnegative

$ \displaystyle= \int_{1}^{2} \frac{1}{t}\ dt = \ln 2$
 
  • #17
Random Variable said:
$ \displaystyle\int_{0}^{\infty} \frac{e^{-x}-e^{-2x}}{x} \ dx = \int_{0}^{\infty}\int_{1}^{2} e^{-xt} \ dt \ dx = \int_{1}^{2} \int_{0}^{\infty} e^{-tx} \ dx \ dt $

since the integrand is always nonnegative

$ \displaystyle= \int_{1}^{2} \frac{1}{t}\ dt = \ln 2$

Nice! :)

Hmm... okay... so I think we have...

\begin{aligned}
I &= \lim_{b \to 0^+} \sum_k (-1)^k \int_1^2 \int_{b(k+1)}^\infty e^{-tx} dx dt \\
&= \lim_{b \to 0^+} \sum_k (-1)^k \int_1^2 \frac{e^{-tb(k+1)}} t dt \\
&= \lim_{b \to 0^+} \int_1^2 \frac 1 t \sum_k (-1)^k e^{-tb(k+1)} dt \\
&= \lim_{b \to 0^+} \int_1^2 \frac 1 t \frac {e^{-tb}}{1 + e^{-tb}} dt \\
&= \int_1^2 \frac 1 t \lim_{b \to 0^+} \frac {e^{-tb}}{1 + e^{-tb}} dt \\
&= \int_1^2 \frac 1 {2t} dt \\
&= \frac 1 2 \ln 2
\end{aligned}
 
  • #18
I like Serena said:
Nice! :)

Hmm... okay... so I think we have...

\begin{aligned}
I &= \lim_{b \to 0^+} \sum_k (-1)^k \int_1^2 \int_{b(k+1)}^\infty e^{-tx} dx dt \\
&= \lim_{b \to 0^+} \sum_k (-1)^k \int_1^2 \frac{e^{-tb(k+1)}} t dt \\
&= \lim_{b \to 0^+} \int_1^2 \frac 1 t \sum_k (-1)^k e^{-tb(k+1)} dt \\
&= \lim_{b \to 0^+} \int_1^2 \frac 1 t \frac {e^{-tb}}{1 + e^{-tb}} dt \\
&= \int_1^2 \frac 1 t \lim_{b \to 0^+} \frac {e^{-tb}}{1 + e^{-tb}} dt \\
&= \int_1^2 \frac 1 {2t} dt \\
&= \frac 1 2 \ln 2
\end{aligned}

Nice. It never crossed my mind to do that.
 
  • #19
I like Serena said:
How did you find this?
$$\int_0^{\infty} \frac{e^{-t}-e^{-2t}}{t}\,dt = \ln 2$$

Random Variable said:
$ \displaystyle\int_{0}^{\infty} \frac{e^{-x}-e^{-2x}}{x} \ dx = \int_{0}^{\infty}\int_{1}^{2} e^{-xt} \ dt \ dx = \int_{1}^{2} \int_{0}^{\infty} e^{-tx} \ dx \ dt $

since the integrand is always nonnegative

$ \displaystyle= \int_{1}^{2} \frac{1}{t}\ dt = \ln 2$

I solved it by using differentiation under the integral sign.
$$I(a)=\int_0^{\infty} \frac{e^{-x}-e^{-ax}}{x}\,dx$$
$$\Rightarrow I'(a)=\int_0^{\infty} e^{-ax}\,dx$$
$$\Rightarrow I'(a)=\frac{1}{a} \Rightarrow I(a)=\ln a +C$$
Since I(1)=0, C=0, hence
$$\Rightarrow I(a)=\ln a \Rightarrow I(2)=\ln 2$$

I like Serena said:
Nice! :)

Hmm... okay... so I think we have...

\begin{aligned}
I &= \lim_{b \to 0^+} \sum_k (-1)^k \int_1^2 \int_{b(k+1)}^\infty e^{-tx} dx dt \\
&= \lim_{b \to 0^+} \sum_k (-1)^k \int_1^2 \frac{e^{-tb(k+1)}} t dt \\
&= \lim_{b \to 0^+} \int_1^2 \frac 1 t \sum_k (-1)^k e^{-tb(k+1)} dt \\
&= \lim_{b \to 0^+} \int_1^2 \frac 1 t \frac {e^{-tb}}{1 + e^{-tb}} dt \\
&= \int_1^2 \frac 1 t \lim_{b \to 0^+} \frac {e^{-tb}}{1 + e^{-tb}} dt \\
&= \int_1^2 \frac 1 {2t} dt \\
&= \frac 1 2 \ln 2
\end{aligned}

Great! Thanks a lot ILS! :) (Bow)
 
Back
Top