Showing arc length of curve is equal to another integral I was recently playing around with some equations on Desmos, when I noticed something interest. If you have a closed curve parametrized by $(x(t), y(t))$ for $0 \le t \le 2\pi,$ then for certain functions $x(t), y(t)$, the arc length integral
$$\int_0^{2\pi} \sqrt{(x')^2 + (y')^2} \ dt$$
is equal to the integral
$$\int_0^{2\pi} \frac{x'y - y'x}{\sqrt{x'(t)^2 + y'(t)^2}} \cdot \frac{x''y' - y''x'}{x'(t)^2 + y'(t)^2} \ dt$$
For example, setting
$$x(t) = \cos t$$
$$y(t) = \sin t + \cos t$$
or even
$$x(t) = e^{\cos t}$$
$$y(t) = \sin(t\cos(t)e^{\sin t})$$
results in these two integrals being equivalent.
Why are these integrals equivalent for certain choices of functions $x(t), y(t)$, and can we figure out for which $x(t), y(t)$ this is true?
Edit: What I have found to be very interesting, is that the integrals seem to be equal for every closed curve that intersects itself at finitely many points (at least the curves I have tested so far).
 A: I had bookmarked this question. For a long time, nobody wrote an answer. This is not a complete answer. Also, I don't have enough numerical experience.
...
Let $r=(x,y)$ for short. Then, your second complicated looking integral is
$$I=\int_C (r\cdot n)(-\kappa)ds\tag{1}$$
where $n$ is the normal vector, $\kappa$ is the curvature function. See my answer in this post: (GD)Let $\alpha: I \to \mathbb R^n (n = 2, 3)$ be a regular curve of any parameter $r \in I$... for them.
Your observation is that $l=I$ where $l=\int_C ds$, for some curves. In other words,
$$\int_C (1+\kappa r\cdot n)ds=0 \tag{2}$$
for some curves. Even if the integrand function $1+\kappa r\cdot n$ is non-zero, its avarage is zero. Why? We want to explain that phenomenon.
Any easy explanation is that when the integral $\int (1+\kappa r\cdot n)vdt$ is a periodic function with period $2\pi$, we have $l=I$. Here, $v=\frac{ds}{dt}=\sqrt{(x')^2+(y')^2}$ is the velocity function. But, we need a better explanation.
We can write the equation (2) in the form
$$\int_C (n+\kappa r)\cdot n ds=0 \tag{3}.$$
We can now expect a Stokes's theorem-like explanation. But, this expression is looking odd. The normal vector is on the plane not in 3D. I expect a connection from dimension 1 to dimension 0. Not from 1 to 2.
By using the identity $\kappa n=\frac{1}{v^2}r''-\frac{a}{v^3}r'$ where $a=\frac{dv}{dt}=\frac{r'\cdot r''}{v}$ is the accleration function, the equation (3) can be written as
$$\int_C\frac{v^4+(r\cdot r'')v^2-(r\cdot r')(r'\cdot r'')}{v^3}dt=0.\tag{4}$$
For the example $r=(\cos t,\cos t+\sin t)$, we have $-(r\cdot r'')v^2+(r\cdot r')(r'\cdot r'')=1$ and we have the interesting equality, $\int_C vdt=\int_C\frac{1}{v^3}dt$:  https://www.wolframalpha.com/input?i=integarl_0%5E%282pi%29+%281-sin2t%2Bsin%5E2t%29%5E%281%2F2%29-%281-sin2t%2Bsin%5E2t%29%5E%28-3%2F2%29.
So, the integrand of (4) must be integrable as a function with period $2\pi$ or $2\pi/n$. I don't wanna share Wolframalpha so many times but here is the indefinite integral of the example above: https://www.wolframalpha.com/input?i=integral+%281-sin2t%2Bsin%5E2t%29%5E%281%2F2%29-%281-sin2t%2Bsin%5E2t%29%5E%28-3%2F2%29
Another try by Green's Theorem as suggested by a commentator: We can put the integral I in the from: $I=\int_C -\kappa ydx+\kappa x dy$ and by Green's Theorem, $I=\int\int_A(x\kappa_x+y\kappa_y+2\kappa)dxdy$. For the circle, $C: x^2+y^2=R^2$, since $\kappa=\frac{1}{R}$, a constant, $I=2KA=2(1/R)\pi R^2=2\pi R=l$. But, this example is cheesy since $n=-\kappa r$. I couldn't see anything else in this direction.
