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.

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,
