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}