Solving the equation $ 12r = 5(x+1) - \frac {s}x$ w.r.t. $x$

144 Views Asked by At

(Skip the first paragraph if you just want to read the actual math problem)

I love mathematics (despite the fancy names for everything) and was playing a single-player modded version of Minecraft (SkyFactory 4) with a special block that requires an increasing amount of power to be inputed into it every 10 minutes to generate special points. I haven't waited long enough to see this happen, but I have tried this overnight: if the machine does not receive a certain amount of power in any 10 minute cycle, the machine will turn off, deleting all previously earned points. Knowing this, I used AutoHotKey to make a program that will click the "collect" button (which also turns off the device) after waiting a set amount of time to give me the points. To make my life easier, I made a formula to figure out the amount of power the machine needs every 1/20 second (every time it checks for power), which is $$r = \frac{5(x+1) - \frac sx}{12}$$, where $r$ is the amount of power I need, $x$ is the amount of points I want, and $s$ is the amount of previously stored power.

What I want to know is if I can solve $r = \frac{5(x+1) - \frac sx}{12}$ for x so that way in the game I'm playing I can determine how many special points $x$ I can get with variables $r$ and $s$. I attempted to solve it myself and only got about as far as $$12rx = 5x^2 + 5x - s$$ If it can be solved, please show me the steps on how it is solved. I have a feeling the answer might come from a Calculus formula involving derivatives or a special Matrix formula, but I haven't taken Calculus yet and it would be nice to know this information before I take it. If there is no way to solve it, please explain why.

2

There are 2 best solutions below

0
On BEST ANSWER

$$12rx=5x^2+5x-s$$

$$5x^2+(5-12r)x-s=0$$

which is a quadratic equation.

Hence $$x=\frac{(12r-5)\pm \sqrt{(12r-5)^2-20s}}{10}$$

From the two solutions that you found, you might want to look at the physical meaning of $x$ and determines which is the one that you need.

Note that for $ax^2+bx+c=0$, the formula is $$x=\frac{-b \pm \sqrt{b^2-4ac}}{2a}$$

0
On

It just an algebra problem, but not a particularly pretty one. Rewrite as

$$5x^2 + (5-12r)x = s$$

$$x^2 + \frac{5-12r}{5}x = \frac{s}{5}$$

Then "complete the square." Which means adding the square of half the linear coefficient to both sides.

$$x^2 + \frac{5-12r}{5}x +\left(\frac{5-12r}{10}\right)^2= \frac{s}{5}+\left(\frac{5-12r}{10}\right)^2$$

Now the left side factors as

$$\left(x + \frac{5-12r}{10}\right)^2 = \frac{s}{5}+\left(\frac{5-12r}{10}\right)^2$$

Take square roots of both sides

$$x + \frac{5-12r}{10} = \pm \sqrt{\frac{s}{5}+\left(\frac{5-12r}{10}\right)^2}$$

Subtract the last bit of junk from the left

$$x = - \frac{5-12r}{10}\pm \sqrt{\frac{s}{5}+\left(\frac{5-12r}{10}\right)^2}$$

Simplify the stuff inside the square root, if you want.