# Math Help - Nice identity with natural log. and floor function

1. ## Nice identity with natural log. and floor function

Prove that for each natural $n\ge2$ it's $\ln n!=\int_{1}^{n}{\frac{n-\left\lfloor x \right\rfloor }{x}\,dx}.$

2. ## Induction

Use proof by induction
(I): Let n=2
Then $\int_1^{n}\frac{n-\left\lfloor{x}\right\rfloor}{x}\,dx=\int_1^2\frac {2-\left\lfloor{x}\right\rfloor}{x}\,dx$
and on 1<x<2, $\left\lfloor{x}\right\rfloor=1$, so the above integral is
$\int_1^2\frac{2-1}{x}\,dx=\int_1^2\frac{dx}{x}=\ln{2}=\ln{2!}$.
(II): Assume that $\int_1^{n}\frac{n-\left\lfloor{x}\right\rfloor}{x}\,dx=\ln{n!}$ for n.
Now,
$\int_1^{n+1}\frac{n+1-\left\lfloor{x}\right\rfloor}{x}\,dx=\int_1^{n}\fr ac{n+1-\left\lfloor{x}\right\rfloor}{x}\,dx+\int_n^{n+1}\ frac{n+1-\left\lfloor{x}\right\rfloor}{x}\,dx$
$=\int_1^{n}\frac{n-\left\lfloor{x}\right\rfloor}{x}\,dx+\int_1^{n}\fr ac{1}{x}\,dx+\int_n^{n+1}\frac{n+1-\left\lfloor{x}\right\rfloor}{x}\,dx$
$=\ln{n!}+\int_1^{n}\frac{dx}{x}+\int_n^{n+1}\frac{ n+1-\left\lfloor{x}\right\rfloor}{x}\,dx$.
Using the fact that $\left\lfloor{x}\right\rfloor=n$ for n<x<n+1 in the rightmost integral,
$\int_1^{n+1}\frac{n+1-\left\lfloor{x}\right\rfloor}{x}\,dx=\ln{n!}+\int_ 1^{n}\frac{dx}{x}+\int_n^{n+1}\frac{n+1-n}{x}\,dx$
$=\ln{n!}+\int_1^{n}\frac{dx}{x}+\int_n^{n+1}\frac{ dx}{x}$
$=\ln{n!}+\int_1^{n+1}\frac{dx}{x}$
$=\ln{n!}+\ln(n+1)$
$=\ln\left(n!(n+1)\right)$
$=\ln(n+1)!$
And we have our proof.

--Kevin C.

3. ...

i was about to give the same proof.. but i can't fix the latex.. haha

4. Okay!

We have $\ln n!=\sum\limits_{k=2}^{n}{\ln k},$ hence $\sum\limits_{k=2}^{n}{\int_{1}^{k}{\frac{dx}{x}}}= \sum\limits_{k=2}^{n}{\sum\limits_{j=1}^{k-1}{\int_{j}^{j+1}{\frac{dx}{x}}}}=\sum\limits_{j=1 }^{n-1}{\sum\limits_{k=j+1}^{n}{\int_{j}^{j+1}{\frac{dx }{x}}}},$ finally $\sum\limits_{j=1}^{n-1}{\int_{j}^{j+1}{\frac{n-j}{x}\,dx}}=\sum\limits_{j=1}^{n-1}{\int_{j}^{j+1}{\frac{n-\left\lfloor x \right\rfloor }{x}\,dx}}=\int_{1}^{n}{\frac{n-\left\lfloor x \right\rfloor }{x}\,dx}.\quad\blacksquare$

And we're done!

5. brilliant solution!!