This question comes out of a game mod I was playing. In the game you get income every 30 seconds (period = $30s$), in order to increase your income you can send units (sending units will give you 10% of the unit cost in income).
In the game, you get to a kind of next stage when you reach $1M$ gold, so my question is how do I reach that fastest?
Let's say I started saving all my income as soon as my income reached $50K$, then it would take $\frac{1M}{50K}=20$ periods. Or I can instead double my income to $100K$, which would take $$1.1^x=2, x\approx7.27254$$ $$\frac{1M}{100K}+7.27254\approx17.27$$
But how do I check this for all values?
SOLUTION I ended up bruteforcing the solution to my problem, at the answer seems to be 90910, which is faster than 100K by 0.434248915812692 periods/rounds.
It takes ten rounds for any "investment" to pay itself back entirely. After that you will start earning from it. So if you, at any point, with your current income, have more than ten rounds left until you reach a million, then spend as much as you are allowed. If there are fewer than ten rounds, save it all. If there are exactly ten rounds, it doesn't matter either way.