As I understand the FToCI, the contour integral of a function with an anti-derivative over a contour that is analytic everywhere is given by:$$\oint_{x_0}^{x_1}f(z) dz = F(x_1) - F(x_0)$$ Where $x_0$ is the beginning point of the contour, and $x_1$ is the terminal point of the contour.
As I understand the Cauchy-Goursat theorem, two contours that have the same start point and terminal point, and enclose no points of non-analyticity, will have the same integral.
So here's my question: Suppose we have two contours that have the same start point and terminal point, and are analytic on both paths. However, the region they enclose isn't analytic everywhere. Cauchy-Goursat doesn't apply, both contour integrals aren't necessarily the same. According to FToCI, all that matters is the start point and end point, and thus they are the same. There's obviously a contradiction here, so what have I got wrong?
I'm sure I have an error in my understanding somewhere but I can't seem to find what exactly I've got wrong.
There's no contradiction. Cauchy-Goursat is an "if" but not an "if and only if". That is, it says that under certain conditions the two integrals are the same. When those conditions are not met, Cauchy-Goursat tells you nothing, but it's still possible that the two integrals are the same.