Use implicit differentiation where LaTeX:  \displaystyle y is a function of LaTeX:  \displaystyle x to find the derivative of LaTeX:  \displaystyle - 6 y^{3} e^{x} - 2 \log{\left(x \right)} \cos{\left(y^{2} \right)}=21

Taking the derivative of both sides using implicit differentiation gives: LaTeX:   - 6 y^{3} e^{x} - 18 y^{2} y' e^{x} + 4 y y' \log{\left(x \right)} \sin{\left(y^{2} \right)} - \frac{2 \cos{\left(y^{2} \right)}}{x} = 0  Solving for LaTeX:  \displaystyle y' gives LaTeX:  \displaystyle y' = - \frac{3 x y^{3} e^{x} + \cos{\left(y^{2} \right)}}{x y \left(9 y e^{x} - 2 \log{\left(x \right)} \sin{\left(y^{2} \right)}\right)}