Evaluate the integral $\int_{0}^{\frac{\pi}{3}}\sin(x)\ln(\cos(x))\,dx$ $$\int_0^{\frac{\pi}{3}}\sin(x)\ln(\cos(x))\,dx $$
$$
\begin{align}
u &= \ln(\cos(x)) & dv &= \sin(x)\,dx \\
du &= \frac{-\sin(x)}{\cos(x)}\,dx & v &= -\cos(x)
\end{align}
$$
$$
\begin{align}
\int_0^{\frac{\pi}{3}}\sin(x)\ln(\cos(x))\,dx &= 
-\cos(x)\ln(\cos(x)) - \int  \frac{-\cos(x)-\sin(x)}{\cos(x)}\,dx \\\\
&= -\cos(x)\ln(\cos(x)) - \int \sin(x)\,dx \\\\
&= -\cos(x)\ln(\cos(x)) + \cos(x) \\\\
F(g) &= -\cos(\pi/3)\ln(\cos(\pi/3)) + \cos(\pi/3) + \cos(0)\ln(\cos(0)) - \cos(0) \\\\
&= -\frac{1}{2}\ln\left(\frac{1}{2}\right) - \frac{1}{2} \\\\
\end{align}
$$
However, my textbook says that the answer is actually 
$$\frac{1}{2}\ln(2) - \frac{1}{2}$$
Where does the $\ln(2)$ come from in the answer?
 A: Well, we have:
$$\mathcal{I}_\text{n}:=\int_0^\text{n}\sin\left(x\right)\cdot\ln\left(\cos\left(x\right)\right)\space\text{d}x\tag1$$
Substitute $\text{u}:=\cos\left(x\right)$ so we get:
$$\mathcal{I}_\text{n}=-\int_1^{\cos\left(\text{n}\right)}\ln\left(\text{u}\right)\space\text{d}\text{u}\tag2$$
Using IBP, we get:
$$\mathcal{I}_\text{n}=\left[-\text{u}\cdot\ln\left(\text{u}\right)\right]_1^{\cos\left(\text{n}\right)}+\int_1^{\cos\left(\text{n}\right)}1\space\text{d}x=\left[-\text{u}\cdot\ln\left(\text{u}\right)\right]_1^{\cos\left(\text{n}\right)}+\left[\text{u}\right]_1^{\cos\left(\text{n}\right)}=$$
$$-\cos\left(\text{n}\right)\cdot\ln\left(\cos\left(\text{n}\right)\right)+1\cdot\ln\left(1\right)+\cos\left(\text{n}\right)-1=\cos\left(\text{n}\right)\cdot\left(1-\ln\left(\cos\left(\text{n}\right)\right)\right)-1\tag3$$

So, when $\text{n}=\frac{\pi}{2}$ we get:
$$\mathcal{I}_{\frac{\pi}{3}}:=\int_0^\frac{\pi}{2}\sin\left(x\right)\cdot\ln\left(\cos\left(x\right)\right)\space\text{d}x=\cos\left(\frac{\pi}{3}\right)\cdot\left(1-\ln\left(\cos\left(\frac{\pi}{3}\right)\right)\right)-1=\frac{\ln\left(2\right)-1}{2}\tag4$$

A: $$-\ln(\frac{1}{2}) = \ln(2)$$
$$\ln(x^a) = a \ln(x)$$
A: Perhaps an easier method:
$$I=\int_0^{\pi/3}\sin(x)\ln(\cos x)dx=-\int_0^{\pi/3}-\sin(x)\ln(\cos x)dx$$
Sub:
$$u=\cos x\Rightarrow du=-\sin(x)dx$$
which gives
$$I=\int_{1/2}^1\ln u\ du$$
Since $$\int\ln x\,dx=x(\ln x-1)=x\ln\frac{x}e$$
We have $$I=\ln\frac1e-\frac12\ln\frac1{2e}$$
Then using $$\ln(x^a)=\ln(e^{a\ln x})=a\ln x$$
We have
$$I=-1+\frac12\ln2e=-1+\frac12\ln2+\frac12=\frac12\ln2-\frac12$$
