AP Calculus AB and BC

Integral of 1/(1+e^x): Answer and Trick

The integral of 1 over 1 plus e to the x is x minus the natural log of 1 plus e to the x, plus C. The trick is to write the numerator as 1 plus e to the x minus e to the x, which splits the fraction into 1 minus a piece whose numerator is the denominator's derivative.

11+exdx=xln(1+ex)+C\int \frac{1}{1+e^{x}}\,dx = x - \ln\left(1+e^{x}\right) + C

Add and subtract to split it

11+ex=(1+ex)ex1+ex=1ex1+ex\frac{1}{1+e^{x}} = \frac{\left(1+e^{x}\right) - e^{x}}{1+e^{x}} = 1 - \frac{e^{x}}{1+e^{x}}

The second piece now has the denominator's derivative on top, so it integrates to a logarithm and the first is trivial.

dx1+ex=xln(1+ex)+C\int \frac{dx}{1+e^{x}} = x - \ln\left(1+e^{x}\right) + C

The logistic connection

11+ex\frac{1}{1+e^{-x}} is the logistic function, and this integrand is its reflection. No absolute value is needed because 1+ex1+e^{x} is always positive.

Common mistakes

  • Splitting into 1dx\int 1\,dx over (1+ex)dx\int (1+e^{x})dx. There is no such rule.
  • Answering ln(1+ex)\ln\left(1+e^{x}\right) alone, forgetting the leading xx.

Every answer on this page is machine checked

An automated test differentiates the antiderivative above and confirms it returns the integrand. A wrong sign or a missing factor fails the build, so it cannot reach you.

Frequently asked questions

What is the integral of 1/(1+e^x)?

It is xln(1+ex)+Cx - \ln\left(1+e^{x}\right) + C.

What is the trick?

Write the numerator as (1+ex)ex\left(1+e^{x}\right) - e^{x}, which splits the fraction into 11 minus a logarithmic piece.