Appendix for minf

With y = cx, our functional becomes

sqrt(F) = Sigma min(d(datai, f(x)), which we write as

sqrt(f(xi)) = d(xi, f(x)).

We have

f =~ di2, so we begin

f(x) = (x - xi)2 + (cx - yi)2,

f'(x) = 2(x - xi) + 2(cx - yi), so the critical number is

x = (xi + cyi)/(1 + c2).

Plugging this into F = Sigma di2

(omitting sigma for now)

= ([xi + cyi - xi(1+c2)]2 + [c(xi + cyi) - yi(1+c2)]2) / (1 + c2)2

= ([cyi - yic2]2 + [cxi - yi]2) / (1 + c2)2

= [c2(yi - xic)2 + (-1)2(yi - cxi)2] / (1 + c2)2

= (c2 + 1)(yi - cxi)2/(1 + c2)

= (yi - cxi)2/(1 + c2).

So F(c) = Sigma di2 = 1/(1 + c2) Sigma (yi - cxi)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 + c2)2 Sigma [2(1+c2)(yi - cxi)(xi) + 2c(yi - cxi)2]

= -2/(1+c2)2 Sigma [(yi - cxi)[1*],

[where 1* = (1 + c2)xi + c(yi - cxi)

= xi + c2xi - cyi - c2xi

= xi - cyi]

= -2/(1 + c2)2 Sigma (yi - cxi)(xi - cyi).

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

Sigma (yi - cxi)(xi - cyi)

= Sigma yixi - c(yi2 + xi2) + c2xiyi as a function of c.

This is a quadratic equation, with

c = a = Sigma xiyi, and b = -Sigma yi2 + xi2.