If $f$ is Riemann integrable in $[a,b]$ and $f=g'$ on $(a,b)$ for some continuous function $g$ on $[a,b]$, is it true $\int_a^bf(x)\hspace{0.1cm}dx=g(b)-g(a)$?
I tried to partition $[a,b]$ to $[a_0=a,a_1]\cup[a_1,a_2]\cup\dots$, where $f$ is discontinuous at $a_j$ and use mean value theorem on each sub-interval so $\int_{a_i}^{a_{i+1}} f(x)\hspace{0.1cm} dx=(a_{i+1}-a_i)g'(c_i)$ for $c_i\in(a_i,a_{i+1})$. But I have problem with the summation over all sub-intervals to get $g(b)-g(a)$. Should I refine the partition to get definition of Riemann integral?