Curious Integral of Johann Bernoulli

## **Problem**

In 1697, the Swiss mathematician Johann Bernoulli (1667 - 1748) discovered a very interesting result of integral calculus:

∫

0

1

1

x
x

d

# n
1

∞

1

n
n

.

{\displaystyle \int\_{0}^{1} \frac{1}{x^x} \,dx = \sum\_{n=1}^{\infty} \frac{1}{n^n}. }

Prove this interesting result!

## **Hints**

(1) Begin by using the transformation

1

x
x

=

e

−
x
ln
⁡
x

{\displaystyle \frac{1}{x^x} = {e}^{-x \ln x} }

 .

(2) Remember the Taylor series expansion

e
x

=

∑

# n
0

∞

x
n

n
!

{\displaystyle e^x = \sum\_{n=0}^{\infty} \frac{x^n}{n!} }

.

## **Solution**

This integral is an improper integral with the indeterminate form

0
0

{\displaystyle 0^0}

. It is well known that

lim

x
→
0

x
x

=
1

{\displaystyle \lim\_{x \rightarrow 0} x^x = 1 }

 and knowing this fact enables us to show that

∫

0

1

1

x
x

d
# x

∫

0

1

e

−
x
ln
⁡
x

d
x
.

{\displaystyle \int\_{0}^{1} \frac{1}{x^x} \;dx = \int\_{0}^{1} {e}^{-x \ln x} \;dx.}

Applying the Taylor series

e
x

=

∑

# n
0

∞

x
n

n
!

{\displaystyle e^x = \sum\_{n=0}^{\infty} \frac{x^n}{n!} }

 gives

∫

0

1

1

x
x

d
x

=

∫

0

1

∑

# n
0

∞

(
−
x
ln
⁡
x
)

n

n
!

d
x

=

∑

# n
0

∞

1

n
!

∫

0

1

(
−
x
ln
⁡
x
)

n

d
x

=

∑

# n
0

∞

(
−
1
)

n

n
!

∫

0

1

x
n

ln

n

x

d
x
.

{\displaystyle \begin{align} \int\_{0}^{1} \frac{1}{x^x} \,dx &= \int\_{0}^{1} \sum\_{n=0}^{\infty} \frac{{(-x \ln x)}^{n}}{n!} \,dx \\[5 pt]
&= \sum\_{n=0}^{\infty} \frac{1}{n!} \int\_{0}^{1} {(-x \ln x)}^{n} \,dx \\[5 pt]
&= \sum\_{n=0}^{\infty} \frac{{(-1)}^{n}}{n!} \int\_{0}^{1} x^n {\ln}^{n} x \,dx.
\end{align} }

Now use the technique of integration by parts on the integral

∫

0

1

x
n

ln

n

x

d
x

{\displaystyle \int\_{0}^{1} x^n {\ln}^{n} x \,dx }

. Let

# u

ln

n

x

{\displaystyle u = {\ln}^{n} x }

,

d
# u

n
x

ln

n
−
1

x

d
x

{\displaystyle du = \frac{n}{x} {\ln}^{n-1} x \,dx }

,

d
# v

x
n

d
x

{\displaystyle dv = x^n \;dx }

, and

# v

x

n
1

n
1

{\displaystyle v = \frac{{x}^{n+1}}{n+1} }

.

Subsequently,

∫

0

1

x
n

ln

n

x

d
x

=

(

x

n
1

n
1

ln

n

x

)

0

1

−

r

r
1

∫

0

1

x

n
1

x

ln

n
−
1

x

d
x

=
−

n

n
1

∫

0

1

x

n

ln

n
−
1

x

d
x
.

{\displaystyle \begin{align} \int\_{0}^{1} x^n {\ln}^{n} x \,dx &= \left(\frac{{x}^{n+1}}{n+1}{\ln}^{n} x \right)\_{0}^{1} - \frac{r}{r+1}\int\_{0}^{1} \frac{{x}^{n+1}}{x} {\ln}^{n-1} x \,dx \\[5 pt]
&= -\frac{n}{n+1} \int\_{0}^{1} {x}^{n} {\ln}^{n-1} x \,dx.
\end{align} }

Continuing the integration by parts scheme to the integral

∫

0

1

x

n

ln

n
−
1

x

d
x

{\displaystyle \int\_{0}^{1} {x}^{n} {\ln}^{n-1} x \,dx }

 gives the pattern:

∫

0

1

x

n

ln

n
−
1

x

d
x

=
−

n
−
1

n
1

∫

0

1

x

n

ln

n
−
2

x

d
x

∫

0

1

x

n

ln

n
−
2

x

x

=
−

n
−
2

n
1

∫

0

1

x

n

ln

n
−
3

x

d
x
,

e
t
c
.

{\displaystyle \begin{align}
\int\_{0}^{1} {x}^{n} {\ln}^{n-1} x \,dx &= -\frac{n-1}{n+1} \int\_{0}^{1} {x}^{n} {\ln}^{n-2} x \,dx \\[5 pt]
\int\_{0}^{1} {x}^{n} {\ln}^{n-2} x \,x &= -\frac{n-2}{n+1}\int\_{0}^{1} {x}^{n} {\ln}^{n-3} x \,dx, \,etc.\\
\end{align}}

Thus,

∫

0

1

x
n

ln

n

x

d
x

=

(
−
1
)

n

n
!

(
n
1
)

n

∫

0

1

x

n

d
x

=

(
−
1
)

n

n
!

(
n
1
)

n
1

.

{\displaystyle \begin{align}
\int\_{0}^{1} x^n {\ln}^{n} x \,dx &= \frac{{(-1)}^{n}n!}{{(n+1)}^{n}} \int\_{0}^{1} {x}^{n} \,dx \\[5 pt]
&= \frac{{(-1)}^{n}n!}{{(n+1)}^{n+1}} .
\end{align}}

Consequently,

∫

0

1

1

x
x

d
x

=
1

∑

# n
1

∞

(
−
1
)

n

n
!

⋅

(
−
1
)

n

n
!

(
n
1
)

n
1

=
1

∑

# n
1

∞

1

(
n
1
)

n
1

=

1

1
1

1

2
2

1

3
3

⋯

=

∑

# n
1

∞

1

n
n

.

{\displaystyle \begin{align} \int\_{0}^{1} \frac{1}{x^x} \,dx &= 1 + \sum\_{n=1}^{\infty} \frac{{(-1)}^{n}}{n!} \cdot \frac{{(-1)}^{n}n!}{{(n+1)}^{n+1}} \\[5 pt]
&= 1 + \sum\_{n=1}^{\infty} \frac{1}{{(n+1)}^{n+1}} \\[5 pt]
&= \frac{1}{1^1} + \frac{1}{2^2} + \frac{1}{3^3} + \cdots\\[5 pt]
&= \sum\_{n=1}^{\infty} \frac{1}{n^n}.
\end{align} }