Here is a very simple set of equations to solve:
Solve[{x == 2, y == 0.5, z == 0.0, r == 0.4, dbtot == Sqrt[x^2 + y^2 + z^2], 1/dib == -2/r - 1/(dbtot - r)}, {dbtot, dib}] {{dbtot -> 2.06155, dib -> -0.178513}}
This is the correct answer.
However, if I merely need dib and list it as the solution variable...
Solve[{x == 2, y == 0.5, z == 0.0, r == 0.4, dbtot == Sqrt[x^2 + y^2 + z^2], 1/dib == -2/r - 1/(dbtot - r)} , {dib}] {{dib -> -0.217687}, {dib -> -0.178513}}
This contains the correct solution (dib -> -0.178513) as well as an incorrect answer (based on an impossible negative value of dbtot).
I've tried Assuming and With and incorporating constraints such as dbtot > 0. All are (I think) unnecessary and none of them work.
How do I use Solve to get the single correct value for dib?
An even more elementary illustration of the problem is here:
Solve[{r == .4, 1/dib == -2/r - 1/(2.12132 - r)}, {dib}] {}
What could be simpler than that?!
Solveto explicitly eliminatedbtotfrom the system of equations, and then it will return your expected result:Solve[eq, dib, {dbtot}], whereeqis your system of equations, returns{{dib -> -0.178513}}. $\endgroup$SolvewithReducehandles both your cases. I haven't the foggiest as to whySolveis struggling. $\endgroup$dibusingdib /. Reduce[...]but that will not work elegantly. $\endgroup$ToRuleswithReduceto get rules rather than equations as results. $\endgroup$