Differentiate given
$$\frac{y}{x-y}=x^2+1$$
Initially I wanted to use the quotient rule to solve this, but then I tried differentiating it as it is:
$$\frac {y_\frac{dy}{dx}}{1-y_\frac{dy}{dx}}=2x$$
$$\frac{dy}{dx}(y y^{-1})=2x$$
$$\frac{dy}{dx}=\frac{2x}{yy^{-1}}$$
$$\frac{dy}{dx}=\frac{2xy}{y}$$
$$\frac{dy}{dx}=2x$$
I am wondering how I can check to see if this is a valid answer?