Showing $\int_{-1}^1\frac{m(2m-1)x^{2m-2}(1-x^{2m})+m^2x^{4m-2}}{(m^2x^{4m-2}+1-x^{2m})\sqrt{1-x^{2m}}}dx=\pi$, algebraically Is there a nice algebraic way to solve the following geometrically motivated integral?
$$\int_{-1}^1\frac{m(2m-1)x^{2m-2}(1-x^{2m})+m^2x^{4m-2}}{(m^2x^{4m-2}+1-x^{2m})\sqrt{1-x^{2m}}}dx,$$ where $m$ is a positive integer.
In fact, this integral can be shown to be the integral of the curvature of the plane curve $x^{2m}+y^2=1, y\geq0$, which is the angle rotated by the tangent vector of the curve as it traverses along the curve. So this integral is $\pi$, but I would like to see some alternative, algebraic solutions.
 A: @user10354138' solution:
Denote the integrand by $f(x)$.
We have
\begin{align}
&\frac{\mathrm{d}}{\mathrm{d} x}\arctan\frac{m x^{2m - 1}}{\sqrt{1 - x^{2m}}} \\
=\ & \frac{1}{1 + (\frac{m x^{2m - 1}}{\sqrt{1 - x^{2m}}})^2}
\left(\frac{m(2m - 1) x^{2m - 2}}{\sqrt{1 - x^{2m}}} 
+ \frac{m^2x^{4m - 2}}{(1 - x^{2m})\sqrt{1 - x^{2m}}}
\right)\\
=\ & f(x).
\end{align}
Thus,
$$\int_{-1}^1 f(x) \mathrm{d} x =  
\arctan\frac{m x^{2m - 1}}{\sqrt{1 - x^{2m}}}\Big\vert_{-1}^1 = \pi.$$
A: This is a supplement to @RiverLi's answer which makes @user10354138's statement that the substitution
\begin{align*}
\phi=\arctan\left(\frac{mx^{2m-1}}{\sqrt{1-x^{2m}}}\right)\tag{1}
\end{align*}
is obvious, somewhat plausible.

On the one hand we get from the definition of OPs plane curve
\begin{align*}
x^{2m}+y^2&=1, y\geq 0\\\\
\color{blue}{y}&\color{blue}{=\sqrt{1-x^{2m}}}
\end{align*}
On the other hand we have according to formula (5) the tangential angle $\phi$ of a curvature is
\begin{align*}
\tan\left(\phi\right)&=\frac{dy}{dx}\\
&=\frac{d}{dx}\sqrt{1-x^{2m}}\\
&\,\,\color{blue}{=-\frac{mx^{2m-1}}{\sqrt{1-x^{2m}}}}
\end{align*}
which makes the substitution (1) plausible.

