I derived a formula for integrating the length of a line over a scalar valued, single-variable function. I've seen such formulae for polar curves and parametrics and multivariable calculus but my attempt focused on what I'd call "normal" functions.
My derivation comes out as: the length of a line drawn by $f(x)$ over $[a, b]$ is: $\int_a^b \sqrt{(\frac{dy}{dx}) ^ 2 + 1} \space dx$
To test my formula on a curve of known length, I applied it to the unit circle, specifically the top-right quarter circle, which would have circumference $\frac{2\pi \cdot [r = 1]}{4} = \tfrac{1}{2}\pi$. I converted the implicit curve $x^2 + y^2 = 1$ to a function $y = +\sqrt{1 - x^2}$, which I think holds for the top-right quarter circle. Then, $\frac{dy}{dx} = \tfrac{1}{2} \cdot -2x \cdot (1 - x^2) ^ {-\frac{1}{2}} = -\frac{x}{\sqrt{1 - x^2}}$
According to my tested formula, the integral is now $\int_0^1\sqrt{(\frac{dy}{dx}) ^ 2 + 1}\space dx = \int_0^1 \sqrt{\frac{x^2}{1 - x^2} + 1}\space dx = \int_0^1 \sqrt{\frac{1}{1 - x^2}} \space dx$. I do not know how to solve this regularly, so I attempted a trigonometric substitution (which seems reasonable, given the circle and the desired result of half $\pi$) of $x = \sin(\theta)$, resulting in the integral being equivalent to $\int_0^{\pi/2} \frac{1}{\sqrt{1-\sin^2(\theta)}}\space d\theta = \int_0^{\pi/2} \frac{1}{\cos(\theta)}\space d\theta$, which according to the internet would be undefined, as the antiderivative of $\frac{1}{\cos(\theta)}$ is apparently $\ln |\sec(\theta) + \tan(\theta)|$, and $\sec$ and $\tan$ are both undefined at $\frac{\pi}{2}$.
Where's my mistake? Is my integration technique bad, my formula bad, or both?
You forgot to replace $ dx $ by $\cos(\theta)d\theta$.
$$\int_0^1\frac{dx}{\sqrt{1-x^2}}=$$
$$\int_0^{\frac{\pi}{2}}\frac{\cos(\theta)d\theta}{\sqrt{1-\sin^2(\theta)}}=$$ $$\int_0^{\frac{\pi}{2}}\frac{\cos(\theta)d\theta}{\cos(\theta)}=\frac{\pi}{2}$$
The first integral is improper but convergent.