If a_(1)<**<a_(n) find the minimum value of f(x)=sum_(i=1)^(n)(x-a_(i))^(2) .
On each interval "(a_k,a_{k+1})" :
"f(x)=\\displaystyle\\sum_{i=1}^k(a_i-x)+\\displaystyle\\sum_{i=k+1}^k(x-a_i)=(n-2k)x+\\displaystyle\\sum_{i=1}^ka_i-\\displaystyle\\sum_{i=k+1}^ka_i"
Thus, "f(x)" is decreasing on "(a_k,a_{k+1})" as long as "n-2k>0", i.e. "k<n\/2", increasing as soon as "k>n\/2".
There are two cases:
If "n" is odd, "n=2p+1", there is a unique minimum, attained at the middle point "a_{p+1}", and its value is:
"f(a_{n+1})=-a_1-...-a_n+a_{n+2}+...+a_{2p+1}"
If "n" is even, "n=2p", the function attains its minimum on the middle interval "[a_p,a_{p+1}]" and its value is:
"-a_1-...-a_p+a_{p+1}+...+a_{2p}"
Comments
Leave a comment