Antiderivative of $f(x)=2x$ using Riemann sums I need to calculate the antiderivative of $f(x)=2x$ using only Riemann sums.
I tried to create the sums so that the limit when $n$ tends to $\infty$ of:
$$\lim_{n\to\infty}\sum\limits_{i=1}^nf(\xi_i^*)\Delta x$$
Will give me the answer, but I can't get rid of the variables $b$ and $a$ which exist in $Δx$ and $\xi_i^*$.
After solving I concluded that the limit is equal to $(b^2-a^2)$ but I doubt that this is the correct answer.
EDIT:
Apparently this is the correct answer, so I should change the question to how $b^2-a^2$ is equivalent to the antiderivative $x^2$
I know it may seem trivial, but I would appreciate a complete understanding of the solution
EDIT#2:
Just writing my solution, for anyone who wonders how to get there
$$\Delta x=\frac{b-a}{n}$$
$$\xi_i^* =a+\frac{(b-a)i}{n}$$
$$f(\xi_i^*)=2a+\frac{2(b-a)i}{n}$$
So
$$\lim_{n\to\infty}\sum\limits_{i=1}^nf(\xi_i^*)\Delta x= \lim_{n\to\infty}\sum\limits_{i=1}^n\left[\left(2a+\frac{2(b-a)i}{n}\right)\frac{b-a}{n}\right]=$$ then
$$\lim_{n\to\infty}\sum\limits_{i=1}^n\frac{2ab-2a^2}{n}+\lim_{n\to\infty}\sum\limits_{i=1}^n\frac{2(b-a)^2i}{n^2}=$$
$$2ab-2a^2 +\lim_{n\to\infty} \frac{2(b-a)^2}{n^2}\sum_{i=1}^n i=$$
$$2ab-2a^2 +\lim_{n\to\infty}\frac{2(b-a)^2}{n^2}\frac{n(n+1)}{2} = b^2-a^2$$
 A: In general, if $F(x) = \int_0^x f(u)du$ then
$$\int_a^b f(u) du = F(b)-F(a).$$

In your case, you know that the indefinite integral of $2x$ is $x^2$:

$$F(x) = \int_0^x f(u) \, du\qquad\qquad \text{with } F(x)=x^2, \;\;f(u) = 2u$$
When you compute the Riemann sum of $f(u)$ between limit values $u=a$ and $u=b$, you find that the result is $b^2-a^2$. That's the definite integral $F(b)-F(a) = \int_a^b f(u)\,du$, exactly as you were hoping to find.
A: Riemann sums compute definite integrals.  You have asked for an antiderivative, an indefinite integral, so there is more to this than just computing the sum.  The fundamental theorem of calculus tells us two things.  The second is that for an integrable function $f$, having antiderivative $F$, $$\int_a^b f(x) \,\mathrm{d}x = F(b) - F(a)  \text{.}$$  Note that a given $f$ has infinitely many choices of $F$, all of which work.  (The theorem is actually a little more specific about intervals of definition.  All the functions we will encounter are sufficiently well behaved on the entire real line, so I have suppressed these details.)
You seem to have found that the definite integral $$\int_a^b 2x \,\mathrm{d}x = b^2 - a^2  \text{.}$$  Note that this is a function of $b$ minus a function of $a$ and both these functions are the "square my input" function, $F(x) = x^2$.  So by comparing terms in this particular definite integral with the result in the fundamental theorem, we find an antiderivative.  Since we have used a non-reductive step, we should check that our result is valid: $\frac{\mathrm{d}}{\mathrm{d}x} x^2 = 2x$, as desired.
But can we be a little more rigorous?  Yes.  The first part of the fundamental theorem tells us $$ F(x) = \int_a^x f(x) \,\mathrm{d}x  \text{.}$$  (The notation here is awful.  We have used "$x$" in both a bound and an unbound context.  To not write intentionally ambiguous expressions, we should write instead $ F(x) = \int_a^x f(t) \,\mathrm{d}t $.  But more than a century of convention of misusing $x$ in both places means you should get used to seeing and parsing such expressions.)  But we've already done this calculation.  We were just unfortunate in calling the variable $x$ by the name "$b$" previously.  That is, $$F(x) = \int_a^x 2t \,\mathrm{d}t = x^2 - a^2  \text{.}$$  Note that we have recovered the $x^2$ as above, but have an additional "${}-a^2$".  But $a$ is some constant.  If we had chosen any other $a$, this would only translate the graph of $F$ vertically, which would change its derivative, $f$, not at all.  So we are free to make any choice of $a$ and we will get one of the many antiderivatives of $f$.  We could just as easily have written $F(x) = x^2 + C$ for $C = -a^2$.  While $C = -a^2$ is always non-positive for real $a$, the expression $x^2 + C$ is a valid antiderivative of $f$ for any choice of $C$ from the reals.  Consequently, a more general antiderivative of $f$ is the function $x^2 + C$.
