Maximum of the function $f_n(x) = (1 - (1 - x^2)^n) / x$

120 Views Asked by At

Consider the following function $f_n$ defined on the interval $(0,1]$: $$f_n(x) = \frac{1 - (1 - x^2)^n}{x}$$ Determine the maximum of this function for any natural number $n$.

I have computed the derivative of this function: $f_n(x)' = \frac{2n x^2(1 - x^2)^{n - 1} + (1 - x^2)^n - 1 }{x^2}$, and from $f_n(x)' = 0$ and by denoting $t := 1 - x^2 \in [0, 1]$, I obtained: $(1 - 2n)t^n + 2nt^{n - 1} -1= 0$. Now to determine the roots of this polynomial in $t$ I denoted the function $g(t) = (1 - 2n)t^n + 2nt^{n - 1} -1$, and computing the derivative of $g$, we get that $g$ is increasing when $t \in [0, 1 - \frac{1}{2n - 1}]$ and is decreasing when $t \in [1 - \frac{1}{2n - 1}, 1]$. Then $g(0) = -1$, $g(1) = 0$, and $g(1 - \frac{1}{2n - 1}) > 0$. Therefore from this we deduce that the unique maximum $t$ belongs to $[0, 1 - \frac{1}{2n-1}]$, or in other words the unique $x$ that maximizes $f$ lies in $[\frac{1}{\sqrt{2n - 1}}, 1]$.

But I couldnt go beyond this point and if anyone has any ideas I would really appreciate it.

3

There are 3 best solutions below

7
On BEST ANSWER

I will add on to dezdichado's answer to find the exact constant on the rate of growth of the maximum. Let $x = \frac{c}{\sqrt{n}} + O\left(n^{-3/2}\right)$. Since it must be true that $$\lim_{n \to \infty}(1-2n)\left( 1-x^2 \right)^{n} + 2n\left(1-x^2 \right)^{n-1}-1=0$$

$x = \frac{c}{\sqrt{n}}$ can be plugged into this to get $$\lim_{n \to \infty}(1-2n)\left( 1-\left(\frac{c}{\sqrt{n}}\right)^2 \right)^{n} + 2n\left(1-\left(\frac{c}{\sqrt{n}}\right)^2 \right)^{n-1}-1=0$$

Equivalently, this is $$\lim_{n \to \infty}\left( 2c^2\left( 1-\frac{c^2}{n} \right)^{n-1}+\left( 1-\frac{c^2}{n} \right)^{n}-1 \right) = 0$$

Since $\lim_{n \to \infty} \left( 1 + \frac{x}{n} \right)^n = e^x$, this simplifies to $$(2c^2 +1)e^{-c^2}-1=0$$

$c$ is then the positive solution of $\left(2c^2+1\right)e^{-c^2}=1$. The maximal value is then given by $$\frac{2c}{2c^2+1}\sqrt{n} + O\left(n^{-1/2}\right) \approx 0.638 \sqrt{n} + O\left( n^{-1/2} \right)$$

Here are some numerical results concerning the accuracy of this approximation.

$$\left( \begin{array}{cccc} n & \text{actual maximum} & \text{approximation} & \text{relative error} \\ 10 & 2.084592 & 2.018079 & 3.1907 \cdot 10^{-2} \\ 100 & 6.401867 & 6.381727 & 3.1459 \cdot 10^{-3} \\ 1000 & 20.18713 & 20.18079 & 3.1416 \cdot 10^{-4} \\ 10000 & 63.81927 & 63.81727 & 3.1411 \cdot 10^{-5} \\ 100000 & 201.8086 & 201.8079 & 3.1411 \cdot 10^{-6} \\ \end{array} \right)$$

0
On

If you consider $f_n(\frac{1}{\sqrt{n}})$ for large $n$, then the numerator: $$1 - \left(1-\frac 1n\right)^n\sim1 - e^{-1}$$ and therefore your function is at that value is roughly: $$f_n\left(\frac{1}{\sqrt{n}}\right)\sim\sqrt{n}(1-e^{-1}).$$ This means that the maximum of $f_n(x)$ tends to infinity as $n\to\infty.$

