Evaluating a definite integral involving $\log\cos x$

It's my first post here and I was wondering if someone could help me with evaluating the definite integral $$\int_0^{\frac{\pi}{4}} \log\left( \cos x\right) \, \mathrm{d}x$$ Thanks in advance, any help would be appreciated.

-
What did you try ? maybe putting $t=\cos(x)$ would help –  Belgi Sep 19 '12 at 12:12
There is an answer, but I cannot say how it is found: wolframalpha.com/input/?i=Integrate[Log[Cos[x]]%2C{x%2C0%2CPi%2F4}] –  Siminore Sep 19 '12 at 12:16
@Siminore: That link is broken; here's one that works. –  joriki Sep 19 '12 at 12:20
@Souvik : You mean 'evaluating'. –  mick Sep 19 '12 at 13:12

Write $$\log(\cos(x))=\log\left(\frac12 e^{ix}(1+e^{-2ix})\right)\\ =-\log 2 + ix +\sum_{k=1}^\infty\frac{(-1)^{k+1}}{k}e^{-2ikx}.$$ Then integrate term by term to obtain $$\int_0^{\pi/4}\log(\cos(x))dx=-\frac{\pi}{4}\log 2 +i\frac{\pi^2}{32}+\frac{i}{2}\sum_{k=1}^\infty\frac{(-1)^{k+1}}{k^2}\left[e^{-ik\pi/2}-1\right].$$ The odd terms of the series with $e^{-ik\pi/2}$ give rise to the Catalan constant, and the even terms combine with the other infinite series to cancel the $i\pi^2/32$ term.

-
The integral: $$S=\int_0^\frac{\pi}{4}\log(\cos(x))dx=\frac{1}{4}(2C-\pi \log 2)$$ where $C$ is the Catalan constant.
Use $\cos(x)=\frac{\exp(i\theta)+\exp(-i\theta)}{2}$ and then integrate it. –  Riccardo.Alestra Sep 19 '12 at 12:33
@ Riccardo: This helps us to find the part with $\pi log(2)$ but how do you find the Catalan constant with that ? –  mick Sep 19 '12 at 13:16