Pokémon and Mathematical Functions

Philippines
November 2, 2010 12:04pm CST
I was gonna battle the Elite Four, and as usual, I started to stock up on items. I got my Potions, Super Potions, Hyper Potions and Max Potions. For those of you who don't know Pokémon game mechanics, Potions restore 20 health points, Super Potions restore 50 health points, Hyper Potions restore 200 health points, and Max Potions restore maximum health point capacity of any Pokémon. Now, I felt like buying other items that restore health points, like Soda Pop and Lemonade, which give 60 and 80 health points, respectively. However, I had a hard time deciding how many of each I would buy, as I am a guy who likes maintaining patterns. So, I thought I'd come up with a function that would help me solve my problem. I first wanted to make a polynomial function, for which I came up with the formula f(x) = 0.004x^2 - 1.08x + 68, wherein x is the amount of health points which an item can replenish, and f(x) is the number of items of that kind which I will buy. With this formula, I will get: For x = 20 health points, f(x) = 48 Potions. For x = 50 health points, f(x) = 24 Super Potions. For x = 200 health points, f(x) = 12 Hyper Potions. However, I realized that this function goes below 0 within some interval, and it'd be totally illogical to buy a negative number of items. I also realized that I had overlooked the Max Potions in this formula. I decided that a polynomial function would not be an apt equation to use for my function, but rather, I would use an exponential function with 6 (Max Potions) being my horizontal asymptote. (Being that Max Potion can restore an infinite amount of hp, had there been a Pokémon with such a health capacity. Of course this is theoretical and cannot be possible in-game mechanics.) Now, I simply do not know how to go about this, as I've tried several approaches and have not yet been able to come up with a solution. Someone please help me solve this so I can finally sleep. ^_^ Probably, if you'd read up until this point, you'd have realized that I'm super OC when it comes to certain aspects. ^_^