Let
\begin{equation}
\mathcal{I}
~=~ \int_{0}^{\frac{\pi}{2}} \ln{(\sin{x})} \,dx. \quad\quad\quad\quad\quad (1)
\end{equation}
We will use the substitution
\(u = \frac{\pi}{2} - x\).
Then,
\(x = 0\) corresponds to \(u = \frac{\pi}{2}\),
\(x = \frac{\pi}{2}\) corresponds to \(u = 0\),
\(x = \frac{\pi}{2} - u\), and therefore
\(dx = -du\).
Thus,
\begin{eqnarray}
\mathcal{I}
&=& \int_{0}^{\frac{\pi}{2}} \ln{(\sin{(x)})}\, dx
\nonumber \\
&=& \int_{\frac{\pi}{2}}^{0} \ln{(\cos{(u)})}\, (-du)
\nonumber \\
&=& \int_{0}^{\frac{\pi}{2}}\ln{(\cos{(u)})}\, du
\nonumber \\
&=& \int_{0}^{\frac{\pi}{2}}\ln{(\cos{(x)})}\, dx,
\quad\quad\quad\quad\quad (2)
\end{eqnarray}
where for the last equality
we changed the integration variable from \(u\) to \(x\).

By adding
(1) and
(2),
we obtain that
\begin{eqnarray}
2 \mathcal{I}
&=& \int_{0}^{\frac{\pi}{2}}
\ln{(\sin{(x)})} + \ln{(\cos{(x)})}\,dx
\nonumber \\
&=& \int_{0}^{\frac{\pi}{2}}
\ln{\left(\sin{(x)}\cos{(x)}\right)}\, dx.
\quad\quad\quad\quad\quad (3)
\end{eqnarray}
Recall that
\(\sin(2x)=2\sin(x)\cos(x)\)
and write (3) as
\begin{eqnarray}
2 \mathcal{I}
&=& \int_{0}^{\frac{\pi}{2}}
\ln{\left(\frac{1}{2}\sin{(2x)}\right)}\, dx
\nonumber \\
&=& \int_{0}^{\frac{\pi}{2}} \ln{\left(\frac{1}{2}\right)}\, dx
~+~ \int_{0}^{\frac{\pi}{2}} \ln{(\sin(2x))}\, dx
\nonumber \\
&=& -\frac{\pi}{2} \ln{2}
~+~ \int_{0}^{\frac{\pi}{2}} \ln{(\sin(2x))}\, dx,
\quad\quad\quad\quad\quad (4)
\end{eqnarray}
since
\(\ln{\left(\frac{1}{2}\right)} = - \ln{2}\).

By using the substitution \(w = 2x\),
we find that
\begin{eqnarray}
& &
\int_{0}^{\frac{\pi}{2}} \ln{(\sin(2x))}\, dx
\nonumber \\
&=& \frac{1}{2} \int_0^{\pi} \ln{(\sin(w))}\, dw
\nonumber \\
&=& \frac{1}{2} \int_0^{\frac{\pi}{2}} \ln{(\sin(w))}\, dw
~+~ \frac{1}{2} \int_{\frac{\pi}{2}}^{\pi} \ln{(\sin(w))}\, dw
\nonumber \\
&=& \frac{\mathcal{I}}{2}
~+~ \frac{1}{2}
\int_{\frac{\pi}{2}}^{\pi} \ln{(\sin(w))}\, dw
\quad\quad\quad\quad\quad (5)
\end{eqnarray}
Furthermore,
by using the substitution
\(u = \pi - w\),
we obtain that
\begin{eqnarray}
& &
\int_{\frac{\pi}{2}}^{\pi} \ln{(\sin(w))}\, dw
\nonumber \\
&=& \int_{\frac{\pi}{2}}^0 \ln{(\sin(\pi-u))}\, (-du)
\nonumber \\
&=& \int_0^{\frac{\pi}{2}} \ln{(\sin(u))}\, du
\nonumber \\
&=& \mathcal{I},
\quad\quad\quad\quad\quad (6)
\end{eqnarray}
where we used the fact that
\(\sin(\pi-u) = \sin(u)\).

From
(5) and
(6),
it follows that
\begin{equation}
\int_{0}^{\frac{\pi}{2}} \ln{(\sin(2x))}\, dx
~=~ \frac{\mathcal{I}}{2}
~+~ \frac{\mathcal{I}}{2}
~=~ \mathcal{I}, \quad\quad\quad\quad\quad (7)
\end{equation}
and, from
(4) and
(7),
we conclude that
\[
2 \mathcal{I}
~=~ -\frac{\pi}{2} \ln{2}
~+~ \mathcal{I}.
\]
Thus,
\(\mathcal{I} = -\frac{\pi}{2} \ln{2}\)
and therefore
\[
\int_{0}^{\frac{\pi}{2}} \ln{(\sin{x})} \,dx
~=~ -\frac{\pi}{2} \ln{2}.
\]