Minimize a function

407 Views Asked by At

I am trying to minimize the function $f(x) = \sqrt[x]{c\times x!}$ with respect to $x$($c>0$ is a constant), for $x>0$. I have tried plotting the function to examine its behavior, and it looks to me that if we consider values of $x>0$, this function should have a global minimum. However, I don't know how to solve this minimization problem analytically, as the derivative is a rather strange looking function.

1

There are 1 best solutions below

2
On BEST ANSWER

As @themathandlanguagetutor, consider $$f(x)=\Big[c \,\Gamma (x+1)\Big]^{\frac{1}{x}}$$ and assume $c>0$. Using logarithmic differentiation, we have $$\frac{f'(x)}{f(x)}=\frac 1 {x^2}\Big[x\, \psi (x+1)-\log (\Gamma (x+1))-\log (c) \Big]$$ So, we are looking for the zero of function $$g(x)=x\,\psi (x+1)-\log (\Gamma (x+1))-\log (c)$$ $$g'(x)=x \,\psi ^{(1)}(x+1) \quad >0 \quad \quad\forall x >0$$ So, only one solution.

Now, $\big[x\,\psi (x+1)-\log (\Gamma (x+1))\big]$ is very linear as soon as $x > 1$ and a good approximation of it is $$x\,\psi (x+1)-\log (\Gamma (x+1))=x+\frac{1}{2} (1-\log (2 \pi x))-\frac{1}{6 x}+O\left(\frac{1}{x^2}\right)$$ So, keeping the first and second terms, as an approximation, we need to solve $$x+\frac{1}{2} (1-\log (2 \pi x))=\log(c) \implies x=-\frac{1}{2} W_{-1}\left(-\frac{e}{\pi c^2}\right)$$ where $W_{-1}(.)$ is the second branch of Lambert function.

This would be the $x_0$ for Newton method.

Below are some results

$$\left( \begin{array}{ccc} c & x_0 & \text{solution} \\ 2 & 1.20556 & 1.39437 \\ 3 & 1.81582 & 1.93161 \\ 4 & 2.19930 & 2.29176 \\ 5 & 2.48314 & 2.56345 \\ 6 & 2.70899 & 2.78165 \\ 7 & 2.89662 & 2.96393 \\ 8 & 3.05712 & 3.12043 \\ 9 & 3.19732 & 3.25750 \\ 10 & 3.32177 & 3.37942 \\ 20 & 4.12296 & 4.16825 \\ 30 & 4.58111 & 4.62144 \\ 40 & 4.90271 & 4.94016 \\ 50 & 5.15051 & 5.18600\\ 60 & 5.35202 & 5.38606 \\ 70 & 5.52178 & 5.55470 \\ 80 & 5.66842 & 5.70041 \\ 90 & 5.79746 & 5.82868 \\ 100 & 5.91266 & 5.94323 \end{array} \right)$$ To give an idea about the convergence, let us try for $c=10^4$; the iterates would be (with a ridiculous number of figures) $$\left( \begin{array}{cc} n & x_n \\ 0 & 10.819975929577196143 \\ 1 & 10.836092659850328733 \\ 2 & 10.836092115380538490 \\ 3 & 10.836092115380537870 \end{array} \right)$$

So, we have a simple way to locate the minimum. Now, computing $f(x)$ does not make any problem.

Edit

Knowing the approximation $x_0$ we can improve a lot using one single iteration of Newton, Halley or Householder method. The simplest one will be $$x_1=x_0-\frac {g(x_0)}{g'(x_0)}$$ The above table will now be $$\left( \begin{array}{ccc} c & x_1 & \text{solution} \\ 2 & 1.39889 & 1.39437 \\ 3 & 1.93246 & 1.93161 \\ 4 & 2.29214 & 2.29176 \\ 5 & 2.56368 & 2.56345 \\ 6 & 2.78180 & 2.78165 \\ 7 & 2.96405 & 2.96393 \\ 8 & 3.12052 & 3.12043 \\ 9 & 3.25758 & 3.25750 \\ 10 & 3.37948 & 3.37942 \\ 20 & 4.16828 & 4.16825 \\ 30 & 4.62146 & 4.62144 \\ 40 & 4.94018 & 4.94016 \\ 50 & 5.18601 & 5.18600\\ 60 & 5.38607 & 5.38606 \\ 70 & 5.55470 & 5.55470 \\ 80 & 5.70042 & 5.70041 \\ 90 & 5.82869 & 5.82868 \\ 100 & 5.94323 & 5.94323 \end{array} \right)$$

In other words, for practical applications, one single iteration of Halley or Householder methods will give the solution.

For illustration, for the case of $c=10^4$, here are the values ofhe first iterate as a function of the order of the method $$x_1^{(2)}=\color{red}{10.836092}6598503$$ $$x_1^{(3)}=\color{red}{10.83609211}48391$$ $$x_1^{(4)}=\color{red} {10.83609211538}11$$ $$x_1^{(\infty)}=\color{red}{10.83609211538054}$$

It must be noticed that $f(x_0)\times f''(x_0) <0 \quad \forall c$ which, by Darboux theorem, means that we shall face one overshoot of the solution along the path to convergence. At the opposite $f(x_1)\times f''(x_1) >0 \quad \forall c$ which will avoid it.