Minimizing distance of a point to a set of points

267 Views Asked by At

Given $f(x) = \frac{1}{2} \sum_{i=1}^n w_i (x - b_i)^2$, $w_i$ is a positive integer.

Find $x$ so that $f(x)$ is minimized.

I don't really know where to start. Since I don't know the values of $w_i$ and $bi$.

2

There are 2 best solutions below

0
On BEST ANSWER

Expanding on the hint above, $$f'(x) = \sum_{i=0}^{n}w_i(x-b_i) = x\sum_{i=0}^nw_i - \sum_{i=0}^n w_i b_i$$ Find an $x_0$, such that $f'(x_0) = 0$, and check that $f''(x_0) > 0 $ is true, implying that $f$ has a local minimum at $x_0$.

1
On

Hint: what $x$ makes $f'(x) = 0$?