evaluation of $\int \cos (2x)\cdot \ln \left(\frac{\cos x+\sin x}{\cos x-\sin x}\right)dx$ 
Compute the indefinite integral
  $$
\int \cos (2x)\cdot \ln \left(\frac{\cos x+\sin x}{\cos x-\sin x}\right)\,dx
$$

My Attempt:
First, convert
$$
\frac{\cos x+\sin x}{\cos x-\sin x} = \frac{1+\tan x}{1-\tan x} = \tan \left(\frac{\pi}{4}+x\right)
$$
This changes the integral to
$$
\int \cos (2x)\cdot \ln \left(\tan \left(\frac{\pi}{4}+x\right)\right)\,dx
$$
Now let $t=\left(\frac{\pi}{4}+x\right)$ such that $dx = dt$. Then the integral with changed variables becomes
$$
\begin{align}
\int \cos \left(2t-\frac{\pi}{2}\right)\cdot \ln (\tan t)dt &= \int \sin (2t)\cdot \ln (\tan t)dt\\
&= -\ln(\tan t)\cdot \frac{\cos (2t)}{2}+\frac{1}{2}\int \frac{\sec^2(t)}{\tan t}\cdot \cos (2t)\\
&= -\ln(\tan t)\cdot \frac{\cos (2t)}{2}+\frac{1}{2}\int \cot (2t)dt\\
&= -\ln(\tan t)\cdot \frac{\cos (2t)}{2}+\frac{1}{2}\ln \left|\sin (2t)\right|
\end{align}
$$
where $t=\displaystyle \left(\frac{\pi}{4}+x\right)$.
Is this solution correct? Is there another method for finding the solution?

$$
\begin{aligned}
I&=\frac{1}{2} \int \cos 2 x \ln \left(\frac{\cos x+\sin x}{\cos x-\sin x}\right)^{2} d x \\
&=\frac{1}{2} \int \cos 2 x \ln \left(\frac{1+\sin 2 x}{1-\sin 2 x}\right) d x \\
& =\frac{1}{4} \int \ln \left(\frac{1+y}{1-y}\right) d y, \text { where } y=\sin 2 x\\
&\stackrel{y=\sin 2x}{=} \frac{1}{4}\left[y \ln \left(\frac{1+y}{1-y}\right)+\int \frac{2 y}{y^{2}-1} d y\right] \\
&=\frac{1}{4}\left[y \ln \left(\frac{1+y}{1-y}\right)+\ln \left|y^{2}-1\right|\right]+C
\end{aligned}$$
Now we can conclude that
$$
I=\frac{1}{2} \sin 2 x \ln \left(\frac{\cos x+\sin x}{\cos x-\sin x}\right)+\frac{1}{2} \ln |\cos 2 x|+C
$$
