How do we determine maximum RMS error between a Cosine curve and a 3-spline Bezier curve given in answers from me and Mark H. (Again not cutting pasting to present the closed form and Bezier parametric equation here as the thread is accessible and running).
Is there a modification to the good old Gaussian procedure of least squares based on polynomials or quicker modern CAS supported developments that handle Parametrics&Polynomial?
I know it is easy to ask, but I ask expecting trouble as I had been there once into them both.
The trick is to express both the function of $x$ and the parametric equation in $t$ in terms of the same variable. The RMS difference between the functions is $$\Delta_{rms} = \sqrt{\int_{x_0}^{x_1} [f(x) - g(t)]^2\,dx}$$ where $f(x)$ is expressed in terms of the $x$-coordinate and $g(t)$ is a parametric function of $t$ with a corresponding $x(t)$. Now we just make a variable substitution: $$x = x(t)$$ and $$dx = x'(t)\,dt$$ to get $$\Delta_{rms} = \sqrt{\int_{t_0}^{t_1} [f(x(t)) - g(t)]^2 x'(t)\,dt}.$$