Answer
- That product sin x cot x looks awfully suspicious. It can be simplified:
We can rewrite the function as
f(x) = ex(x2 + 4x)cos x,
which has three factors instead of four. This is definitely an improvement. Since we have three factors we'll use the product rule twice. Break up the function as
f(x) = (ex(x2 + 4x))(cos x).
Then the outermost application of the product rule says that
f ' (x) = (ex(x2 + 4x))'(cos x) + (ex(x2 + 4x))(cos x)'.
We need to use the product rule again to find one of those derivatives:
(ex(x2 + 4x))' = (ex)'(x2 + 4x) + ex(x2 + 4x)'
= ex(x2 + 4x) + ex(2x + 4).
This can be simplified by factoring out ex:
= ex(x2 + 4x + 2x + 4)
= ex(x2 + 6x + 4)
Now go back to the outermost application of the product rule.
f ' (x) = (ex(x2 + 4x))'(cos x) + (ex(x2 + 4x))(cos x)'
= (ex(x2 + 6x + 4))cos x + (ex(x2 + 4x))(-sin x)
= (ex(x2 + 6x + 4))cos x – (ex(x2 + 4x))(sin x)
Since each term has a factor of ex, we'll factor that out:
f ' (x) = ex[(x2 + 6x + 4)cos x – (x2 + 4x)(sin x)]
And now we're done.