Unable to figure out general equation of a percent increase & decrease

45 Views Asked by At

I've been doing a small coding project, and I've been having trouble figuring out mathematically the exact amount of increases and decreases of percentages I can do within a 'budget'.

For my specific issue, I have a budget of 0.05. Each decrease uses 0.002, and each increase uses 0.004. I also have an initial value that I want to keep ultimately equal, while causing the largest possible decrease & increase. However, each decrease multiplies the value by $1-a$ , and each increase increases the value by $1+b$. Both $a$ and $b$ are variable inputs, but are within the bounds of $1\ge a\ge 0$ and $1\ge b\ge 0$.

Originally, I got this system of equations, where $n$ is the percentage left after all decreases, and $m$ is the percentage gained by all increases: $$.002x+.004y=.05$$ $$n=(1-a)^x$$ $$m=(1+b)^y$$ $$1+m=n^{-1}$$

So far, I've gotten to this system of equations: $$x=25-2y$$ $$1+(1+b)^y=(1-a)^{2y-25}$$ But, I can't figure out how to isolate y in the second equation.

Any help (or pointers on how to format questions better) is greatly appreciated.

1

There are 1 best solutions below

0
On

The question was answered in a comment, I mistakenly thought that the percent increase was $initial+(initial*m)$, when it was actually $initial*m$. The system is then easily solvable with $log$.

Kudos to peterwhy.