To find equation of tangent line of #f(x)=xcosx-e^xtanx# at #x=pi/4#, we should first find the slope of the tangent and value of function at #x=pi/4#. Then, we can get the equation of the tangent from point slope form of the equation.
At #x=pi/4#, #f(x)=pi/4cos(pi/4)-e^(pi/4)xx1=0.7854xx0.7071-2.19328=-1.638#
Slope of tangent at #x=pi/4# is given by value of #(dy)/(dx)# at #x=pi/4#.
#(df)/(dx)=cosx-xsinx-e^xtanx-e^xsec^2x#, the slope at #x=pi/4# will be
#cos(pi/4)-pi/4sin(pi/4)-e^(pi/4)tan(pi/4)-e^(pi/4)sec^2(pi/4)#
= #sqrt2/2-pi/4sqrt2/2-e^(pi/4)xx1-e^(pi/4)xx2#
= #sqrt2/2(1-pi/4)-3e^(pi/4)=0.7071(1-0.7854)-3xx2.19328#
= #-6.428#
Hence slope of tangent is #-6.428#
Hence, equation of tangent line is
#(y+1.638)=-6.428(x-0.7854)#