For what value is the local minimum the largest?

If $f(x)=e^x-kx$ for $k>0$, find the values of $k$ for which the local minimum at $x=\ln(k)$ is the largest.

I found the derivative, which is $e^{x} - k$, and when I set that to $0$ I got $-e^{x}=k$. I'm not really sure if this is useful information and if it is, I am not sure how to use it to answer the questions, so I would appreciate any tips on where to go next! Thanks!

-
You can find some good starting points on how to format mathematics on the site here. This AMS reference is very useful. If you need to format more advanced things, there are many excellent references on LaTeX on the internet, including StackExchange's own TeX.SE site. – Zev Chonoles Feb 24 '13 at 22:56
Also, +1 for explaining your thoughts and efforts on the problem! – Zev Chonoles Feb 24 '13 at 22:56

$$x=\log k\Longrightarrow e^{\log k}-k\log k=k-k\log k$$

Take now the function

$$g(x):=x-x\log x\;\;,\;\;x>0\Longrightarrow g'(x)=1-\log x-1=-\log x=0\Longrightarrow x=1$$

and since $\,g''(x)=-\frac{1}{x}<0\,\,\;\;\;\forall\,\,x>0\,\;$ , the point $\,x= 1\,$ gives a maximum...

-

The local minimum, we are told, is at $x=\ln k$. We can also find that out for ourselves by differentiating.

Thus the (local) minimum value is $e^{\ln k}-k\ln k$, or more simply $k-k\ln k$. We want to maximize this function of $k$. So your task is to find the maximum value of $g(k)$, where $g(k)=k-k\ln k$. Use standard max/min tools.

Remark: You were finding the local min of $e^x-kx$, differentiated, got $e^x-k$. When you set this equal to $0$, you should get $e^x=k$, which yields $x=\ln k$.

-

Well, you know that the local minimum occurs at $x = \ln(k)$. So replace in your equation:

$$f(\ln(k)) = k - k\ln(k) = k(1-\ln(k)) = -k (\ln(k) - \ln(e)) = -k \displaystyle \ln \left (\frac{k}{e} \right ) = \ln \left (\frac{3}{k} \right)^k$$

Now, let $g(k) = \ln \left (\frac{3}{k} \right)^k$ and find, using differentiation, for which $k$ does this take its maximum value. That $k$ will be the desired one.

-