Limit calculation using Lagrange mean value Here the problem is from the book, Problems in real analysis.

Prove that for real number $p \geq 0$ we hanve
  $$\lim_{n \rightarrow \infty} \frac{(1^{1^p}2^{2^p}\cdots n^{n^p})^{1/n^{p+1}}}{n^{1/(p+1)}} = e^{-1/(p+1)^2}$$
  Hint. Use the mean value theorem. For instance, in the particular case $p=2$, apply the Lagrange mean value theorem to the function $f(x) = (x^3 \ln x)/3 - x^3/9$ on the interval $[k,k+1], 1 \leq k \leq n$ .

I tried to calculate it by the way the hint indicates, but I failed. There must be a number $c_k$ such that $k \leq c_k \leq k+1$ by the mean value theorem. I don't know how to calculate it by using this. Help me.
 A: Its best to take logs here. If $L$ is the desired limit then
\begin{align}
\log L &= \log\left\{\lim_{n \to \infty}\frac{(1^{1^{p}}2^{2^{p}}\cdots n^{n^{p}})^{1/n^{p + 1}}}{n^{1/(p + 1)}}\right\}\notag\\
&= \lim_{n \to \infty}\log\left(\frac{(1^{1^{p}}2^{2^{p}}\cdots n^{n^{p}})^{1/n^{p + 1}}}{n^{1/(p + 1)}}\right)\text{ (via continuity of log)}\notag\\
&= \lim_{n \to \infty}\left(\frac{1^{p}}{n^{p + 1}}\log 1 + \frac{2^{p}}{n^{p + 1}}\log 2 + \cdots + \frac{n^{p}}{n^{p + 1}}\log n - \frac{1}{p + 1}\log n\right)\notag\\
&= \lim_{n \to \infty}\left\{\frac{1}{n}\left(\frac{1^{p}}{n^{p}}\log 1 + \frac{2^{p}}{n^{p}}\log 2 + \cdots + \frac{n^{p}}{n^{p}}\log n\right) - \frac{1}{p + 1}\log n\right\}\notag\\
&= \lim_{n \to \infty}\left\{\frac{1}{n}\left(\frac{1^{p}}{n^{p}}\log (1/n) + \frac{2^{p}}{n^{p}}\log (2/n) + \cdots + \frac{n^{p}}{n^{p}}\log (n/n)\right) \right.\notag\\
&\,\,\,\,\,\,\,\,\,\left. + \log n\left(\frac{1^{p} + 2^{p} + \cdots + n^{p}}{n^{p + 1}}\right) - \frac{1}{p + 1}\log n\right\}\notag\\
\end{align}
The first term is clearly $\int_{0}^{1}x^{p}\log x\,dx$. For the second term we have via Euler-Maclaurin formula $$\sum_{k = 1}^{n}k^{p} = \int_{0}^{n}x^{p}\,dx + \frac{1}{2}n^{p} + \text{ (terms with smaller powers of }n)$$ so that $$\frac{1}{n^{p + 1}}\sum_{k = 1}^{n}k^{p} = \frac{1}{p + 1} + \frac{1}{2n} + \cdots$$ and hence we have $$\lim_{n \to \infty}\log n\left(\frac{1^{p} + 2^{p} + \cdots + n^{p}}{n^{p + 1}}\right) - \frac{1}{p + 1}\log n = 0$$ We thus have $$\log L = \int_{0}^{1}x^{p}\log x\,dx$$ To evaluate the integral note that $$\frac{1}{p + 1} = \int_{0}^{1}x^{p}\,dx$$ and differentiating with respect to $p$ we get $$\int_{0}^{1}x^{p}\log x\,dx = -\frac{1}{(p + 1)^{2}}$$ and hence $L = e^{-1/(p + 1)^{2}}$.
For the hint given in the book if we assume $$f(x) = \frac{x^{p + 1}\log x}{p + 1} - \frac{x^{p + 1}}{(p + 1)^{2}}$$ so that $$f'(x) = x^{p}\log x$$ I don't see how we can use mean value theorem (by the way the function $f$ helps to calculate the integral in my answer without using differentiation with respect to $p$). Rather we will have to use Euler-Maclaurin formula to calculate the sum $$\sum_{k = 1}^{n}f'(k)$$ If we go this way we have $$\sum_{k = 1}^{n}f'(k) = \int_{0}^{n}f'(x)\,dx + \frac{f'(n) - f'(0)}{2} + \cdots$$ which sort of directly gives $\log L = -1/(p + 1)^{2}$.
