Limit of $\frac{1}{M} \int_1^M M^{\frac{1}{x}} \textrm{d} x$ when $M \to +\infty$ The exercise
Find the limit of
$$
\frac{1}{M} \int_1^M M^{\frac{1}{x}} \textrm{d} x
$$
when $M \to +\infty$.
My try
I tried a change-of-variable but as the lower bound of the integral is $1$ and not $0$, it wasn't successful. I showed that the limit, if it exists, is $\geq 1$. We also have: $\frac{1}{M} \int_1^M M^{\frac{1}{x}} \textrm{d} x = \int_1^M M^{\frac{1}{x}-1} \textrm{d} x$ and in the integral, $\frac{1}{x}-1 < 0$.
Any help is welcome.
 A: MacLaurin Expansion of $m^y$ is
$$m^y=1+y \log m+O\left(y^2\right)$$
Therefore
$$m^{1/x}=1+\frac{\log m}{x}+O\left(1/x^2\right)\tag{1}$$
Integrate
$$\int_1^m \left(\frac{\log m}{x}+1\right) \, dx=m+\log ^2 m-1\tag{2}$$
Thus
$$\underset{m\to \infty }{\text{lim}}\frac{\int_1^m m^{1/x} \, dx}{m}=\underset{m\to \infty }{\text{lim}}\frac{m+\log ^2 m-1}{m}=\underset{m\to \infty }{\text{lim}}\left(1+\frac{\log ^2 m}{m}-\frac{1}{m}\right)=1$$

Edit
$(1)$
$$\int_1^m \frac{1}{x^2} \, dx=1-\frac{1}{m}$$
$(2)$ becomes
$$\int_1^m \left[\left(\frac{\log m}{x}+1\right) +O\left(1/x^2\right)\right]\, dx\le m+\log ^2 m-1 +1-\frac{1}{m}=m+\log ^2 m-\frac{1}{m}$$
Thus to a greater extent $(2)$ holds
A: Here is another proof you could use, which is more like the standard analysis proof.
Observe that $$\lim_{x\to \infty} M^{\frac{1}{x}} = 1$$
Hence there exists $K(\epsilon)$ such that $$\forall x > K : \left | M^{\frac{1}{x}} - 1 \right | < \epsilon$$
Also, note that: $$\sup_{1\leq x \leq K} \left | M^{\frac{1}{x}} - 1 \right | = c < \infty$$
for some constant $c(K)$.
Now, combining the above, we have that:
\begin{align}
 0 &\leq \frac{1}{M} \left | \int_1^M M^{\frac{1}{x}}dx -  \int_1^M 1 dx \right| \\ &\leq \frac{1}{M} \int_1^M \left | M^{\frac{1}{x}} - 1 \right| dx \\
&= \frac{1}{M} \int_1^K \left | M^{\frac{1}{x}} - 1 \right| dx + \frac{1}{M} \int_K^M \left | M^{\frac{1}{x}} - 1 \right| dx \\
&\leq \frac{c(K-1)}{M} + \frac{\epsilon (M- K)}{M} \\
&\leq \frac{c(K-1)}{M} + \epsilon \\
&\to 0 \text { as } M\to \infty
\end{align}
Hence, we can conclude that:
$$\frac{1}{M} \int_1^M M^{\frac{1}{x}}dx= \frac{1}{M}\int_1^M 1 dx = 1$$
