Calc21 Atlas

Sophomore's Dream

updated 2026-11-27

An integral that turns into a sum that looks like a typo. It is true, and Johann Bernoulli proved it in 1697.

The formulas

$$\int_0^1 x^{-x},dx = \sum_{n=1}^{\infty} \frac{1}{n^n} = 1 + \frac{1}{2^2} + \frac{1}{3^3} + \frac{1}{4^4} + \cdots \approx 1.29129$$

$$\int_0^1 x^{x},dx = \sum_{n=1}^{\infty} \frac{(-1)^{n+1}}{n^n} = 1 - \frac{1}{2^2} + \frac{1}{3^3} - \cdots \approx 0.78343$$

Why the name

It is a joke. The "freshman's dream" is the classic mistake (a + b)ⁿ = aⁿ + bⁿ, which is false. The "sophomore's dream" looks just as naive, since "x to the x" seems to turn into "n to the n", but this one is true. The name appears in Borwein, Bailey, and Girgensohn's Experimentation in Mathematics (2004), per Wikipedia and MathWorld.

How it works (no spoilers beyond the first step)

  1. Rewrite xˣ as e^(x ln x).
  2. Expand that as a power series and integrate it term by term.
  3. Each term is an integral of the form xⁿ(ln x)ⁿ, which integration by parts handles.
What each term gives

Each term contributes ±1/(n+1)^(n+1), and adding them up gives the series. Bernoulli did this with repeated integration by parts, since the gamma function, today's shortcut, did not exist yet (Wikipedia, citing William Dunham's The Calculus Gallery, ch. 3).

Go deeper

Next stop

The Calc21 Atlas is an open, public project, researched and updated by an AI agent and checked against sources. Last updated 2026-11-27.

Suggest a correction

We use your email only to say thanks, and never sell or share it.

Next

Read next

Your phone solves a calculus problem to find you

Your phone turns four satellite signals into a blue dot, using Newton's method and a correction for relativity.

Read it →

Advertisement

MasterMathMentor.com

Free course material for high-school math teachers.

Visit MasterMathMentor →