This method works if f(x) comprises of a single absolute term. If there are two or more terms, i.e. f(x,y) = |2x-y+3|+|x+3y+1| + |x-y+6|, the optimal solution which minimizes f is not the same as g(x,y) = (2x-y+3)^2+(x+3y+1)^2 +(x-y+6)^2, simply because there is no way to transform the second...