My calculus textbook gives a theorem without proof about how to calculate line integrals of the first type. It says that:
If a line $L$ can be expressed as $y=y(x),a \leq x \leq b$ and $y(x)$ has derivative in close interval $[a,b]$,and the derivative function should also be continuous in close interval $[a,b]$ ,then $\int_{L}f(x,y)ds=\int_{a}^{b} f(x,y(x)) \sqrt{1+y_{x}'^2}dx$.
But then it gives an example which make me confused. It says that calculate $\oint_{L} \sqrt{x^2+y^2}ds$, and $L$ is $x^2+y^2=4x$.
It gives a proof which uses that theorem. It divides the whole line into two parts, $y \geq 0$ and $y \leq 0$. Due to the symmetry, we can just calculate the $y\geq 0$ part which is $\int_{0}^{4}\sqrt{x^2+y(x)^2}\sqrt{1+y_x'^2}dx$. And $y_{x}'=\frac{2-x}{y}$.
Now, my question is this $y_x'$ just continuous in open interval $(a,b)$ but not close interval $[a,b]$(because in points $a$ and $b$ we have no derivatives), why it can also use that theorem to calculate?