$$\int_{0}^{\frac{\pi}{4}}\ln(\cos t)dt=-\frac{{\pi}}{4}\ln2+\frac{1}{2}K$$
I ran across this integral while investigating the Catalan constant. I am wondering how it is evaluated. I know of this famous integral when the limits of integration are $0$ and $\frac{\pi}{2}$, but when the limits are changed to $0$ and $\frac{\pi}{4}$, it becomes more complicated.
I tried using $$\cos(t)=\frac{e^{it}+e^{-it}}{2},$$
then rewriting it as:
$$\int_{0}^{\frac{\pi}{4}}\ln\left(\frac{e^{it}+e^{-it}}{2}\right)=\int_{0}^{\frac{\pi}{4}}\ln(e^{it}+e^{-it})dt-\int_{0}^{\frac{\pi}{4}}\ln(2)dt.$$
But, this is where I get stuck.
Maybe factor out an $e^{it}$ and get $$\int_{0}^{\frac{\pi}{4}}\ln(e^{it}(1+e^{-2it}))dt=\int_{0}^{\frac{\pi}{4}}\ln(e^{it})dt+\int_{0}^{\frac{\pi}{4}}\ln(1+e^{-2it})dt$$
I thought maybe the Taylor series for ln(1+x) may come in
handy in some manner. It being $\ln(1+x)=\sum_{k=1}^{\infty}\frac{(-1)^{k+1}x^{k}}{k}$
Giving $\int_{0}^{\frac{\pi}{4}}\sum_{k=1}^{\infty}\frac{(-1)^{k+1}e^{-2kit}}{k}$
Just some thoughts. I doubt if I am on to anything. I used a technique similar to this when solving $\int_{0}^{\frac{\pi}{2}}x\ln(\sin(x))dx$.
But, how in the world would the Catalan constant come into the
solution?. $K=\sum_{k=0}^{\infty}\frac{(-1)^{k}}{(2k+1)^{2}}\approx .916$
Your learned input is appreciated.
I dont know what a Catalan number is but the real part of the integral gets you the expression you are seeking. You have $$\int_{0}^{\frac{\pi}{4}}\ln(e^{it}+e^{-it})dt= i(2n\frac{\pi^2}{4}+\frac{\pi^2}{16}) + \int_{0}^{\frac{\pi}{4}}\sum_{k=1}^{\infty}\frac{(-1)^{k+1}e^{-2kit}}{k}$$
Here $n$ just appears because of the multivalued $\ln (e^{it})$ term but you can ignore it as they are imganiary. The expression you got correctly was
$$\int_{0}^{\frac{\pi}{4}}\left(\sum_{k=1}^{\infty}\frac{(-1)^{k+1}e^{-2kit}}{k}\right)dt$$
$$=\sum_{k=1}^{\infty}\left(\int_{0}^{\frac{\pi}{4}}\frac{(-1)^{k+1}e^{-2kit}}{k}dt\right)$$
$$=\sum_{k=1}^{\infty}\frac{(-1)^{k+1}(e^{-i\frac{k\pi}{2}}-1)}{(-2ki)k}= \sum_{k=1}^{\infty}\frac{(-1)^{k+1}(e^{-i\frac{k\pi}{2}})}{(-2ki)k}-\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{(-2ki)k}$$
The second summation in this expression is gonna remain imaginary forever, so leave it out. In the first term observe that the summand is going to be real only if $k=2n+1$ as n goes from $0$ to $\infty$.
Substituting $k=2n+1$, and $e^{i(2n+1)\frac{\pi}{2}}=(-1)^n i$ you get the real part of the entire thing as
$$\sum_{n=0}^{\infty}\frac{(-1)^{n}}{2(2n+1)^{2}}$$
$$=\frac{K}{2}$$