Finding $\int^{\frac{\pi}{2}}_{0}\ln(\sin x)\cdot \sin xdx$ 
Finding $\displaystyle \int^{\frac{\pi}{2}}_{0}\ln(\sin x)\cdot \sin xdx$

What I try:-> Integration by parts 
assuming $\displaystyle I = \int\ln(\sin x)\cdot \sin xdx = -\ln(\sin x)\cdot \cos x+\int\frac{\cos^2 x}{\sin x}dx$
$\displaystyle I = -\ln(\sin x)\cdot \cos x+\int\frac{1-\sin^2 x}{\sin x}dx$
$ = -\ln(\sin x)\cos x+\ln\bigg(\tan\frac{x}{2}\bigg)-\cos x$
$ \displaystyle \int^{\frac{\pi}{2}}_{0}\ln(\sin x)\cos xdx = \bigg[-\ln(\sin x)\cos x+\ln\bigg(\tan\frac{x}{2}\bigg)-\cos x\bigg]\bigg|^{\frac{\pi}{2}}_{0}=-\ln(0)+\ln(0)$
but answer is $\ln(2/e)$
could some explain me why I have got wrong answer,thanks
also explain me How I solve it using double integral
 A: \begin{align} 
I&=\int^{\frac{\pi}{2}}_{0}\ln(\sin x)\cdot \sin x\,dx
\tag{1}\label{1}
\end{align} 
\begin{align} 
I&=\int^{\frac{\pi}{2}}_{0}\tfrac12\ln(\sin^2 x)\cdot \sin x\,dx
\tag{2}\label{2}
\\
&=
\int^{\frac{\pi}{2}}_{0}
\tfrac12\ln(1-\cos^2 x)\cdot \sin x\,dx
\tag{3}\label{3}
.
\end{align} 
Let $t=\cos x$, then we have
\begin{align}
I&=\tfrac12\int_0^1\ln(1-t^2)\,dt
\\
&=
\tfrac12\int_0^1\ln(1-t)+\ln(1+t)\,dt
\\
&=
\left.\tfrac12
(
1-t-(1-t)\ln(1-t)
+(t+1)\ln(t+1)-1-t
)\right|_0^1
=\ln2-1
.
\end{align}
A: $\log\sin x$ has a well-known Fourier series:
$$ \log\sin x=-\log 2-\sum_{k\geq 1}\frac{\cos(2k x)}{k} $$
and for any $k\in\mathbb{N}^+$ we have
$$ \int_{0}^{\pi/2}\cos(2kx)\sin(x)\,dx = -\frac{1}{(2k-1)(2k+1)}, $$
hence
$$ \int_{0}^{\pi/2}\sin(x)\log\sin(x)\,dx = -\log(2)+\sum_{k\geq 1}\frac{1}{(2k-1)k(2k+1)} $$
where the last series equals $-1+2\log 2$ by partial fraction decomposition. It follows that
$$ \int_{0}^{\pi/2}\sin(x)\log\sin(x)\,dx = \log(2)-1 $$
as wanted.
A: Other answers are good but I prefer to talk about yours. You found (with a typo)
\begin{align}
\int_{0}^{\frac{\pi}{2}}\ln(\sin x)\ \sin x\ dx 
&= -\ln(\sin x)\cos x+\ln\bigg(\tan\frac{x}{2}\bigg)\color{red}{+}\cos x\Big|_{0}^{\frac{\pi}{2}} \\
&= 0 + \lim_{x\to0}\bigg(\ln(\sin x)\cos x+\ln\tan\frac{x}{2}\bigg)-1 \\
&= 0 + \lim_{x\to0}\bigg(\ln(1+\cos x)-(1-\cos x)\ln\sin x\bigg)-1 \\
&= \ln2-1
\end{align}
A: Here is an approach following along lines similar to your own answer. There is however a small subtlety used in the first integration by parts step.
On integrating by parts, we have
$$\int_0^{\frac{\pi}{2}} \sin x \ln (\sin x) \, dx = (1 - \cos x) \ln (\sin x) \Big{|}_0^{\pi/2} - \int_0^{\frac{\pi}{2}} (1 - \cos x) \cdot \frac{\cos x}{\sin x} \, dx.$$
Note the subtlety here. Having chosen $v' = \sin x$ we have used $v = 1 - \cos x$, that is, a non-zero constant of integration has been selected. Doing so means one has zero at the upper and lower limits of integration. 
Continuing, we have
\begin{align}
\int_0^{\frac{\pi}{2}} \sin x \ln (\sin x) \, dx &= \int_0^{\frac{\pi}{2}} \frac{-\cos x + \cos^2 x}{\sin x} \, dx\\
&= \int_0^{\frac{\pi}{2}} \frac{-\cos x + 1 - \sin^2 x}{\sin x} \, dx\\
&= \int_0^{\frac{\pi}{2}} \left [\text{cosec} \, x  - \cot x - \sin x \right ] \, dx\\
&= \left [-\ln (\text{cosec} \,x + \cot x) - \ln (\sin x) + \cos x \right ]_0^{\pi/2}\\
&= \left [-\ln (1 + \cos x) + \cos x \right ]_0^{\pi/2}\\
&= \ln 2 - 1,
\end{align}
as expected. 
