I need some help with a calculus problem. Suppose you have a straight line of length L, and you squeeze it into a sinusoid with m folds amplitude A:
$$ \rm y(x) = A cos(m x)$$
Then what is the new horizontal extent $\rm L_x$, defined as $$ \rm L_x =\int dx = \int_0^L ds \, cos(\theta) $$ where $\rm s $ is the arc length, and $\rm \theta$ is the slope w.r.t the horizontal.
The question then boils down to finding a parametrisation of $\theta(s)$ in terms of $\rm s$? It would be simplest to just consider a single fold, I guess, and then extrapolate to m folds.

For the function $a\sin\theta$ over a quarter-period,
$$S=\int ds=\int_0^{\pi/2}\sqrt{1+a^2\cos^2\theta}\,d\theta.$$
Using WA,
$$S=\sqrt{a^2+1}\,E\left(\frac{a^2}{a^2+1}\right)$$ where $E$ is the complete elliptic integral of the second kind.
So the ratio of the unfolded over the folded length is
$$\frac2\pi\sqrt{a^2+1}\,E\left(\frac{a^2}{a^2+1}\right).$$