The Definite Integral Problem (with a twist)
In the Riemann integral one essentially calculates the area by splitting the area into $N$ rectangular strips and then taking $N \to \infty$.
Here's something I asked myself related to the Riemann integral.
Let's say I split the area into say $3$ strips however I recount the first strip $a_1$ times, the $2$'nd strip $a_2$ times and the third strip $a_3$ times.
Similarly we ask about $N= 4$ and recount the first strip $a_1$ times, the $2$'nd strip $a_2$ times, the third strip $a_3$ times and the fourth strip $a_4$ times:
Now while this all is doable (but hardwork ?) is there any way to make it work for the case $N \to \infty$ after which I take the limit $k \to \infty$
Notice in the above pictures the area beneath the curve (in the Riemann integration sense where $a_r=1$ for all $r$) is obviously infinite. Let's add the conditions that the curve $f(x)$ is a smooth continuous function whose integral $\int_0^\infty f(x) d x $ is absolutely convergent.
Conjectured solution
I discovered the following relation for arbitrary $a_r$:
$$ \lim_{k \to \infty} \lim_{n \to \infty}\ \sum_{r=1}^n a_r \left( f(\frac{k}{n}r)\frac{k}{n} \right) = \lim_{s \to 1} \! \underbrace{\frac{1}{\zeta(s)} \sum_{r=1}^\infty \frac{a_r}{r^s}}_{\text{removable singularity}} \int_0^\infty f(x) \, dx $$
Where $f(x)$ is a smooth continuous function whose integral $\int_0^\infty f(x) d x $ is absolutely convergent. $a_r$ is the $r$'th number of a sequence.
Heuristic Proof (a lot of cheating involved)
Consider an integral such that $$ \int_0^\infty f(x) \, dx = C,$$where, $f(x)$ is a smooth and continuous function and absolutely converges.
Now we raise both sides to the power s:
$$\left(\int_0^\infty f(x) \, dx\right)^s = C^s $$
We substitute $x$ with $rx$ to get:
$$\left(\int_0^\infty f(rx) \, dx\right)^s = (C/r)^s $$
Multiplying both sides by an arbitrary coefficient:
$$ (b_r)\left(\int_0^\infty f(rx) \, dx\right)^s = (b_r)( C/r)^s $$
Taking their sum:
$$ \sum_{r=1}^\infty b_r \left(\int_0^\infty f(rx) \, dx\right)^s = C^s \underbrace{\sum_{r=1}^\infty \frac{b_r}{r^s}}_{\text{dirichlet series}} $$
We write the integral as a limit of a Riemann sum:
$$ \sum_{r=1}^\infty \lim_{k \to \infty} \lim_{n \to \infty}\ b_r \left( \sum_{x=1}^n f(\frac{kx}{n}r)\frac{k}{n} \right)^s = C^s \sum_{r=1}^\infty \frac{b_r}{r^s} $$
Using the mobius inversion formula:
$$ \sum_{r=1}^\infty \lim_{k \to \infty} \lim_{n \to \infty}\ b_r \left( \sum_{x=1}^n f(\frac{kx}{n}r)\frac{k}{n} \right)^s = C^s \frac{1}{\zeta(s)}\sum_{r=1}^\infty \frac{a_r}{r^s} $$
We define $ a_r = \sum_{e|r} b_e $
Note:
$$ (\frac{b_1}{1^s} + \frac{b_2}{2^s} + \frac{b_3}{3^s} + \frac{b_4}{4^s} + \dots) \times (\frac{1}{1^s} + \frac{1}{2^s} + \frac{1}{3^s} + \frac{1}{4^s} + \dots) = \frac{b_1}{1^s} + \frac{b_1 + b_2}{2^s} + \frac{b_1 + b_3}{3^s} + \frac{b_1 + b_2 + b_4}{4^s} + \dots $$
Now focusing on the L.H.S ($s \nearrow 1 $):
$$ \sum_{r=1}^\infty \lim_{k \to \infty} \lim_{n \to \infty}\ b_r \left( \sum_{x=1}^n f(\frac{kx}{n}r)\frac{k}{n} \right)^s = \sum_{r=1}^\infty \lim_{k \to \infty} \lim_{n \to \infty}\ b_r \left( \sum_{x=1}^n f(\frac{kx}{n}r)\frac{k}{n} \right) $$
Focusing on the L.H.S (and vertically summing):
$$ \lim_{k \to \infty }\lim_{n \to \infty} b_1 ((f(\frac{k}{n}) + f(2 \frac{k}{n}) + f(3 \frac{k}{n}) +f(4 \frac{k}{n}) + \cdots)\frac{k}{n} $$ $$+$$ $$ \lim_{n \to \infty} b_2 (0.f(\frac{k}{n}) + f(2 \frac{k}{n}) + 0.f(3 \frac{k}{n}) +f(4 \frac{k}{n}) +\cdots) \frac{k}{n}$$ $$+$$ $$ \vdots $$
$$ = \lim_{n \to \infty} (\underbrace{b_1}_{a_1} (f(\frac{k}{n}) + \underbrace{(b_1 + b_2)}_{a_2}f(2 \frac{k}{n}) + \underbrace{(b_1 + b_3)}_{a_3}f(3 \frac{k}{n}) +\underbrace{(b_1 + b_2 + b_4)}_{a_4}f(4 \frac{k}{n}) + \cdots)\frac{k}{n} $$
Note: this resummation trick can be only done for special functions ($f$ must absolutely converge)
Hence, for special $a_r$ the L.H.S converges:
$$ \lim_{k \to \infty} \lim_{n \to \infty}\ \sum_{r=1}^n a_r \left( f(\frac{k}{n}r)\frac{k}{n} \right) = \lim_{s \to 1} \underbrace{\frac{1}{\zeta(s)} \sum_{r=1}^\infty \frac{a_r}{r^s}}_{\text{removable singularity}} \times \int_0^\infty f(x) \, dx $$
Example:
Let $f(x) = e^{-x}$
$$ a_{2r} = 1$$ $$ a_{2r+1} = 0$$
Hence,
Let us compute the R.H.S
$$\lim_{s \to 1} \frac{1}{\zeta(s)} (\frac{2^{(-s)}}{\zeta(s)}) . 1 = \frac{1}{2}$$
Looking at the L.H.S:
We are essentially adding all the even strips! This can be computed also by doing:
$$ \int_{0}^\infty e^{-x} dx = 1 $$ $$ \implies \int_{0}^\infty e^{-2x} d(2x) = 1 $$ $$ \implies \int_{0}^\infty e^{-2x} d(x) = 1/2 $$
Hence both answers match!
Here's a crazier example with non-periodic $a_r$ but the notation there is ($a_r = d_r$) What is the limit of this Dirichlet series?
Questions from Measure Theory
Is it possible to prove the formula (without cheating :P)? (edit: answered with brilliance https://math.stackexchange.com/a/3359525/430082)
When all $a_r=1$ for all $r$ then we have a Riemann integral formula. Is it possible to associate the conjectured formula with a measure (the LHS in variable form) rigorously ?
$$ \lim_{k \to \infty} \lim_{n \to \infty}\ \sum_{r=1}^n a_r \left( f(\frac{k}{n}r)\frac{k}{n} \right) = \lim_{s \to 1} \! \underbrace{\frac{1}{\zeta(s)} \sum_{r=1}^\infty \frac{a_r}{r^s}}_{\text{removable singularity}} \int_0^\infty f(x) \, dx $$
where the curve $f(x)$ is a smooth continuous function whose integral $\int_0^\infty f(x) d x $ is absolutely convergent