Definite integration with natural logarithm $$\int_0^a \ln(x)\ln(a-x)\,dx$$
How to do this? I couldn't proceed at all.
($\ln$ is natural logarithm.)
 A: Sub $x=a u$; then
$$\int_0^a dx \, \log{x} \, \log{(a-x)} = a \int_0^1 du \left [\log^2{a} + \log{a} \left (\log{u} + \log{(1-u)}\right ) + \log{u} \, \log{(1-u)}\right ] $$
The first three integrals are straightforward; the middle two may be evaluated using the antiderivative
$$\int dx \, \log{x} = x \log{x} - x +C$$
For the final integral, you can Taylor expand the $\log{(1-u)}$ term to get
$$\int_0^1 du \, \log{u} \, \log{(1-u)} = -\sum_{k=1}^{\infty} \frac1{k} \int_0^1 du \,u^k \log{u} = \sum_{k=1}^{\infty} \frac1{k (k+1)^2} $$
The sum is evaluated using partial fractions:
$$\sum_{k=1}^{\infty} \frac1{k (k+1)^2} = \sum_{k=1}^{\infty} \left (\frac1{k}-\frac1{k+1} \right ) - \sum_{k=1}^{\infty} \frac1{(k+1)^2}=1-\left (\frac{\pi^2}{6}-1 \right )= 2-\frac{\pi^2}{6}$$
The final result is
$$\int_0^a dx \, \log{x} \, \log{(a-x)} = a \log^2{a} - 2 a \log{a} + a \left (2-\frac{\pi^2}{6} \right )$$
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\on}[1]{\operatorname{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
&\bbox[5px,#ffd]{\left.\int_{0}^{a}\ln\pars{x}\ln\pars{a - x}\,\dd x\,\right\vert_{\,a\ >\ 0}}
\\[5mm] \stackrel{x/a\ \mapsto\ x}{=}\,\,\,\,\,&
a\int_{0}^{1}\bracks{\ln\pars{x} + \ln\pars{a}}
\bracks{\ln\pars{a} + \ln\pars{1 - x}}\,\dd x
\\[5mm] = &\
2a\ln\pars{a}\int_{0}^{1}\ln\pars{x}\,\dd x +
a\int_{0}^{1}\ln^{2}\pars{a}\dd x
\\[2mm] + &\ 
\left.a\,{\partial^{2} \over \partial\mu\partial\nu}
\int_{0}^{1}x^{\mu}\,\pars{1 - x}^{\nu}\,\dd x
\,\right\vert_{\substack{\mu\ =\ 0\\[0.75mm] \nu\ =\ 0}}
\\[5mm] = &\
-2a\ln\pars{a} + a\ln^{2}\pars{a} + 
a\
\underbrace{\left.{\partial^{2} \over \partial\mu\partial\nu}
{\Gamma\pars{\mu + 1}\Gamma\pars{\nu + 1} \over \Gamma\pars{\mu + \nu + 2}}
\,\right\vert_{\substack{\mu\ =\ 0\\[0.75mm] \nu\ =\ 0}}}
_{\ds{2 - {\pi^{2} \over 6}}}
\\[5mm] = &\
\bbx{a\ln^{2}\pars{a} - 2a\ln\pars{a} + 2a
- {\pi^{2} \over 6}\,a} \\ &
\end{align}
A: $a>0$
\begin{align}J&=\int_0^a \ln(x)\ln(a-x)\,dx\\
&=\frac{1}{2}\int_0^a \ln^2(x)dx+\frac{1}{2}\int_0^a \ln^2(a-t)dt-\frac{1}{2}\int_0^a \ln^2\left(\frac{u}{a-u}\right)du\\
&\overset{x=a-t,x=\frac{u}{2-u}}=\int_0^a \ln^2(x)dx-\frac{a}{2}\int_0^\infty \frac{\ln^2 x}{(1+x)^2}dx\\
&=\int_0^a \ln^2(x)dx-\frac{a}{2}\int_0^1 \frac{\ln^2 x}{(1+x)^2}dx-\frac{a}{2}\int_1^\infty \frac{\ln^2 u}{(1+u)^2}du\\
&\overset{x=\frac{1}{y}}=\int_0^a \ln^2(x)dx-a\int_0^1 \frac{\ln^2 x}{(1+x)^2}dx\\
&\overset{\text{IBP}}=\int_0^a \ln^2(x)dx+a\left[\left(\frac{1}{1+x}-1\right)\ln^2 x\right]_0^1-2a\int_0^1 \left(\frac{1}{1+x}-1\right)\frac{\ln x}{x}dx\\
&=\int_0^a \ln^2(x)dx+2a\int_0^1 \frac{\ln x}{1+x}dx\\
&=\int_0^a \ln^2(x)dx+2a\int_0^1 \frac{\ln x}{1-x}dx-2a\int_0^1 \frac{2u\ln u}{1-u^2}du\\
&\overset{x=u^2}=\int_0^a \ln^2(x)dx+2a\int_0^1 \frac{\ln x}{1-x}dx-a\int_0^1 \frac{\ln x}{1-x}dx\\
&=\int_0^a \ln^2(x)dx+a\int_0^1 \frac{\ln x}{1-x}dx\\
&=\Big[x\left(\ln^2 x-2\ln x+2\right)\Big]_0^a+a\times -\frac{\pi^2}{6}\\
&=\boxed{a\left(\ln^2 a-2\ln a+2\right)-\frac{a\pi^2}{6}}
\end{align}
NB: i assume that:  $\displaystyle \int_0^1 \frac{\ln x}{1-x}dx=-\zeta(2)=-\frac{\pi^2}{6}$
