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


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. is away 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.

  • $\begingroup$ 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! $\endgroup$ – march Dec 14 '16 at 19:07
  • $\begingroup$ 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. $\endgroup$ – J. M. is away Dec 15 '16 at 1:55
  • $\begingroup$ 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. $\endgroup$ – m_goldberg Jan 22 '17 at 6:58
  • 2
    $\begingroup$ 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. $\endgroup$ – 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\}\}$


Calculate your Limit with variables instead of numbers:

      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] *)

Not the answer you're looking for? Browse other questions tagged or ask your own question.