# Getting the limit of a Riemann sum expressed as a definite integral and not the value of the integral [closed]

I know that the limit of a Riemann sum is a definite integral. For example:

$\lim_{n\to\infty}\sum_{k=1}^{n}\sin{(5+3\frac{k}{n})}\frac{3}{n}=\int_3^8\sin{x}\,\text{d}x$

However, when I ask Mathematica to evaluate the Limit expression, it evaluates the integral (it gives me $\cos{5} - \cos{8}$). Is there a way to obtain the symbolic definite integral as the result?

I tried to change $\lim_{n\to\infty}\sum_{k=1}^{n}\sin{(5+3\frac{k}{n})}\frac{3}{n}$ to $\lim_{n\to\infty}\sum_{k=1}^{n}\sin{(a+b\frac{k}{n})}\frac{b}{n}$ and I still get $\cos{a} - \cos{a + b}.$

## closed as off-topic by Michael E2, MarcoB, m_goldberg, corey979, J. M. will be back soon♦Jan 22 '17 at 16:29

• The question does not concern the technical computing software Mathematica by Wolfram Research. Please see the help center to find out about the topics that can be asked here.
If this question can be reworded to fit the rules in the help center, please edit the question.

• Please edit your post to include the code that you entered in Mathematica, properly formatted in code blocks. Click the grey question mark on the right side of the editing toolbar for formatting help. Welcome to Mathematica.stackexchange! – march Dec 14 '16 at 19:07
• The question is rather unclear for me. Mathematica is capable of summing trigonometric series, so it will of course quickly sum the one you have. – J. M. will be back soon Dec 15 '16 at 1:55
• The simple answer is: no. Mathematica can confirm that the Riemann sum is the same as the definite integral, but it can not deliver the evaluation you ask for. – m_goldberg Jan 22 '17 at 6:58
• I'm voting to close this question as off-topic because the OP is asking for functionality that is not supported given the constraints the OP is putting on the solution. – m_goldberg Jan 22 '17 at 6:58

$\lim_{n\to \infty } \, \left(\sum _{k=1}^n \frac{3 \sin \left(\frac{3 k}{n}+5\right)}{n}\right)=\int_a^b \sin (x) \, dx$

Limit[Sum[Sin[5 + 3*(k/n)]*(3/n), {k, 1, n}], n -> Infinity] == Integrate[Sin[x], {x, a, b}]

N[FindInstance[Limit[Sum[Sin[5 + 3*(k/n)]*(3/n), {k, 1, n}], n -> Infinity] == Integrate[Sin[x], {x, a, b}], {a, b}]]


$\{\{a\to 3.3\, +1.6 i,b\to -292.035+1.76303 i\}\}$

      lim[x_] = Limit[Sum[Sin[a + x*(k/n)]*(x/n), {k, 1, n}], n -> Infinity]
(*  Cos[a] - Cos[a + x]  *)


Get the integrand of the integral by diffentiating:

   integrand[x_] =  D[lim[x], x]

(*  Sin[a + x]  *)


Test it with a slight change of integration limit:

        Integrate[integrand[y], {y, 0, x}]

(* Cos[a] - Cos[a + x] *)