Question #168940

If a1< ...... <an . Find the minimum value of f(x) = (x - ai)² summation from i=1 to n


1
Expert's answer
2021-03-05T07:25:04-0500


Suppose a1<a2<<ana_1<a_2<⋯<a_n . Then on each interval (ak,ak+1),(a_k,a_{k+1}),


f(x)=i=1k(aix)+i=k+1n(xai)=(n2k)x+i=1kaii=k+1naif(x)=∑_{i=1}^k(a_i−x)+∑_{i=k+1}^n(x−a_i)=(n−2k)x+∑_{i=1}^kai−∑_{i=k+1}^na_i


Thus, f(x) is decreasing on (ak,ak+1)(a_k,a_{k+1}) as long as n2k>0,n−2k>0, i.e. k<n2k<\dfrac{n}{2} , increasing as soon as k>n2.k>\dfrac{n}{2}.


We see there are two cases:


If n is odd; n=2p+1, there is a unique minimum, attained at the middle point ap+1a_{p+1} , and its value is:


f(an+1)=a1an+an+2++a2p+1.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 [ap,ap+1][a_p,a_{p+1}] and its value is:

a1ap+ap+1++a2p.−a_1−⋯−a_p+a_{p+1}+⋯+a_{2p}.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS