With y = cx, our functional becomes

sqrt(F) = Sigma min(d(data_{i}, f(x)), which we write as

sqrt(f(x_{i})) = d(x_{i}, f(x)).

We have

f =~ d_{i}^{2}, so we begin

f(x) = (x - x_{i})^{2} + (cx - y_{i})^{2},

f'(x) = 2(x - x_{i}) + 2(cx - y_{i}), so the critical number is

x = (x_{i} + cy_{i})/(1 + c^{2}).

Plugging this into F = Sigma d_{i}^{2}

(omitting sigma for now)

= ([x_{i} + cy_{i} - x_{i}(1+c^{2})]^{2} + [c(x_{i} + cy_{i}) - y_{i}(1+c^{2})]^{2}) / (1 + c^{2})^{2}

= ([cy_{i} - y_{i}c^{2}]^{2} + [cx_{i} - y_{i}]^{2}) / (1 + c^{2})^{2}

= [c^{2}(y_{i} - x_{i}c)^{2} + (-1)^{2}(y_{i} - cx_{i})^{2}] / (1 + c^{2})^{2}

= (c^{2} + 1)(y_{i} - cx_{i})^{2}/(1 + c^{2})

= (y_{i} - cx_{i})^{2}/(1 + c^{2}).

So F(c) = Sigma d_{i}^{2} = 1/(1 + c^{2}) Sigma (y_{i} - cx_{i})^{2}.

At this point, our task stopped looking daunting. Rather than pursuing it for curiosity, we expect to be able to finish it.

We still need to find min F(c).

So we have F'(c) = 1/(1 + c^{2})^{2} Sigma [2(1+c^{2})(y_{i} - cx_{i})(x_{i}) + 2c(y_{i} - cx_{i})^{2}]

= -2/(1+c^{2})^{2} Sigma [(y_{i} - cx_{i})[1*],

[where 1* = (1 + c^{2})x_{i} + c(y_{i} - cx_{i})

= x_{i} + c^{2}x_{i} - cy_{i} - c^{2}x_{i}

= x_{i} - cy_{i}]

= -2/(1 + c^{2})^{2} Sigma (y_{i} - cx_{i})(x_{i} - cy_{i}).

Find zeros of F'(c), i.e., find zeros of

Sigma (y_{i} - cx_{i})(x_{i} - cy_{i})

= Sigma y_{i}x_{i} - c(y_{i}^{2} + x_{i}^{2}) + c^{2}x_{i}y_{i} as a function of c.

This is a quadratic equation, with

c = a = Sigma x_{i}y_{i}, and b = -Sigma y_{i}^{2} + x_{i}^{2}.