What is the derivative of $\frac{x}{2-\tan x}$? I am too stupid to figure this out so I won't even try anymore
$$y = \frac{x}{2 - \tan x}$$
I am sure this will take someone about four seconds to solve, but I spent about ten minutes looking at it and I have no clue how to continue, this is probably wrong but I ended up with this.
$$ \frac{2\tan x - 2x + x\tan x}{4 - \tan x + \tan^2 x}$$
No clue how to continue from there and it might be wrong, I can't keep the signs straight and I am not sure if I distributed it correctly, I could be wrong on that part.
 A: Using the quotient rule:
$$y' = \dfrac{\frac{d}{dx}(x)\cdot (2 - \tan x) - x\cdot\frac{d}{dx}(2 - \tan x) }{(2 - \tan x)^2}$$
Now $$\bf\frac d{dx}(2 - \tan x) = \frac d{dx}(2) - \frac d{dx}(\tan x) = 0 - (\sec^2 x) = -\sec^2 x,\;$$ (this one place where you "mis-stepped", I believe).
And clearly $\quad\frac{d}{dx}(x) = 1$.
The other "mis-step" is in your computation of $\;(2 - \tan x)^2.\quad $ So the denominator will be $\;(2 - \tan x)^2 = 4 - 4\tan x + \tan^2 x$: 
$$y' = \dfrac{1\cdot(2 - \tan x) - ( x(-\sec^2 x))}{4 - 4\tan x + \tan^2x} = \frac{2 - \tan x + x\sec^2 x}{4 - 4\tan x + \tan x^2}$$
A: $$
y' = \left ( \frac x{2-\tan x} \right )' = \frac {x' (2- \tan x) - x (2-\tan x)'}{(2-\tan x)^2} = \frac {2 - \tan x - x \left (-\tan x \right )'}{(2-\tan x)^2} = \\
= \frac {2 -\tan x + \frac x{\cos^2 x}}{(2-\tan x)^2} = \frac {2 \cos^2 x - \sin x \cos x + x}{\cos^2 x (2-\tan x)^2} = \frac {2 \cos^2 x - \sin x \cos x + x}{(2\cos x-\sin x)^2}
$$
Probably you can simplify it little bit more, using double angles, $\sin x$ and $\cos x$ combinations, and such, but in general it should be sufficient. 
