We know that Riemann sum gives us the following formula for a function $f\in C^1$:
$$\lim_{n\to \infty}\frac 1n\sum_{k=0}^n f\left(\frac kn\right)=\int_0^1f(x) dx.$$
I am looking for an example where the exact calculation of $\int f$ would be interesting with a Riemann sum.
We usually use integrals to calculate a Riemann sum, but I am interesting in the other direction.
Edit.
I actually found an example of my own today. You can compute
$$I(\rho)=\int_0^\pi \log(1-2\rho \cos \theta+\rho^2)\mathrm d \theta$$
using Riemann sums.
Here is an example ...
For each $z\in\mathbb{C}$ with $\vert z\vert\neq 1$, consider :
$$F(z)=\int_0^{2\pi}\ln\left|z-e^{it}\right|\,dt$$
It is possible to get an explicit form for $F(z)$, using Riemann sums.
For each integer $n\ge1$, consider :
$$S_n=\frac{2\pi}{n}\sum_{k=0}^{n-1}\ln\left|z-e^{2ik\pi/n}\right|$$which is the $n-$th Riemann sum attached to the previous integral (and a uniform subdivision of $[0,2\pi]$ with constant step $\frac{2\pi}{n}$).
Now :$$S_n=\frac{2\pi}{n}\ln\left|\prod_{k=0}^{n-1}\left(z-e^{2ik\pi/n}\right)\right|=\frac{2\pi}{n}\ln\left|z^n-1\right|$$and you can easily show that :$$F(z)=\left\{\matrix{2\pi\ln\left|z\right|& \mathrm{ if}\left|z\right|>1\cr0 & \mathrm{otherwise}}\right.$$