What is the equation of the tangent line of #f(x)=e^xsinx-xcosx# at #x=pi/4#?

1 Answer
Nov 21, 2016

In #y=m(x-x_1)+y_1# form, the answer is
#y=sqrt2[e^(pi/4)-1/2+pi/8] (x-pi/4)+(sqrt2/2)[e^(pi/4)-pi/4]#.

Explanation:

To find the equation of a line, we need one of the following:
a) a slope and an intercept: #y=mx+b#
b) a slope and a point: #y-y_1=m(x-x_1)#
c) two points: #m=(y_2-y_1)/(x_2-x_1)=>y=m(x-x_1)+y_1#

The easiest of these to get is (b). We have a point—that is, #x=pi/4# and #f(x)=f(pi/4)#. Plus, it is easy to get the slope at this point by finding the value of the derivative of this function at the given #x#:

#f(x)=e^xsinx-xcosx#
#=>f'(x)=e^xsinx+e^xcosx-[(1)cosx+x(-sinx)]#
#=>f'(x)=e^x(sinx+cosx)-[cosx-xsinx]#

Now we plug in our given value of #x=pi/4# to find the slope of #f(x)# at that point:

#f'(pi/4)=e^(pi/4)[sin(pi/4)+cos(pi/4)]-[cos(pi/4)-(pi/4)sin(pi/4)]#
#=e^(pi/4)[sqrt2/2+sqrt2/2]-[sqrt2/2-(pi/4)sqrt2/2]#
#=e^(pi/4)[sqrt2]-[(1-pi/4)sqrt2/2]#
#=sqrt2[e^(pi/4)-1/2+pi/8]approx2.95#

Next, we find the value of the original function #f(x)# at #x=pi/4#:

#f(pi/4)=e^(pi/4)sin(pi/4)-xcos(pi/4)#
#=e^(pi/4)(sqrt2/2)-pi/4(sqrt2/2)#
#=(sqrt2/2)[e^(pi/4)-pi/4]approx1.00#

Finally, we plug these values into our line equation in (b):

#y-y_1=m(x-x_1)#
#=>y-(sqrt2/2)[e^(pi/4)-pi/4]=sqrt2[e^(pi/4)-1/2+pi/8] (x-pi/4)#
#=>y=sqrt2[e^(pi/4)-1/2+pi/8] (x-pi/4)+(sqrt2/2)[e^(pi/4)-pi/4]#

This looks quite nasty, yes, but exact answers aren't always pretty. However, it can be visually simplified using the above approximations in place of #m# and #y_1#, plus #pi/4approx0.79#:

#yapprox2.95(x-0.79)+1.00#
#yapprox2.95x-2.32+1.00#
#yapprox2.95x-1.32#