2

We have a function of $x$, which is given by \begin{equation} f(x)=\frac{x^2}{e^x-1} \end{equation} where $x \geq 0$.

Question: Does there exist a closed-form expression for the optimal $x$ that achieves the maximum of $f(x)$?

My approach

Let the derivative of $f(x)$ with respect to $x$ equal $0$: \begin{equation} \begin{aligned} \frac{2x(e^x-1)-x^2e^x}{(e^x-1)^2}&=0 \\ \Rightarrow 2x(e^x-1)-x^2e^x&=0 \qquad (1)\\ \Rightarrow e^x(2-x)&=2 \end{aligned} \end{equation} It seems that the above equation $(1)$ does not have a closed-form solution.

PM 2Ring
  • 4,844
Tyke
  • 145
  • Note that $f(0)$ is indeterminate, but we can use L'Hôpital's rule to show that $$\lim_{x\to 0}f(x)=0$$ and that's clearly the minimum of the function in the domain $x\ge 0$. FWIW, here's a graph. – PM 2Ring Jun 30 '21 at 09:30
  • Thank @PM 2Ring for correcting the grammatical errors in this question! ^-^ – Tyke Jun 30 '21 at 13:57

1 Answers1

1

The only non trivial explicit solution of $$e^x(2-x)=2$$ is given in terms of Lambert function $$x_*=2+W\left(-\frac{2}{e^2}\right)\sim 1.59362$$ $$f(x_*)=-W\left(-\frac{2}{e^2}\right) \left(W\left(-\frac{2}{e^2}\right)+2\right)\sim 0.64761$$

  • Thanks for your time! – Tyke Jun 30 '21 at 11:50
  • 1
    @HiBlank. You are welcome. I suggest you look at this beautiful function which has more and more applications. On the search bar of this site, just type Lambert; you will find $3616$ results ! Cheers :-) – Claude Leibovici Jun 30 '21 at 12:01
  • Thanks! I have searched the item “Lambert W Function” through this site and the Wiki, and I find helpful information about this function! ^-^! – Tyke Jun 30 '21 at 13:36
  • @HiBlank. I felt in love with Lambert function 64+ years ago. Look at simple applications on this site. You will be surprised. Glad to make you knowing it ! Cheers :-) – Claude Leibovici Jun 30 '21 at 13:45
  • I admire you insistence in the Lamber function! I can not believe that you can keep in love with a funciton so long time! It is amazing and wonderful! Cheers ^-^! – Tyke Jun 30 '21 at 13:51
  • @HiBlank The Lambert W function is very useful in problems like this, but it does take a bit of practice to learn how to manipulate an equation into a form where you can use the Lambert W. Fortunately, there are lots of examples on this site, many of them written by Claude. ;) – PM 2Ring Jun 30 '21 at 14:39
  • @HiBlank BTW, if you don't have access to the Lambert W, you can easily find the root of your equation using Newton's method. Here's a short Sage / Python script that shows how, (although Sage does have Lambert W). – PM 2Ring Jun 30 '21 at 14:40
  • @PM 2Ring Thanks a lot. It really takes long time for me to slove this problem with a closed form solution! – Tyke Jun 30 '21 at 15:44