How do you differentiate f(x)=(x-e^x)(cosx+2x) using the product rule?

1 Answer
May 27, 2016

=ex\sin (x)-4ex-x\sin (x)+4x+\cos (x)-e\cos(x)

Explanation:

\frac{d}{dx}((x-ex)(cos (x)+2x))

Applying product rule,
(f\cdot g)^'=f^'\cdot g+f\cdot g^'

f=x-ex,\g=\cos (x)+2x

=\frac{d}{dx}(x-ex)(\cos (x)+2x)+\frac{d}{dx}(cos (x)+2x)(x-ex\)

We know,
\frac{d}{dx}(x-ex)=1-e
\frac{d}{dx}(\cos \(x)+2x)=-\sin \(x)+2

Finally,
=(1-e)\(\cos (x\)+2x\)+\(sin (x)+2\)(x-ex)

Simplifying it,
=ex\sin (x)-4ex-x\sin (x)+4x+\cos (x)-e\cos(x)