integrals part i
progress ~25%
$\diamond$
updated 2025-11-25
$\diamond$
certainty certain
$\diamond$
importance high
Three fun and well-known integrals I like. Although this page is work in progress, the mathematical portion is mostly complete and ready to be enjoyed.
I.
Let's begin with a well-known integral: \[ \int_0^a x^m \log^n(x) \, \mathrm dx \] To evaluate this, we will first evaluate a simpler integral \[ \int_0^1 x^m \log^n(x) \, \mathrm dx \] Upon integrating by parts, we get \[ I_{(m,n)} = - \frac{n}{m+1} \int_0^1 x^m \log^{n-1}(x) \, \mathrm dx \] We can form a recurrence relation \[ \frac{I_{(m,n)}}{I_{(m,n-1)}} = - \frac{n}{m+1} \] Consider the product \[ \prod_{i = 1}^n \frac{I_{(m,i)}}{I_{(m,i-1)}} = \frac{I_{(m,n)}}{I_{(m,0)}} \] Using the recurrence relation, we can write it as \[ \prod_{i = 1}^n \frac{I_{(m,i)}}{I_{(m,i-1)}} = (-1)^n \frac{n!}{(m+1)^n} \] Equating the two, we get \[ I_{(m,n)} = (-1)^n \frac{n! \, I_{(m,0)}}{(m+1)^n} = (-1)^n \frac{n!}{(m+1)^{n+1}}\] And hence, \[ \boxed{\int_0^1 x^m \log^n(x) \, \mathrm dx = (-1)^n \frac{n!}{(m+1)^{n+1}}} \tag{1} \] In our original integral, if we let $x = az$, we get \[ a^{m+1} \int_0^1 z^m \log^n(az) \, \mathrm dz = a^{m+1} \int_0^1 z^m \left[\log(z) + \log(a) \right]^n \, \mathrm dz \] Binomial expansion gives us \[ a^{m+1} \int_0^1 z^m \sum_{k = 0}^n \binom{n}{k}\log^k(z)\log^{n-k}(a) \, \mathrm dz = a^{m+1} \sum_{k = 0}^n \binom{n}{k} \log^{n-k}(a) \int_0^1 z^m \log^k(z) \, \mathrm dz \] Now, we can use the integral we evaluated earlier $(1)$ to obtain \[ \boxed{\int_0^a x^m \log^n(x) \, \mathrm dx = a^{m+1} \sum_{k = 0}^n (-1)^k \binom{n}{k} \frac{k!}{(m+1)^{k+1}}\log^{n-k}(a)} \tag{2} \] Thus, we have evaluated our first integral.
II.
Another easy integral: \[ \int_0^1 x^{-x} \, \mathrm dx \] Note that \[ x^{-x} = e^{-x\log(x)} \] Hence our integral becomes, \[ \int_0^1 e^{-x\log(x)} \, \mathrm dx = \int_0^1 \sum_{n=0}^\infty \frac{[-x\log(x)]^n}{n!} \, \mathrm dx = \sum_{n=0}^\infty \frac{(-1)^n}{n!} \int_0^1 x^n \log^n(x) \, \mathrm dx \] Using the integral we evaluated in (I), we get \[ \sum_{n=0}^\infty \frac{1}{(n+1)^{n+1}} = \sum_{n=1}^\infty \frac{1}{n^n} \] Hence, \[ \boxed{\int_0^1 x^{-x} \, \mathrm dx = \sum_{n=1}^\infty n^{-n}} \tag{3} \] which is a very interesting result. This, along with \[ \boxed{\int_0^1 x^{x} \, \mathrm dx = \sum_{n=1}^\infty (-1)^{n-1} n^{-n}} \tag{4} \] is called the sophomore's dream. Using the same method we can also evaluate a more general form: \begin{align} \int_0^1 x^{ax^m} \, \mathrm dx & = \int_0^1 \sum_{n=0}^\infty \frac{[ax^m\log(x)]^n}{n!} \, \mathrm dx \\[0.2cm] & = \sum_{n=0}^\infty \frac{a^n}{n!} \int_0^1 x^{mn} \log^n{x}\, \mathrm dx \\[0.2cm] & = \sum_{n=0}^\infty (-1)^n \frac{a^n}{(mn+1)^{n+1}} \end{align} Hence, \[ \boxed{\int_0^1 x^{ax^m} \, \mathrm dx = \sum_{n=0}^\infty (-1)^n \frac{a^n}{(mn+1)^{n+1}}} \tag{5} \]
III.
Our third integral is another well-known Logarithmic integral: \[ \int_0^1 \frac{\log^2(1+x)}{x} \, \mathrm dx \] This too, after some algebraic manipulation, can be directly evaluated using the equation $(1)$ we obtained earlier, but we will take this opportunity to use another powerful technique. Consider the integral $I$, where \[ I = \int_0^1 \frac{x^{a-1}+x^{b-1}}{(1+x)^{a+b}} \, \mathrm dx \] This integral represents the Beta function $\mathrm B(a,b)$. To prove this, make the change of variable $x \rightarrow 1/x$, so \[ I = \int_1^\infty \frac{x^{a+1}+x^{b+1}}{x^2 \, (1+x)^{a+b}} \, \mathrm dx \] Adding the two integrals, we get \begin{align} 2I & = \int_0^\infty \frac{x^{a-1}+x^{b-1}}{(1+x)^{a+b}} \, \mathrm dx \\[0.2cm] & = \int_0^\infty \frac{x^{a-1}}{(1+x)^{a+b}} \, \mathrm dx + \int_0^\infty \frac{x^{b-1}}{(1+x)^{a+b}} \, \mathrm dx \\[0.2cm] & = \mathrm B(a,b) + \mathrm B(b,a) \\[0.2cm] & = 2 \mathrm B(a,b) \end{align} Hence, \[ \boxed{\mathrm B(a,b) = \int_0^1 \frac{x^{a-1}+x^{b-1}}{(1+x)^{a+b}} \, \mathrm dx} \tag{6} \] Differentiating both sides of $(6)$ with respect to $a$ and $b$ and letting $a, b \rightarrow 0$, we get \[ \lim_{\substack{a \rightarrow 0 \\ b \rightarrow 0}} \frac{\partial^2}{\partial a \partial b} \mathrm B(a,b) = 2 \int_0^1 \frac{\log^2(1+x)}{x} \, \mathrm dx - 2 \int_0^1 \frac{\log(x)\log(1+x)}{x} \, \mathrm dx \] Using the standard integral representation of $\mathrm B(a,b)$, the left hand side becomes \begin{align} \lim_{\substack{a \rightarrow 0 \\ b \rightarrow 0}} \frac{\partial^2}{\partial a \partial b} \mathrm B(a,b) & = \lim_{\substack{a \rightarrow 0 \\ b \rightarrow 0}} \frac{\partial^2}{\partial a \partial b} \int_0^1 x^{a-1}(1-x)^{b-1} \, \mathrm dx \\[0.2cm] & = \int_0^1 \frac{\log(x)\log(1-x)}{x(1-x)} \, \mathrm dx \\[0.2cm] & = \int_0^1 \frac{(1-x)\log(x)\log(1-x) + x\log(x)\log(1-x)}{x(1-x)} \, \mathrm dx \\[0.2cm] & = \int_0^1 \frac{\log(x)\log(1-x)}{x} \, \mathrm dx + \int_0^1 \frac{\log(x)\log(1-x)}{1-x} \, \mathrm dx \\[0.2cm] & = 2 \int_0^1 \frac{\log(x)\log(1-x)}{x} \, \mathrm dx \end{align} Hence, the previous equation becomes \[ \int_0^1 \frac{\log^2(1+x)}{x} \, \mathrm dx = \int_0^1 \frac{\log(x)\log(1-x^2)}{x} \, \mathrm dx \] Make the change of variable $x^2 \rightarrow x$ in the right hand side to get \begin{align} \int_0^1 \frac{\log^2(1+x)}{x} \, \mathrm dx & = \frac{1}{4} \int_0^1 \frac{\log(x)\log(1-x)}{x} \, \mathrm dx \\[0.2cm] & = - \frac{1}{4} \int_0^1 \sum_{n = 1}^\infty \frac{x^{n-1}}{n} \log(x) \, \mathrm dx \\[0.2cm] & = - \frac{1}{4} \sum_{n = 1}^\infty \frac{1}{n} \int_0^1 x^{n-1} \log(x) \, \mathrm dx \\[0.2cm] \end{align} Using $(1)$, we get our result \[ \boxed{\int_0^1 \frac{\log^2(1+x)}{x} \, \mathrm dx = \frac{1}{4} \zeta(3)} \tag{7} \] Let's also consider a more general form of the integral: \[ \int_0^a \frac{\log^2(1+x)}{x} \, \mathrm dx \] Integrating by parts gives us \begin{align} \int_0^a \frac{\log^2(1+x)}{x} \, \mathrm dx & = \log(a)\log^2(1+a) - 2\int_0^a \frac{\log(x)\log(1+x)}{1+x} \, \mathrm dx \\[0.2cm] & = \log(a)\log^2(1+a) - 2\int_0^a \frac{\log\left(\frac{x(1+x)}{1+x}\right)\log(1+x)}{1+x} \, \mathrm dx \\[0.2cm] & = \log(a)\log^2(1+a) - 2\int_0^a \frac{\log^2(1+x)}{1+x} \, \mathrm dx - 2\int_0^a \frac{\log\left(\frac{x}{1+x}\right)\log(1+x)}{1+x} \, \mathrm dx \\[0.2cm] & = \log(a)\log^2(1+a) - \frac{2}{3}\log^3(1+a) - 2\int_0^a \frac{\log\left(\frac{x}{1+x}\right)\log(1+x)}{1+x} \, \mathrm dx \\[0.2cm] & = \log(a)\log^2(1+a) - \frac{2}{3}\log^3(1+a) - 2\log(1+a)\mathrm{Li}_2\left( \frac{1}{1+a} \right) + 2\int_0^a \frac{1}{1+x} \mathrm{Li}_2\left( \frac{1}{1+x} \right) \, \mathrm dx \\[0.2cm] & = \log(a)\log^2(1+a) - \frac{2}{3}\log^3(1+a) - 2\log(1+a)\mathrm{Li}_2\left( \frac{1}{1+a} \right) - 2 \mathrm{Li}_3\left( \frac{1}{1+a} \right) + 2\zeta(3) \end{align} Hence, we get another result worth remembering \[ \boxed{\int_0^a \frac{\log^2(1+x)}{x} \, \mathrm dx = \log(a)\log^2(1+a) - \frac{2}{3}\log^3(1+a) - 2\log(1+a)\mathrm{Li}_2\left( \frac{1}{1+a} \right) - 2 \mathrm{Li}_3\left( \frac{1}{1+a} \right) + 2\zeta(3)} \tag{8} \] Using the same method, we can also obtain \[ \boxed{\int_0^a \frac{\log^2(1-x)}{x} \, \mathrm dx = \log(a)\log^2(1-a) + 2\log(1-a)\mathrm{Li}_2(1-a) - 2\mathrm{Li}_3(1-a) + 2\zeta(3)} \tag{9} \] We can evaluate our original integral using $(8)$ \begin{align} \int_0^1 \frac{\log^2(1+x)}{x} \, \mathrm dx & = \log(1)\log^2(2) - \frac{2}{3}\log^3(2) - 2\log(2)\mathrm{Li}_2\left( \frac{1}{2} \right) - 2 \mathrm{Li}_3\left( \frac{1}{2} \right) + 2\zeta(3) \\[0.2cm] & = 2\zeta(3) - \frac{2}{3}\log^3(2) - \log(2)\left(\zeta(2) - \log^2(2)\right) - 2 \left( \frac{7}{8} \zeta(3) + \frac{1}{6} \log^3(2) - \frac{1}{2} \zeta(2)\log(2) \right) \\[0.2cm] & = \frac{1}{4} \zeta(3) \end{align}