I'm building a program that calculates the cost of an item based on it's size (let's say a bamboo pole). As the customer requests a longer pole, it gets hard to find a bamboo, plus requires more resources to grow, therefore, I would want to charge more per inch for the piece of bamboo based on it's length approaching a particular length. Then after that point the cost per inch would really escalate.
I believe that log would be the function that I need to use, but I just can't figure out how to make my formula. I've tried log(-x), log(x-1), log(y-x), I can't figure out how to get the log to shoot up to infinity, nor target a specific point.
Referencing the example above, I would want the cost/inch of the bamboo to stay reasonable up to 72", but after that, the cost/inch should rapidly increase, until it gets to 100", where it would become ridiculously expensive. Before 72", it should rise in cost/inch, but at a slow rate (it costs a little bit more per inch to grow a 72" stick than a 6" stick). I'm looking for a uniform growth, not a split formula. No f(x) where x<72, g(x) where x>72.
I'm not necessarily looking for the formula to solve the above question. I am looking for the HOW to research and solve the above question.
Many Thanks, Matt