I'm trying to solve Project Euler problem 525. My approach is to find a parametric equation that can model the path of the center point as it rolls, then take the arc length of that function for one rotation.
A rotated ellipse can be expressed with the equation: $$\frac{(x\cos\theta-y\sin\theta)^2}{a^2}+\frac{(x\sin\theta+y\cos\theta)^2}{b^2}=1$$
And in order to make this ellipse lie tangent or "rest" on the x axis when rotated $\theta$ degrees, there is a y shift of: $\sqrt{a^2\sin^2\theta+b^2\cos^2\theta}$. Here is a visual representation of this. Therefore the y component of my final equation will be: $y(\theta) = \sqrt{a^2\sin^2\theta+b^2\cos^2\theta}$.
The x component of the equation is harder. After $\theta$ degrees of rotation, the point of the ellipse touching the x axis will have traveled a distance equal to the arc length of the ellipse from 0 to $\theta$. This can be expressed with the arc length formula using the parametric form of an ellipse:
$$L(\theta) = \int_{0}^{\theta} \sqrt{y'(\theta)^2 + x'(\theta)^2} d\theta$$
This almost solves it, but there is an additional horizontal distance between the tangent point and the center point as seen in the picture below.
How do I express this extra x-distance? I think it might not even require any calculus.
(Note, I don't want a solution to the problem, that takes the fun out of the problem. Just some help to get through this step or a point in the right direction.)
