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

2 Answers
Mar 8, 2018

The answer is #=e^x(2-x^2)+(x)(x-2)sec^2x+2(x-1)tanx#

Explanation:

We need

#(e^x)'=e^x#

#(tanx)'=sec^2x#

The product rule is

#(uv)'=u'v+uv'#

Here,

#u=-e^x+tanx#, #=>#, #u'=-e^x+sec^2x#

#v=x^2-2x#, #=>#, #v'=2x-2#

Therefore,

#f'(x)=(-e^x+sec^2x)(x^2-2x)+(-e^x+tanx)(2x-2)#

#=-x^2e^x+2xe^x+x^2sec^2x-2xsec^2x-2xe^x+2e^x+2xtanx-2tanx#

#=e^x(2-x^2)+(x)(x-2)sec^2x+2(x-1)tanx#

Mar 8, 2018

#e^x(2-x^2)+2tanx(x-1)+x(x+2)sec^2x#

Explanation:

We know that,
#y=u*v,# then, #(dy)/(dx)=u*(dv)/(dx)+v*(du)/(dx)#
Taking, #u=-e^x+tanxand v=x^2-2x#we get
#(du)/(dx)=-e^x+sec^2xand(dv)/(dx)=2x-2#
#:.(dy)/(dx)=(-e^x+tanx)(2x-2)+(x^2-2x)(-e^x+sec^2x)#
#=cancel(-2xe^x)+2e^x+2xtanx-2tanx-x^2e^x+x^2sec^2x+cancel(2xe^x)+2xsec^2x#
#=e^x(2-x^2)+2(x-1)tanx+x(x+2)sec^2x#