What are the local extrema of #f(x)= xlnx-xe^x#?

1 Answer
Mar 26, 2018

Answer:

This function has no local extrema.

Explanation:

#f(x)= xlnx-xe^x implies#

#g(x) equiv f^'(x) = 1+lnx - (x+1)e^x#

For #x# to be be a local extremum, #g(x)# must be zero. We will now show that this does not occur for any real value of #x#.

Note that

#g^'(x) = 1/x-(x+2)e^x,qquad g^{''}(x) = -1/x^2-(x+3)e^x#

Thus #g^'(x)# will vanish if

#e^x = 1/(x(x+2))#

This is a transcendental equation which can be solved numerically. Since #g^'(0) = +oo# and #g^'(1)=1-3e<0#, the root lies between 0 and 1. And since #g^{''}(0) <0# for all positive #x#, this is the only root and it corresponds to a maximum for #g(x)#

It is quite easy to solve the equation numerically, and this shows that #g(x)# has a maximum at #x=0.3152# and the maximum value is #g(0.3152) = -1.957#. Since the maximum value of #g(x)# is negative, there is no value of #x# at which #g(x)# vanishes.

It may be instructive to look at this graphically:

graph{xlog(x)-xe^x [-0.105, 1, -1.175, 0.075]}

As you can see from the graph above, the function #f(x)# actually has a maximum at #x=0# - but this is not a local maximum. The graph below shows that #g(x)equiv f^'(x)# never takes the value zero.

graph{1+log(x)-(x+1)*e^x [-0.105, 1, -3, 0.075]}