Getting wrong answer trying to evaluate $\int \frac {\sin(2x)dx}{(1+\cos(2x))^2}$ I'm trying to evaluate $$\int \frac {\sin(2x)dx}{(1+\cos(2x))^2} = I$$
Here's what I've got:
$$t=1+\cos(2x)$$
$$dt=-2\sin(2x)dx \implies dx = \frac {dt}{-2}$$
$$I = \int \frac 1{t^2} \cdot \frac {-1}2 dt = -\frac 12 \int t^{-2}dt = -\frac 12 \frac {t^{-2+1}}{-2+1}+C$$
$$=-\frac 12 \frac {t^{-1}}{-1}+C = \frac 1{2t} +C = \frac 1{2(1+\cos(2x)}+C$$
I need to find what went wrong with my solution. I know the answer is correct but the line $dt=-2\sin(2x)dx$ concludes that $dx=\frac {dt}{-2}$ is false.  But why?  What should it be instead?
 A: Probably, you saw the solution as
$$\frac{\sec^2(x)}{4}+C$$
But note that
$$\begin{array}{rclcc}
\frac{1}{2}\frac{1}{1+\cos(2x)}&=&\frac{1}{2}\frac{1}{1+\cos^2(x)-\sin^2(x)}&/\,\,\cos(2x)=\cos^2(x)-\sin^2(x)\\
&=&\frac{1}{2}\frac{1}{1+\cos^2(x)-\sin^2(x)}&/\,\,1=\cos^2(x)+\sin^2(x)\\
&=&\frac{1}{2}\frac{1}{2\cos^2(x)}\\
&=&\frac{\sec^2(x)}{4}\end{array}$$
A: the derivative of your function is given by $$\frac{1}{2}\left(\left(\left(1+\cos(2x)\right)\right)^{-1}\right)'$$$$=-\frac{1}{2}\left(1+\cos(2x)\right)^{-2}(-\sin(2x)\cdot 2)$$
this is your function  
A: Perhaps simpler:
$$\begin{cases}1+\cos2x=1+2\cos^2x-1=2\cos^2x\\{}\\\sin2x=2\sin x\cos x\end{cases}\;\;\;\;\;\;\;\;\;\;\;\implies$$
$$\int\frac{\sin2x}{(1+\cos2x)^2}=\int\frac{2\sin x\cos x}{4\cos^4x}dx=-\frac12\int\frac{(\cos x)'dx}{\cos^3x}=-\frac12\frac{\cos^{-2}x}{-2}+C=$$
$$=\frac14\sec^2x+C\ldots\ldots\text{and your solution is correct, of course}$$
using that
$$\int\frac1{x^3}dx=-\frac12\frac1{x^2}+c\implies \int\frac{f'(x)}{f(x)^3}dx=-\frac1{2f(x)^2}+c$$
A: Your solution is good. The substitution $t=1+\cos2x$ gives
$$
dt=-2\sin2x\,dx
$$
so the integral becomes
$$
\int\frac{\sin2x}{(1+\cos2x)^2}\,dx=\int-\frac{1}{2}\frac{1}{t^2}\,dt=\frac{1}{2t}+C=\frac{1}{2(1+\cos2x)}+C
$$
Differentiating shows the correctness. However, there's no “canonical” answer; if you notice that $1+\cos2x=2\cos^2x$ you can as well rewrite the answer as
$$
\frac{1}{4\cos^2x}+C
$$
but also as
$$
\frac{1+\tan^2x}{4}+C
$$
or infinitely many variations thereof.
A: Your only error was where you said
$$dt=-2\sin(2x)dx \implies dx = \frac {dt}{-2}$$
You should have said
$$dt=-2\sin(2x)dx \implies \sin(2x)dx = \frac {dt}{-2}$$
You need the $\sin(2x)$ because the original integral has it in the numerator:
$${\sin(2x)dx\over(1+\cos(2x))^2}={1\over(1+\cos(2x))^2}(\sin(2x)dx)={1\over t^2}\cdot{dt\over-2}$$
Everything else you did was fine, if perhaps a little overly elaborated.
A: $$\int \frac {\sin(2x)dx}{(1+\cos(2x))^2} = [1+cos2x = u, -2sin2x dx = du] = -0.5 \int \frac {du}{u^2}= \frac{0.5}{u}+c=\frac{1}{2+2cos2x}+c  $$
