0

Quick question; I have the following formula:

$$y = \left( 0.5 + \log_5(x)\right) \times \log\left(\frac x{10}\right) + 1$$

where $X$ is a player's experience in a game and $Y$ is the level of the player.

Now what I need to do is reverse it and solve for $x$, so the input $(y)$ is the level, and I need the experience required to reach that level.

Hope you guys can help!

TheQ
  • 103

2 Answers2

2

We have $\quad y= (0.5 +\log_{5}x)\cdot\log_{10}(\frac{x}{10})+1$

Note that $\log(ab)=\log a+\log b\quad\text{and}\quad\log(\frac{a}{b})=\log a-\log b$

Then $y = (0.5+\log_{5}x)(\log_{10}x-\log_{10}10)+1$

Note the following change of base formula: $\log_{a}b =\frac{\log_{c}b}{\log_{c}a}$

Then $$y = \left(0.5+\frac{\log_{10}x}{\log_{10}5}\right)\left(\log_{10}x-1\right)+1$$

$$y=0.5\log x-0.5+\frac{(\log x)^2}{\log 5}-\frac{\log x}{\log 5}+1$$

$$y = \frac{1}{\log 5}((\log x)^2-\log x+0.5\log 5\log x+0.5\log 5)$$

Let $u = \log x$

$$y =\frac{1}{\log 5}(u^2+(0.5\log 5-1)u+0.5\log 5)$$

$$y=\frac{1}{\log 5}\bigg(\left(u+\frac{0.5\log 5-1}{2}\right)^2 +0.5\log5-\bigg (\frac{0.5\log 5-1}{2}\bigg)^2\bigg)$$

$$y\log 5 -0.5\log5+\bigg (\frac{0.5\log 5-1}{2}\bigg)^2 = \bigg(u+\frac{0.5\log 5-1}{2}\bigg)^2$$

$$u = \frac{-0.5\log 5+1}{2}\pm \bigg(y\log 5 -0.5\log5+\bigg (\frac{0.5\log 5-1}{2}\bigg)^2\bigg)$$

Then $$x = 10^{\frac{-0.5\log 5+1}{2}\pm \bigg(y\log 5 -0.5\log5+\bigg (\frac{0.5\log 5-1}{2}\bigg)^2\bigg)}$$

mrnovice
  • 5,773
  • @mrnovie oh thanks. I got up to y=1/log5(u2+(0.5log5−1)u+0.5log5) and then got stuck. Thanks! – TheQ Apr 26 '17 at 23:51
  • @TheQ I'm a bit OCD, but just put some dollar signs on either side of your equation so the formatting looks a little nicer! – John Doe Apr 26 '17 at 23:57
1

$$y=(0.5+\frac{\log x}{\log5})*(\log x -\log 10)+1$$ $$y=(0.5+\frac{\log x}{\log5})*(\log x -1)+1$$ Let $\log x=t$ $$y=(0.5+\frac{t}{\log 5})*(t-1)+1$$

Now you can solve this quadratic right?