# integrate $\int^{\frac{\pi}{4}}_{0} \frac{\cos 2x-1}{\cos 2x+1}dx$

$$\int^{\frac{\pi}{4}}_{0} \frac{\cos 2x-1}{\cos 2x+1}dx$$

$$\int^{\frac{\pi}{4}}_{0} \frac{\cos 2x-1}{\cos 2x+1}dx=\int^{\frac{\pi}{4}}_{0} \frac{\cos 2x-1}{\cos 2x+1}\cdot\frac{\cos 2x-1}{\cos 2x-1}dx=\int^{\frac{\pi}{4}}_{0} \frac{\cos^2 2x-2\cos2x+1}{\cos^22x-1}dx$$

$$=\int^{\frac{\pi}{4}}_{0} \frac{\cos^2 2x-2\cos2x+1}{-\sin^22x}dx$$

$u=\cos2x$

$du=-2\sin2x$

Is this substitution is ok? or do dx must be in the numerator?

Remember the bisection/duplication formulas and note that $$\cos2x=2\cos^2x-1=1-2\sin^2x,$$ so your integral is $$\int_{0}^{\pi/4}-\frac{\sin^2x}{\cos^2x}\,dx = \int_{0}^{\pi/4}\frac{\cos^2x-1}{\cos^2x}\,dx = \int_{0}^{\pi/4}\left(1-\frac{1}{\cos^2x}\right)\,dx$$ Can you finish?
• @Leucippus See math.stackexchange.com/questions/1194139/… ;-) – egreg Feb 22 '16 at 21:19
• why in the denominator it is $\cos^2x$ and not $1-\cos^2x$? – gbox Feb 22 '16 at 21:30
• @gbox Because $\cos2x+1=2\cos^2x-1+1=2\cos^2x$; in the numerator we have $\cos2x-1=1-2\sin^2x-1=-2\sin^2x$ – egreg Feb 22 '16 at 21:31
• @gbox It's $[x-\tan x]_0^{\pi/4}=\frac{\pi}{4}-1$ – egreg Feb 22 '16 at 21:46