I have problems understanding this part of the proof given by Manfredo Do Carmo in Differential Geometry of Curves for the theorem of The Four-Vertex Theorem. I understand that in the first part he considers that exists a maximum and a minimum just because the parametrization of the curve is a mapping from $\mathbb{R}$ to $\mathbb{R}^2$. The next part is the one that I don't understand; he considers a line $L$ through those vertices where are the max and min of the curve, then he says this:
Let $Ax + By + C = 0$ be the equation of $L$. If there are no further vertices, $k'(s)$ keeps a constant sign on each of the arcs $\beta$ and $\gamma$ (until here, I understand it). We can then arrange the sign of all the coefficients $A, B, C$ so that the integral in Eq. (5) is positive. This contradiction shows that there is a third vertex and that $k'(s)$ changes sign on $\beta$ or $\gamma$, say, on $\beta$. Since $p$ and $q$ are points of maximum and minimum, $k'(s)$ changes sign twice on $p$. Thus, there is a fourth vertex.
The integral he refferes as Eq.(5) is:
$$\int_0^l (Ax+By+C)\frac{dk}{ds}ds=0$$
So I don't know how It would become a positive integral if it's zero.