<s>[INST] 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?
 [/INST] \begin{array}{l}
\displaystyle \quad \int \cos 2 x \ln \left(\frac{\cos x+\sin x}{\cos x-\sin x}\right) d x
\\=\displaystyle \int \cos 2 x \ln \left(\tan \left(x+\frac{\pi}{4}\right)\right) d x \\
\displaystyle =\frac{1}{2} \int \ln \left(\tan \left(x+\frac{\pi}{4}\right)\right) d(\sin 2 x) \\
\displaystyle =\frac{1}{2} \sin 2 x \ln \left(\tan \left(x+\frac{\pi}{4}\right)\right)-\frac{1}{2} \int \frac{\sin 2 x \sec ^{2}\left(x+\frac{\pi}{4}\right) d x}{\tan \left(x+\frac{\pi}{4}\right)} \\
\displaystyle =\frac{1}{2} \sin 2 x \ln (\tan \left(x+\frac{\pi}{4}\right))-\frac{1}{2} \int \frac{\sin 2 x d x}{\sin \left(x+\frac{\pi}{4}\right) \cos \left(x+\frac{\pi}{4}\right)} \\
\displaystyle =\frac{1}{2} \sin 2 x \ln \left(\frac{\cos x+\sin x}{\cos x-\sin x}\right)-\int \frac{\sin 2 x}{\sin \left(2 x+\frac{\pi}{2}\right)} d x\\\displaystyle  =\frac{1}{2} \sin 2 x \ln \left(\frac{\cos x+\sin x}{\cos x-\sin x}\right)+\frac{1}{2} \int \frac{d(\cos 2 x)}{\cos 2 x} \\
\displaystyle =\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
\end{array}
</s>