How find $dy/dx$ $y= \frac{x^2+\sin2x}{2x+\cos^2 x}$ $$dy/dx\space\space y= \frac{x^2+\sin2x}{2x+\cos^2x}$$

We need the quotient rule and the chain rule to find $\frac {dy}{dx} = y'$ given $$y= \frac{x^2+\sin2x}{2x+\cos^2x}$$
Given a quotient of functions: $f(x) = \frac{g(x)}{h(x)}$
$$f'(x) = \frac{g'(x)h(x) - g(x)h'(x)}{[h(x)]^2}$$
In your case, we have $$f(x) = \frac{x^2+\sin2x}{2x+\cos^2x}$$
So put $g(x) = x^2 + \sin 2x,\;$ and $\;h(x) = 2x + \cos^2x$.
Now, $g'(x) = 2x + 2\cos 2x,\;$ and $\;h'(x) = 2 - 2\cos x \sin x = 2 - \sin(2x)$.
So $$f'(x) = \frac{g'(x)h(x) - g(x)h'(x)}{[h(x)]^2}$$ $$f'(x) = \frac{dy}{dx} = \frac{(2x + 2\cos 2x)(2x + \cos^2 x) + (x^2 + \sin 2x)(2 - \sin 2x)}{\left(2x + \cos^2 x\right)^2}$$
The rest is of the work is merely algebraic simplification.
