<s>[INST] correct combination of differentiation rules I am trying to calculate the derivative of a rather complex function for my homework. I think I have found the solution, it just seems too bulky for my taste. See the bottom for specific questions I have regarding my solution.
$ f(x)=\frac{\overbrace{\sin x}^\text{u(x)}\cdot \overbrace{e^x+x^3}^\text{v(x)}}{\underbrace{x^3+2x+2}_\text{w(x)}} $
$ u'(x)=\cos x $, $ v'(x)=e^x+3x^2 $, $ w'(x)=3x^2+4x $
$ \begin{align*}
u'v'(x)&=(\sin x\cdot e^x+3x^2)+(\cos x\cdot x^3)\\
&= e^x\cdot\sin x+3x\cdot\sin x+x^3\cdot\cos x
\end{align*} $
$ \begin{align*}
f'(x)&= \frac{u'v'(x)\cdot w(x)-w'(x)\cdot uv(x)}{w(x)^2}\\
&= \frac{(e^x\cdot\sin x+3x\cdot\sin x+x^3\cdot\cos x)\cdot (x^3+2x^2+2)-(3x^2+4x)(\sin x\cdot e^x+x^3)}{(x^3+2x^2+2)^2}
\end{align*} $
The obvious question: Is this derivative correct?
Especially:


*

*Is it really possible to calculate the derivative by splitting the function into part-functions and calculating them together following the differentiation rules, the way I did it?

*Is it possible to reduce the summands by applying some rule I am not aware of? E.g. reducing $(e^x\cdot\sin x+3x\cdot\sin x+x^3\cdot\cos x)$ to something with just one $\sin$ or something?
 [/INST] Your solution is pretty close, but remember that you're not multiplying $\sin x$ by $(e^x + x^3)$ in your numerator, as you do when you try to multiply $u'(x)$ by $v'(x).$ Instead, try differentiating your numerator in the following form: $e^x\sin x + x^3.$ I believe the rest will follow from the quotient rule.
$n(x) = e^x\sin x$
$d(x) = x^3 + 2x + 2$
$n'(x) = e^x \cos x + e^x\sin x$
$d'(x) = 3x^2 + 2$
$\frac{d}{dx} \frac{n(x)}{d(x)} = \frac{n'(x)d(x) - d'(x)n(x)}{d(x)^2}$
$ = \frac{(e^x\cos x + e^x\sin x)(x^3 + 2x + 2) - (3x^2+2)(e^x\sin x)}{(x^3 + 2x + 2)^2}$
which is messy but can be simplified.
</s>