It's the arithmetic mean---even if you have more than two numbers.
f(x) = (x - x1)² + (x - x2)²
So f '(x) = 2(x - x1) + 2(x - x2). This is zero when
0 = 2(x - x1) + 2(x - x2) ==> x = ½(x1 + x2).
You can verify that this is the minimum in several equivalent ways, but the easiest is probably just observing that f is a parabola that is concave up and so takes a global minimum and has no maximum.
f(x) = (x - x1)² + (x - x2)²
So f '(x) = 2(x - x1) + 2(x - x2). This is zero when
0 = 2(x - x1) + 2(x - x2) ==> x = ½(x1 + x2).
You can verify that this is the minimum in several equivalent ways, but the easiest is probably just observing that f is a parabola that is concave up and so takes a global minimum and has no maximum.
-
(x1+x2)/2, the average of the two numbers.
f(x) =(x-x1)^2 + (x-x2)^2
f'(x) = 2(x-x1) +2(x-x2) = 4x - 2(x1+x2)
0= 4x-2(x1+x2)
2(x1+x2) = 4x
x=(x1+x2)/2
f(x) =(x-x1)^2 + (x-x2)^2
f'(x) = 2(x-x1) +2(x-x2) = 4x - 2(x1+x2)
0= 4x-2(x1+x2)
2(x1+x2) = 4x
x=(x1+x2)/2