# Solve for variable inside multiple power in terms of the powers.

I'm a programmer working to write test software. Currently estimates the values it needs with by testing with a brute force algorithm. I'm trying to improve the math behind the software so that I can calculate the solution(s) instead. I seem to have come across an equation that is beyond my ability.

$$(Bx_1 + 1)^{y_2}=(Bx_2 + 1)^{y_1}$$

My goal is to have $B$ as a function of everything else, or have an algorithm solve for it. I feel like it should be possible, but I not even sure how to begin.

-
$x_1, x_2, y_1, y_2$ are given? Are they real numbers? Try taking logarithm first. – Memming Nov 20 '12 at 17:18
They are real numbers, the $x$'s are actually a measured time and the $y$'s are a measured frequency. Taking the logarithm is actually where I came from. I had $y_1\ln(Bx_2+1)=y_2\ln(Bx_1+1)$ and my instinct was to eliminate the logarithms. – Fr33dan Nov 20 '12 at 18:11
$B = 0$ is always a solution, isn't it? – Memming Nov 21 '12 at 20:37
No, since that would result in $1^{y_1}=1^{y_2}$ and $y_1$ does not equal $y_2$ – Fr33dan Nov 22 '12 at 2:09
$1^y = 1$ for all $y$, no? – Memming Nov 23 '12 at 18:43

Okay so I came up with a that allows me to approximate the answer if $\frac {y_2}{y_1}$ is rational (which it will be in my case because I have limited precision).
I can re-express the original equation as $$(Bx_1+1)^{\frac {y_2}{y_1}}=Bx_2+1$$
If $\frac {y_2}{y_1}$ rational I can change it to $\frac ND$ where $N$ and $D$ are integers. Substituting this back in and redistributing the fraction I get $$(Bx_1+1)^N=(Bx_2+1)^D$$