Let .
The derivative of is itself.
Then, apply the chain rule. Multiply by :
Apply the product rule:
; to find :
Apply the power rule: goes to
; to find :
The derivative of cosine is negative sine:
The result is:
The result of the chain rule is:
The answer is:
/ 3 \ x*cos(x) \- (-cos(x) + x*sin(x)) - 3*cos(x) + x*sin(x) + 3*(-cos(x) + x*sin(x))*(2*sin(x) + x*cos(x))/*e