Question: $$I=\int\_{0}^{\dfrac\pi4}\log(\cos(x))\mathop{\mathrm{d}x}$$ I can solve it if the limit is from $0$ to $\frac\pi2$. How to do it? I have done like this, tried not to use any knowledge of series but just simple integration rules.
$I\_1=\int\_{0}^{\frac{\pi}{4}} \ln(\sin x)+\ln (\cos x) dx \\
=\int\_{0}^{\frac{\pi}{4}}\ln\left(\frac{\sin 2x}{2}\right) dx \\
=-\frac{\pi}{4}\ln 2 -\frac{\pi}{4}\ln 2 \\
=-\frac{\pi}{2}\ln 2$

Now ,

$I\_2=\int\_{0}^{\frac{\pi}{4}} \ln(\cos x)-\ln(\sin x) dx \\
=\int \_{0}^{\frac{\pi}{4}} \ln(\cot x) dx \\
=-\int\_{-\infty}^{0} \frac{(e^z)^2}{1+(e^z)^2} dz$

Say $$[\cot x=e^z \implies dx=-\frac{e^z}{1+(e^z)^2} dz]$$ 
Now from above,
$$=-\int\_{0}^{\infty} \frac{1}{1+(e^z)^2} dz \\
=-\int\_{0}^{\infty} \frac{e^{-z}}{e^z+e^{-z}} dz \\
=-\frac{1}{2} \int\_{0}^{\infty} 1-\frac{e^z-e^{-z}}{e^z+e^{-z}}dz \\
=-\frac{1}{2}\left[z-\ln (e^z+e^{-z})\right]^\infty\_0 \\
=-\frac{1}{2}\ln 2$$

Answer: 
$$I(t)=\int\_0^{t}\log\big(\cos(x)\big)\,dx$$ is a very difficult integral involving the [polylogarithm function](https://en.wikipedia.org/wiki/Polylogarithm). For $t=\frac \pi 4$, the explicit result is $$I(\frac \pi 4)=\frac{C}{2}-\frac{\pi}{4} \log (2)$$ where appears Catalan number.

As Archis Welankar commented, it could be a good idea to compose Taylor series for the integrand. This would lead to $$\log\big(\cos(x)\big)=-\frac{x^2}{2}-\frac{x^4}{12}-\frac{x^6}{45}-\frac{17 x^8}{2520}-\frac{31
 x^{10}}{14175}+O\left(x^{11}\right)$$ Integrating and using bounds, this will give $\approx -0.0864107$ for an exact solution $\approx -0.0864137$
As shown in [this answer](https://math.stackexchange.com/a/909837),
$$
\int\_0^{\pi/2}\log(1+\cos(x))\,\mathrm{d}x=2\mathrm{G}-\frac\pi2\log(2)
$$
where $\mathrm{G}$ is [Catalan's Constant](http://en.wikipedia.org/wiki/Catalan%27s_constant).

Therefore,
$$
\begin{align}
\int\_0^{\pi/4}\log(\cos(x))\,\mathrm{d}x
&=\frac12\int\_0^{\pi/2}\log(\cos(x/2))\,\mathrm{d}x\\
&=\frac14\int\_0^{\pi/2}\log\left(\frac{1+\cos(x)}2\right)\,\mathrm{d}x\\
&=\frac14\int\_0^{\pi/2}\log(1+\cos(x))\,\mathrm{d}x-\frac\pi8\log(2)\\[3pt]
&=\frac{\mathrm{G}}2-\frac\pi8\log(2)-\frac\pi8\log(2)\\[6pt]
&=\frac{\mathrm{G}}2-\frac\pi4\log(2)
\end{align}
$$