I did get this advice, but it is unfinshed and I have no way of testing it:
Polynomials would never be a good fit: for example it must go to either -infinity or +infinity, thus violating the assumptions for min or max.
For this question, line segments make more sense. You are given 10 data points (including (0, 4.95)): let's label them as (x_0, y_0), ..., (x_9, y_9), where (x_0, y_0) = (0, 4.95), etc.
The slopes between (x_(i-1), y_(i-1)) and (x_i, y_i) is
m_i = (y_i-y_(i-1))/(x_i-x_(i-1)), for i = 1, ..., 9.
Now you can always find the function of the form:
f(x) = sum_{i=0 to 9} a_i*|x-x_i| + b, subject to the slope condition
a_0 - a_1 - a_2 ... - a_9 = m_1
a_0 + a_1 - a_2 ... - a_9 = m_2
...
a_0 + a_1 +... +a_8 -a_9 = m_9
a_0 + a_1 +... +a_8 +a_9 = 0 (this last equation takes care of the slopes for x < 0, and x > x_9)
and b is chosen so that f(0) = 4.95.
This is a system of equation with 10x10 matrix of full rank, hence solvable. (in fact the coefficient determinant is 2^9 > 0)
Therefore the formula does exist. |