Maths WorkshopMaths problems with full solutions
Exercise 21Calculus › Single-variable calculus › Integration › Improper integralsL1Added 6 Nov 2026

An improper integral with exponentials

#improper integral#exponential#partial fraction

Statement

Compute
∫0+∞dx(1+ex)(1+e−x).\int_0^{+\infty}\frac{dx}{(1+e^x)(1+e^{-x})}.

Hint

Simplify the integrand by multiplying numerator and denominator by exe^x, then find an antiderivative of the form −11+ex\frac{-1}{1+e^x}.

Show solutionHide solution

Solution

Simplification. For every x∈Rx\in\mathbb{R},
1(1+ex)(1+e−x)=ex(1+ex)(ex+1)=ex(1+ex)2.\frac{1}{(1+e^x)(1+e^{-x})}=\frac{e^x}{(1+e^x)(e^x+1)}=\frac{e^x}{(1+e^x)^2}.
Indeed 1+e−x=ex+1ex1+e^{-x}=\frac{e^x+1}{e^x}, so (1+ex)(1+e−x)=(1+ex)2ex(1+e^x)(1+e^{-x})=\frac{(1+e^x)^2}{e^x}.

Antiderivative on [0,a][0,a]. For a>0a>0,
∫0aex(1+ex)2 dx=[−11+ex]0a=−11+ea+11+e0=12−11+ea.\int_0^a\frac{e^x}{(1+e^x)^2}\,dx=\left[-\frac{1}{1+e^x}\right]_0^a=-\frac{1}{1+e^a}+\frac{1}{1+e^0}=\frac{1}{2}-\frac{1}{1+e^a}.

Improper integral. The integrand is continuous and positive on [0,+∞[[0,+\infty[, and
∫0+∞dx(1+ex)(1+e−x)=lim⁡a→+∞(12−11+ea)=12.\int_0^{+\infty}\frac{dx}{(1+e^x)(1+e^{-x})}=\lim_{a\to+\infty}\left(\frac12-\frac{1}{1+e^a}\right) = \frac12.