I'm having trouble with this integral:
$\int\limits_a^b f(x) \, \mathrm{d}g = \frac{\log ^2(n)}{2 \log (10)}|_a^b$
If I want to find the product such:
$10^m.10^{m+1}...\leq n$
so for example for $n=100$ this would be $10^1.10^2=1000$
I derived a Riemann-Stieltjes integral to approximate this problem as follows:
Consider $\int\limits_a^b \color{red}{f(x)} \, \color{blue}{\mathrm{d}g}$ where $\color{red}{f(x)}=\log(x)$ and ${\color{blue}{\mathrm{d}g} = \frac{1}{n \log (10)}}$
since $\log _{10}(x)$ gives the number of 10's $\leq$ x.
Therefore $\begin{align}\int\limits_a^b f(x) \, \mathrm{d}g = \frac{\log ^2(n)}{2 \log (10)}|_a^b \tag{1}\end{align}$
Is this correct?
Part 2:
Assuming that question 1 is correct, then plotting the log product of powers of ten results in the staircase (purple) shown in the log graph below.
Why does (1) (shown blue) not correspond but is exactly halfway between $n-1$ and $n$?
mathematica
Ten[n_] := Product[10^i, {i, Log[10, n]}];
DiscretePlot[{Log[n]^2/(2 Log[10]), Log[Ten[n]]},(**){n, 1, 1001, 1}]
