Solving the following maximization problem analytically?

100 Views Asked by At

Is it possible to solve the value of lambda that maximizes the following equation analytically?:

$$ \frac{1-e^{-30 \lambda}}{30 \lambda} - e^{-30 \lambda} $$,

So then the derivative is equal to:

$$ \frac{e^{-30\lambda}}{\lambda} - \frac{30}{900\lambda^2} + \frac{30e^{-30\lambda}}{900 \lambda^2} + 30e^{-30\lambda} = 0$$,

Is it possible to get an analytical solution for lambda or does it need to be solved numerically?

3

There are 3 best solutions below

0
On

By a simple calculation, a better closed form for the equation is $$e^{-30\lambda}={1\over 900\lambda^2+30\lambda+1}$$defining a new variable $u=30\lambda$ we obtain$$e^{u}={ u^2+u+1}$$ or$$u=\ln u^2+u+1$$ which has a trivial answer $u=0$ and the other roots can only be found numerically. The only non-trivial root is about $1.7933$. The function $f(u)=u-\ln (u^2+u+1)$ has been plotted below: enter image description here

Also the function to be plotted is as following

enter image description here

As can be seen, the only maximal point is $u\approx 1.7933$ equivalent to $\lambda\approx 0.0598$

0
On

Calling $y = 30\lambda$ we have

$$ f(y) = \frac 1y-\left(\frac 1y + 1\right)e^{-y} $$

now

$$ f'(y) = \frac{e^{-y} \left(y^2+y-e^y+1\right)}{y^2} = 0 $$

so making approximations

$$ 1+y+y^2-e^y\approx \frac{y^2}{2}-\frac{y^3}{3!}-\frac{y^4}{4!} = 0\to \frac 12 = \frac{y}{6}+\frac{y^2}{24} $$ and solving we obtain $y = \{-6,2\}$ so with a sufficient approximation the maximum is located at $y = 30\lambda = 2\to \lambda = \frac{1}{15}$

0
On

More than likely too complex but funny (at least to me !)

Starting from Mostafa Ayaz's answer, we can approximate the solution.

Using $x=30 \lambda$, consider $$f(x)=\frac {1-e^{-x}}x-e^{-x}$$ $$f'(x)=\frac{e^{-x} \left(x^2+x+1-e^x\right)}{x^2}$$ making that we look for the zeros of $$g(x)=x^2+x+1-e^x$$ The derivative $$g'(x)=2x+1-e^x$$ cancels at $x=0$ but also at $$x_*=-W_{-1}\left(-\frac{1}{2 \sqrt{e}}\right)-\frac{1}{2}\approx 1.25643$$ where $W(.)$ is Lambert function.

Now, approximate $g(x)$ by a Taylor expansion around $x=x_*$ $$g(x)=g(x_*)+\frac{1}{2} (x-x_*)^2 g''(x_*)+O\left((x-x_*)^3\right)$$ where $$g(x_*)=W_{-1}\left(-\frac{1}{2 \sqrt{e}}\right) \left(W_{-1}\left(-\frac{1}{2 \sqrt{e}}\right)+2\right)+\frac{3}{4}\approx 0.322188$$ $$g''(x_*)=2 \left(W_{-1}\left(-\frac{1}{2 \sqrt{e}}\right)+1\right)\approx-1.51286$$ All of that gives as an approximation of the required root of $g(x)=0$ $$x_0=x_*+ \sqrt{-2\frac{g(x_*)}{g''(x_*)}}\approx 1.90907$$ Using Newton method gives the following iterates $$\left( \begin{array}{cc} n & x_n \\ 0 & 1.90907 \\ 1 & 1.80890 \\ 2 & 1.79362 \\ 3 & 1.79328 \\ 4 & 1.79328 \end{array} \right)$$ then $\lambda\approx 0.059776$.

Notice that for $x=1.79328$ the maximum value of $f(x)$ is $\approx 0.298426$ while, for the approximate value $x_0$, it would be $\approx 0.297958$ (not so far !).