# Cannot solve this polynomial equation

I'm trying to solve the following polynomial equation for $$x$$:

$$(qx)^\alpha (1-qx)^{1-\alpha} = [(1-q)x]^\beta [1-(1-q)x]^{1-\beta}$$

where $$\alpha, \beta, q, x$$ are all strictly between 0 and 1.

Sadly both Solve and Reduce refuse to help. I've also tried log-transforming, to no luck. What makes this polynomial so hard to solve?

• Since alpfa and beta are between 0 and 1, this equation is is nonlinear but not a polynomial one. This makes it impossible to solve. Commented Nov 8, 2023 at 18:07
• That's very interesting. In what sense are non-linear, non-polynomial equations impossible to solve? What should I call this equation instead? Do you have a reference for these kinds of problem? How would one go about solving them? Commented Nov 8, 2023 at 18:10
• If you assign the constants reasonable rational values, then can use poly=GrobenerBasis[eqn,x] to reduce eqn to a polynomial, then poly[[1]] is a polynomial representation of eqn, then can solve for the roots then subset of roots are solutions to original equation.
– josh
Commented Nov 8, 2023 at 18:29
• Thank you! I'm not sure what "reasonable" means in this case. Is there any resource I could read on this kind of computation? Commented Nov 8, 2023 at 18:45
• I mean low order exponents like 1/2 or 1/3 or 1/4, 1/5. Generally users here like to see some attempt at solving problem although some don't mind. Can you format an error-free expression for your equation in Mathematica code as myEqn=leftSide==rightSide with $\alpha=1/2$, $\beta=1/3$ and $q=1/4$ and update your post above?
– josh
Commented Nov 8, 2023 at 19:03

\$Version

(* "13.3.1 for Mac OS X ARM (64-bit) (July 24, 2023)" *)

Clear["Global*"]

Manipulate[
{a, b} = Rationalize[{av, bv}];
{eqn = (q x)^a (1 - q x)^(1 - a) == ((1 - q) x)^
b (1 - (1 - q) x)^(1 - b), "",
StringForm["solution:  `",
sol = NSolve[{eqn /. q -> Rationalize[qv], 0 < x < 1},
x, Reals, WorkingPrecision -> 15] // N], "",
ContourPlot[Evaluate@eqn,
{x, 10^-6, 1 - 10^-6}, {q, 10^-6, 1 - 10^-6},
GridLines -> {x /. sol, {qv}},
GridLinesStyle ->
Directive[Red, Dashed, AbsoluteThickness[1]],
FrameLabel -> (Style[#, 14] & /@ {x, q}),
ImageSize -> 360]} //
Column,
{{av, 0.2, "α"}, 0.005, 0.995, 0.005, Appearance -> "Labeled"},
{{bv, 0.3, "β"}, 0.005, 0.995, 0.005,
Appearance -> "Labeled"},
{{qv, 0.15, "q"}, 0.005, 0.995, 0.005, Appearance -> "Labeled"},
SynchronousUpdating -> False,
TrackedSymbols :> {av, bv, qv}]

• Thank you! It will take me some time to parse through the code and understand it all. Is there some precise reason why Mathematica can't offer a closed form solution? Commented Nov 9, 2023 at 16:32
• Either there isn’t one or Mathematica doesn’t how to get there. Commented Nov 9, 2023 at 18:46