In general, when the system of equations is overdetermined, you have an optimization problem and would therefore not expect Solve
or Reduce
to be the right tools because the equations are likely not solvable "exactly" but only in some "best possible" way.
You would then instead formulate the optimization problem in terms of a merit function that you attempt to extremize. For example, in a system of linear equations you would want to minimize the sum of squares of the error for each equation.
A simple implementation of this would be to use Minimize
, and for more specialized solutions one can use PseudoInverse
or SingularValueDecomposition
. Since your example is very simple, I'll just try to illustrate how to treat it with Minimize
:
Last@Minimize[{(x + y + z - 5)^2, y == 3}, {x}]
Here the y == 3
is entered as a constraint whereas the other equation is converted to a squared "merit function" that has to be minimized. That last function would in general be a sum of several squares if you have more equations.
The result is a Piecewise
expression of which we only need the part that actually satisfies y == 3
:
$ \left\{ x\to\begin{cases}
2-z & y=3\\
\text{Indeterminate} & \text{True}
\end{cases}\right\} $
An alternative would be:
Last@Minimize[{(x + y + z - 5)^2 + (y - 3)^2}, {x}]
$ \{x \to 5 - y - z\}$