I'd greatly appreciate it if someone could please isolate "x" by manipulating the following equation: $$(2^xR)+x=(x-1)p$$
Asked
Active
Viewed 143 times
2
-
$2^x R + x = (x-1)p$ in $\LaTeX$. – Akiva Weinberger Aug 01 '14 at 05:53
-
I'm fairly certain that this can't be done with ordinary functions. Sorry. – Akiva Weinberger Aug 01 '14 at 05:56
2 Answers
4
There is an explicit solution for $x$ using Lambert $W$ function. The solution is given by $$x=\frac{p}{p-1}-\frac{W\left(-\frac{2^{\frac{p}{p-1}} R \log (2)}{p-1}\right)}{\log (2)}$$ In the case where the argument of the Lambert $W$ function is small or large, there are very nice approximations which at least would give you a reasonable estimate of the solution for starting a Newton procedure.
In fact, any equation which can be rewritten as $A+Bx+C\log(D+Ex)=0$ has an explicit solution which involves Lambert $W$ function.
Claude Leibovici
- 260,315
-
Wikipedia says Lambert functions use a complex number, denoted by "W", which makes this solution useless for my application. I'm looking for a rational number value of "x", which I can then test to see if it's an integer. Both p and R are known quantities. Even if it weren't complex, "W" would at the very least be an additional variable (thus I would be unable to solve for "x"). – JasonA Aug 01 '14 at 07:26
-
@JasonA. I am sorry ! I did not notice any restriction in the post. Cheers :-) – Claude Leibovici Aug 01 '14 at 07:32
-
You may be confused, $W$ is a function known as the Lambert $W$ function. It is not a variable. It can take complex or real valued arguments – ClassicStyle Aug 01 '14 at 07:34
-
@TylerHG. Thanks for your comment. I edited my answer to clarify each occurence of $Lambert$. Cheers :-) – Claude Leibovici Aug 01 '14 at 07:41
0
This is a transcendental equation, so it can't be solved by pure algebra techniques; there's no closed form solution.
pre-kidney
- 30,223
-
Damn. I've been trying to derive a simple metric for solving a computing problem. This formula is the only one I've been able to create which will indicate a valid value for p. "R" is actually a constant. If "x" is an integer for a given prime number "p" then it would indicate the prime number I'm looking for. – JasonA Aug 01 '14 at 06:03
-
If $R$ is required to be an integer, my guess is that there would be very few prime numbers that satisfy your equation. I would suggest modular arithmetic in this case. – pre-kidney Aug 01 '14 at 06:09