Apologies in advance if the question is too basic, but I haven't been able to find an answer for it online (assuming I'm not just missing something extremely obvious which is possible too). Suppose we have a function $f(x)$ continuous on the closed interval $[a,b]$, then by the Fundamental Theorem of Calculus there exists a function $$g(x) = \int_{a}^{x} f(x) dx$$ with $g(x)$ continuous on $[a,b]$ and differentiable on $(a,b)$, with $g'(x)=f(x)$.
According to this definition, $g(a)=0$ always. I am confused however how the Theorem manages to hold true irrespective of the choice of $a$. An example: suppose $f(x)= 2x$ on the interval $[1,5]$ (it is trivially continuous). According to the theorem $$g(1) = \int_{1}^{1}2xdx$$ and so $g(1)=0$, but $g$ is supposed to be the antiderivative of $2x$, which is $x^2$, and $(1)^2 = 1 \neq 0$.
More generally, if I am not mistaken, given a continuous function $f(x)$ on $[a, d]$ with $b>a$, we have that $$g(c) = \int_{a}^{x=c}f(x)dx = \int_{b}^{x=c}f(x)dx \tag{as long as $\max(a,b)\leq c \leq d$}$$ and this just doesn't make sense relative to the area-under-a-graph interpretation of the integral. So, either I am making a mistake somewhere or I misunderstood the Theorem. Could someone please clarify this for me? Thank you in advance