I'd like to know the inverse of this function:$ y = 100x + 5 (x - 1) (x / 2)$

169 Views Asked by At

I'm developing a game with a ranking system and I'm using the formula $$y = 100x + 5 (x - 1) (x / 2)$$ to figure out how much XP is needed to obtain a certain rank. Now the problem is, I also need to know what rank a player has depending on the amount of XP! Some help here would be greatly appreciated.

1

There are 1 best solutions below

1
On BEST ANSWER

To solve for $x$ given $y$, notice that $$ y = 100x + 5(x-1)(x/2) = 100x + 2.5x^2 - 2.5x = 2.5x^2 + 97.5x $$ so given $y$ you have $$ 2.5x^2 + 97.5x - y = 0 $$ and apply the Quadratic Formula.