For $n = 50,$ wolfram alpha gives the maximum as $4.54$, while the above expression is about $4.469,$ so the maximum for each given $n$ does not seem far off from the above heuristics.

Wolfram for $n = 50.$

0
On

Starting from @Varun Vejalla's solution $$(2c^2 +1)e^{-c^2}-1=0\tag 1$$ let $t=2c^2+1$ to make $$\sqrt e\, e^{-\frac{t}{2}} t-1=0$$ Now let $t=2u$ to make $$2\sqrt e\,u \,e^{-u}-1=0$$ that is to say $$u \,e^{-u}=\frac 1{2\sqrt e}\implies u=-W_{-1}\left(-\frac{1}{2 \sqrt{e}}\right)$$ where $W(.)$ is Lambert function.

Back to $c$, the solution of $(1)$ is then $$c=\sqrt{-\frac{1}{2} \left(1+2 W_{-1}\left(-\frac{1}{2 \sqrt{e}}\right)\right)}$$ $$\frac{2c}{2c^2+1}=-\frac{\sqrt{-\frac{1}{2} \left(1+2 W_{-1}\left(-\frac{1}{2 \sqrt{e}}\right)\right)}}{W_{-1}\left(-\frac{1}{2 \sqrt{e}}\right)}\approx 0.638173$$

Now, we can push the expansion to higher orders and get for $$\frac{\sqrt{n} \left(1-\left(1-\frac{c^2}{n}\right)^n\right)}{c}$$ $$\frac{1-e^{-c^2}}{c}\sqrt n\left(1+\frac{c^4}{2 \left(e^{c^2}-1\right) n}-\frac{c^6 \left(3 c^2-8\right)}{24 \left(e^{c^2}-1\right) n^2}+O\left(\frac{1}{n^3}\right)\right)$$ This would give $$\left( \begin{array}{cc} n & \text{approximation} \\ 10 & 2.08428 \\ 100 & 6.40186 \\ 1000 & 20.1871 \\ 10000 & 63.8193 \\ 100000 & 201.809 \\ 1000000 & 638.173 \end{array} \right)$$

Edit

If we consider

$$(1-2n)\left( 1-\left(\frac{c}{\sqrt{n}}\right)^2 \right)^{n} + 2n\left(1-\left(\frac{c}{\sqrt{n}}\right)^2 \right)^{n-1}-1=0$$ and expand it for large values of $n$, we have directly $$\left((2c^2+1) e^{-c^2} -1\right)-\frac{c^4 \left(2 c^2-3\right) e^{-c^2}}{2 n}+O\left(\frac{1}{n^2}\right)$$ then the value of $c$.

Now, replacing $e^{-c^2}$ by $\frac 1 {2c^2+1}$, the simpler result $$\frac{2 c }{2 c^2+1}\sqrt{n} \left(1+\frac{c^2}{4 n}+\frac{c^4 \left(8-3 c^2\right)}{48 n^2}+\frac{c^6 \left(c^4-8 c^2+12\right)}{96 n^3}+O\left(\frac{1}{n^4}\right) \right)$$ which, for $n=50$ gives $4.54116$ to be compared to the result $4.54118$ from Wolfram Alpha as reported by @dezdichado.

It is interesting to notice that $\frac{2 c }{2 c^2+1}\approx 0.638173$ while $(1-e^{-1}) \approx 0.632121$.

Pushing the expansion to much higher orders such as $O\left(\frac{1}{n^{10}}\right)$, it is possible to correctly estimate the results for small values of $n$ $$\left( \begin{array}{ccc} n & \text{approximation} & \text{solution}\\ 2 & 1.08728 & 1.08866 \\ 3 & 1.24187 & 1.24281 \\ 4 & 1.38937 & 1.39000 \\ 5 & 1.52553 & 1.52598 \\ 6 & 1.65166 & 1.65200 \\ 7 & 1.76940 & 1.76967 \\ 8 & 1.88010 & 1.88032\\ 9 & 1.98483 & 1.98502 \\ 10 & 2.08443 & 2.08459 \end{array} \right)$$