Is the reverse of the second fundamental theorem of calculus always true? The second part of the fundamental theorem of calculus states that if
$$ f(x)=g'(x) $$
then
$$ \int^b_a f(x)\,dx = g(b)-g(a)$$
And so I was wondering that if you solved $\int^b_a f(x)\,dx$ using some other method like the limit definition and showed to to be equal to some $g(b)-g(a)$, then does that imply that $g'(x)=f(x)$?
This question came to me when I was solving for $\int^b_a x\,dx$ using the limit definition of the integral and I showed it to be equal to $\frac{b^2-a^2}2$, and so I was just wondering if I could do this with any integral that could be solved using alternate methods.
 A: You do need some additional conditions on $f(x)$ to make it work. 
Consider the function $f(x) = \begin{cases}1 & x \ \text{is an integer,} \\ 0 & x \ \text{is not  an integer.}\end{cases}$ 
For any reals $a,b$, we have $\displaystyle\int_a^b f(x)\,dx = 0 = g(b)-g(a)$, where $g(x) = 0$. 
But $g'(x) = 0 \neq f(x)$ for integer values of $x$. 
If we add the condition that $f(x)$ is continuous, then your claim works. 
A: If it holds for all $a,b \in [A,B]$ that 
$$
\int_a^b f(x) \, dx = g(b) - g(a)
$$
for some function $g : [A,B] \to \mathbb R$, (and added : $f$ is continuous), then in particular
$$
g(b) = \int_A^b f(x)\, dx + g(A)
$$
so without loss of generality we can assume $g(A) = 0$ (otherwise you could define $\widetilde g(b) \overset{def}= g(b) - g(A)$). Also, for $x_0 \in ]A,B[$, we have
$$
\lim_{x \to x_0} \frac{g(x) - g(x_0)}{x-x_0} = \lim_{x \to x_0} \frac 1{x-x_0} \int_{x_0}^x f(x) \, dx = f(x_0)
$$
by the first fundamental theorem of calculus. Therefore $g(x)$ is differentiable on $]A,B[$ and $g'(x) = f(x)$. (We said "without loss of generality" for $g$ by changing $g$ up to a constant ; note that $g'(x) = f(x)$ does not depend on this constant.)
The continuity assumption is used when computing the last limit. You can either convince yourself with the formal $\varepsilon-\delta$ proof or with the idea that if $x \approx x_0$, then $f(x) \approx f(x_0)$ by continuity and thus $\int_{x_0}^x f(x) \,dx  \approx (x-x_0)f(x_0)$.
Hope that helps,
A: If $f(x)$ is continuous and, leaving $a$ fixed (for example, $a = 0$), the equation
$$ \int^b_a f(x) \, dx = g(b)-g(a)$$
is true for all choices of $b$, then yes, $g'(x) = f(x)$.
Another way to say exactly the same thing is that if $f(x)$ is continuous and you define a function $g(x)$ by $g(x) = \int^x_a f(t) \, dt$, then we have $g'(x) = f(x)$.
