I have two functional dependencies defined by two (sizeable) sets of points:

I want to fit one to the other (in the sense of minimizing the RMS of the Y discrepancy) by optimizing three parameters:
- X scale
- X shift
- Y scale.
My knee-jerk reaction to this problem is to use ICP or other point-set registration algorithm (the animated GIF at the second link is exactly what I have in mind). However, it just doesn't feel right; for one, how do I even define the distance on the plane if the abscissa and ordinate have different physical units? Besides, those algorithms are optimized for lots of outliers (e.g. in point clouds acquired from a LIDAR).
My next idea is to extract the list of extrema from both curves, and fit them together with something like RANSAC.
Anyway, I feel like there is a proper way to do this, so I decided to ask people who are smarter than me before plunging into actual code.
A coarse answer:
Given the data sets
$$ red=\left[ \begin{array}{cc} x & y \\ 50.4 & 0 \\ 48.3 & 0 \\ 48.1 & 0 \\ 45.8 & 0.3 \\ 43.8 & 0 \\ 41.9 & 1.8 \\ 39.4 & 3.2 \\ 37.3 & 3.5 \\ 35.7 & 1.9 \\ 32.5 & 0.5 \\ 30. & 1. \\ 28.3 & 1.3 \\ 26.8 & 4.4 \\ 25.9 & 6.2 \\ 23.6 & 8.4 \\ 21.5 & 8. \\ 20. & 5.9 \\ 19.2 & 2.9 \\ 18.1 & 1.1 \\ 14.2 & -0.8 \\ 10.7 & -0.3 \\ \end{array} \right] $$
and
$$ blue = \left[ \begin{array}{cc} x & y \\ 48.9 & 0 \\ 46.8 & -0.1 \\ 45.6 & 1.2 \\ 44.7 & 2.8 \\ 44.2 & 4.8 \\ 43.1 & 5.3 \\ 42.7 & 3.2 \\ 41.9 & 1.7 \\ 41.7 & 1.9 \\ 40.6 & 2.5 \\ 40. & 4.3 \\ 39.9 & 7.6 \\ 39.5 & 10.2 \\ 39. & 12.9 \\ 38.2 & 16. \\ 36.8 & 12.4 \\ 36.2 & 7. \\ 35.4 & 2.1 \\ 33.6 & 0.4 \\ 31.5 & 0.3 \\ 29. & 0.1 \\ \end{array} \right] $$
and with the contribution of an optimization program we can obtain the function
$$ f_r(x) = 3.36494 e^{-0.0548285 (x-38.503)^2}+9.45496 e^{-0.062806 (x-23.3151)^2}-0.0150002 $$
such that $f_r(x)$ approximates the data set $red$ and $f_b(x) = 1.7085f_r(2.8(x-30))$ approximates the data set $blue$