Using ONLY calculus to prove that the minimum value of the function f(x)=|x-a1|+|x-a2|+|x-a3|+...+|x-a100| is f(a50) You are given a1<=a2<=a3<=.....<=a100.
yes..can u do it?
Nice problem! We will prove in general that the minimum value of \[f(x)=\sum_{k=1}^{2n}|x-a_k|\] where \(a_{k}<a_{k+1}\) for all \(k\) is \(f(a_n)\). Just for convenient, let \(a_0=-\infty\) and \(a_{2n+1}=\infty\). Notice that for \(x\in(a_k,a_{k+1})\) we have \(|x-a_i|=x-a_i\) for all \(0< i\leq k\) and \(|x-a_i|=-(x-a_i)\) for \(k< i<2n+1\). It follows that in \((a_k,a_{k+1})\) we have \[f(x)=\sum_{i=1}^{k}(x-a_i)+\sum_{i=k+1}^{2n} -(x-a_i)=(2k-2n)x+\sum_{i=k+1}^{2n}a_i-\sum_{i=1}^k a_i\] Note that \(f'(x)=2k-2n\). So \(f(x)\) is decreasing on \((a_k,a_{k+1})\) for all \(k<n\) and increasing for \(k> n\). Hence \(f(x)\) attain its's minimum value at \(a_n\).
Hi, how about my answer above? :)
very intuitive :) keep up. You are really good!
Join our real-time social learning platform and learn together with your friends!