# Eliminate variable with partially documented Solve feature Solve[eqns,vars,elims]. Robust?

The Eliminating Variables section on Manipulating Equations and Inequalities documentation quotes an otherwise undocumented feature for Solve

Solve[eqns,vars,elims] find solutions for vars, eliminating the variables elims

However, that structure is not mentioned in the documentation for Solve itself, where the third argument is the Domain and not the variables to be eliminated.

This works

Solve[{x + y == 6 a + 3 b, y == 9 a + 2 x}, {x}, {a}]
(* {{x -> 1/7 (9 b - y)}}  *)


Equivalent to

Solve[Eliminate[{x + y == 6 a + 3 b, y == 9 a + 2 x}, a], {x}]


And different from

Solve[{x + y == 6 a + 3 b, y == 9 a + 2 x}, {x,y}]
(* {{x->-a+b,y->7 a+2 b}} *)


On this answer I found a form that works, but almost any variation of it, doesn't. Either it takes forever to evaluate, or it doesn't evaluate.

This works,

Block[
{
q,
subs = ( (β*F^α + 1) -> q ), (* Put your intuition here *)
expre1 = ρ == F/(β*F^α + 1)^(1/α),
expre2 = d ==(F/(β*F^α + 1)^((1/α))) + 4/3 F/(β*F^α + 1)^(1 + 1/α)
},
Assuming[
{F, β, α, ρ, q} ∈ PositiveReals,
Solve[
Reduce[{expre2, expre1}/.subs]
, {d}
, {q} (* Undocumented "Eliminate" feature*)
, InverseFunctions->True
]
]
]
Simplify@%


It does give the expected solution despite the warning: "This system cannot be solved with the methods available to Solve."

This version Solve doesn't evaluate.

Assuming[
{F, β, α, ρ, q} ∈ PositiveReals,
Block[
{
q,
subs = ( (β*F^α + 1)->q ),
expre1 = ρ == F/(β*F^α + 1)^(1/α),
expre2 = d == (F/(β*F^α + 1)^((1/α))) + 4/3 F/(β*F^α + 1)^(1 + 1/α)
},
Simplify@Solve[Reduce[ {expre2, expre1}/.subs], {d}, {q}, InverseFunctions->True]
]
]


Which makes me believe probably that feature is not as robust as the alternatives.

There is an answer by @Mr.Wizard that acknowledges the existence of this feature in Solve and Reduce, and points out that this feature used to be documented in older versions, but it doesn't answer any of the following questions:

Why is the feature not documented in new versions?

What is the way to eliminate the ambiguity between Domain and variables to be eliminated as the third argument?

Why does Mathematica warns that Solve can't solve but gives the solution anyways?

Does Solve[eqns,vars,elims] have more limited scope or utility than combining Solve[Eliminate[eqns, elims], vars] ?

• Ok, the ambiguity seems to removed by the brackets {}? It looks like if the arguments is in brackets the argument is interpreted as variables to be eliminated, if not it is interpreted as a domain. Can somebody confirm? Jan 24, 2023 at 12:20
• Solve[x == y, z, w] yields Solve::bdomv, which supports the theory that elims should be a list. (That's been my assumption for years, ever since elims disappeared from the doc pages for Solve and Reduce -- Note Solve[eqns, vars, elims, dom] is possible, too. Jan 27, 2023 at 18:02