$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}]
poly=GrobenerBasis[eqn,x]
to reduce eqn to a polynomial, thenpoly[[1]]
is a polynomial representation of eqn, then can solve for the roots then subset of roots are solutions to original equation. $\endgroup$