I have a real-world problem.

Let $x$ = cost of goods

Let $f(x)$ be profit as a function of $x$.

I want to know the expression/solution for $f(x)$ such that:

$f(250) = 30$

$f(500) = 40$

$f(1000) = 50$

$f(2000) = 70$

$f(5000) = 200$

$f(10,000) = 300$

Is it possible to solve the expression/solution for $f(x)$? What's the answer? Show working out, please.

Now, I don't actually want a function that is too complicated or qualified such as a polynomial with too many terms. So even better as a solution, I want the simplest recognizable common function that would approximate this function.

  • 1
    $\begingroup$ Given functional values at a finite number of points, infinitely many functions pass through them. $\endgroup$ – The Long Night Nov 3 '18 at 11:30
  • $\begingroup$ That's a good point. I'm not a mathematically fluent, but intuitively I think what I'm after is the most parsimonious function, the best fit, minimizing deviation, the tightest fit. Does that make sense? $\endgroup$ – ptrcao Nov 3 '18 at 11:32

There are numerous curve fitting methods that you could use depending on what kind of (and how close) an approximation you want. A quick quintic regression fit here yields -

$ f(x) = 13.68244 + 0.08149843\cdot x - 0.00007274243\cdot x^2 + 3.263991e-8\cdot x^3 - 5.354894e-12\cdot x^4 + 2.765461e-16\cdot x^5$

$= (-16)\cdot x^5 + (-12) \cdot x^4 + (-8) \cot x^3 + (-0.00007274243) \cdot x^2 + 0.08149843 \cdot x + (13.68244 - 5.354894 \cdot e)$

If you want an even simpler function, you could use the cubic, $f(x) = (-10) \cdot x^3 + 0.000009219122 \cdot x^2+ 0.004897218 \cdot x + ( 32.39645 - 7.032359 \cdot e) $, but it will be less accurate.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.