Doing definite integration $\int_0^{\pi/4}\frac{x\,dx}{\cos x(\cos x + \sin x)}$ We have to solve the following integration
$$
\int_0^{\pi/4}\frac{x\,dx}{\cos x(\cos x + \sin x)}
$$
I divided both in Nr and Dr by $\cos^2 x$.
But after that I stuck.

\begin{align}
\int_0^{\pi/4}\frac{x\,dx}{\cos x(\cos x + \sin x)} &= \int_0^{\pi/4}\frac{x\,dx}{\cos^2(x)+\cos(x)\sin(x)}\\ &=\int_0^{\pi/4}\frac{2x\,dx}{\cos(2x)+\sin(2x)+1} \\&=\frac{1}{2}\int_0^{\pi/2}\frac{t\,dt}{\cos(t)+\sin(t)+1} 
\end{align}
By $t \to 1-t$
$$I =\frac{1}{2}\int_0^{\pi/2}\frac{(\pi/2-t)\,dt}{\cos(t)+\sin(t)+1} $$
Separate the integrals 
$$I =\frac{1}{2}\int_0^{\pi/2}\frac{(\pi/2)\,dt}{\cos(t)+\sin(t)+1} -I$$
$$I  = \frac{\pi}{8}\int_0^{\pi/2}\frac{\,dt}{\cos(t)+\sin(t)+1} = \frac{\pi}{8}\log(2)$$
The last integral could be solved using Weierstrass substitution.
