# Math Help - Derivative Calculation

1. ## Derivative Calculation

Given:

$y= \frac{sin^2 x}{1+ ctgx} +$ $\frac{cos^2 x}{1+ ctgx}$

Find $y'$

I know that answer is $-cos2x$, but can't calculate it.

I got so far:

$y'=(\frac{sin^2 x}{1+ ctgx} +\frac{cos^2 x}{1+ ctgx} )'= \frac{(sin^2 x)'(1+ ctgx) - sin^2 x (1+ ctgx)'}{(1+ ctgx)^2}$ + $\frac{(cos^2 x)'(1+ tgx) - cos^2 x (1+ tgx)'}{(1+ tgx)^2} =$

$
=\frac{2sinx(1+ctgx)+1}{(1+ ctgx)^2} +\frac{2cos x(1+tgx)-1}{(1+ tgx)^2}
$

2. I spot one crucial error. There might be more but you need to correct this one first.

$(\cos^2(x))' = -2\cos(x)\sin(x)$ and $(\sin^2(x))' = 2\sin(x)\cos(x)$