Numerical Analysis – Locating Maximum Point of Specific Function

na.numerical-analysisreal-analysis

I am trying to observe the behavior of $x_n \in (0,1)$ defined such that the function
\begin{equation}
f_n(x):=e^{-1/x}\Bigl(1+\frac{1}{n^2 x^n} \Bigr)
\end{equation}

attains its maximum inside the interval $(0,1)$ at $x=x_n$.

Upon using the Wolfram alpha, I have found out that as $n \to \infty$ it seems that $x_n \to 0^+$ and
\begin{equation}
\int_0^1 f_n(x) dx \leq 2 \int_0^{2x_n} f_n(x)dx.
\end{equation}

That is, as $n \to \infty$, the graph of $f_n$ on $(0,1)$ is sufficiently localized around its maximum value.

Now my question are the following two:

  1. I am trying to estimate the rate at each $x_n \to 0^+$ as $n \to \infty$. But I cannot find a nice way to do so.

  2. Is the above estimate for the integral correct? How one can prove it? Could anyone please help me with it as well?

This kind of analysis is quite new to me, so I am a bit stuck. I deeply appreciate any help.

Best Answer

The maximum $x_n$ of $$f_n(x):=e^{-1/x}\Bigl(1+\frac{1}{n^2 x^n} \Bigr)$$ is the smallest solution in $(0,1)$ of the equation $$x=n x^n+\frac{1}{n}.$$ For $n\gg 1$ this gives $x_n\rightarrow 1/n$.

The integral is given by $$\int_0^1 f_n(x)dx=\text{Ei}(-1)+n^{-2}\,\Gamma (n-1,1)+1/e$$ $$\qquad\rightarrow \sqrt{2 \pi } e^{-n} n^{n-\frac{7}{2}}\;\;\text{for}\;\;n\gg 1.$$

Here is a comparison of the exact integral (gold data points) and the asymptote (blue) --- the difference is hardly noticeable for $n>10$.

Related Question