You can try SolveValues instead of Solve:
sys = {-x1 + y1 + y5 == 0,
-x4 + y2 == 0,
y3 - 2 x5 y4 == 0,
-1 + 2 x4 + y4 == 0,
-x2 + x5 + y5 == 0};
al = {y1, y2, y3, y4, y5, x1, x2, x3, x4, x5};
SolveValues[sys, al]
Thread[al -> %[[1]]]
sys /. % // Simplify
Thank you very much.May version 12 doesn’t have this SolveValues .Howhever from your example i don’t see how to chose specific vars ys, anyway i will trry different ways. thank’s
There is no x3 in your system.
That may be an error or it may be confusing Solve.
You can also try using Reduce instead of Solve. That will use different methods.
Either Solve or Reduce may work better when solving n equations for n variables.
Maybe this is what you want (it’s not very clear).
Solve[sys, Complement[al, ys], MaxExtraConditions -> 1]
(* During evaluation of In[8]:= Solve::svars: Equations may not give solutions for all "solve" variables.
Out[8]= {{x1 -> ConditionalExpression[y1 + y5, -1 + 2 y2 + y4 == 0],
x2 -> ConditionalExpression[(y3 + 2 y4 y5)/(
2 y4), -1 + 2 y2 + y4 == 0],
x4 -> ConditionalExpression[(1 - y4)/2, -1 + 2 y2 + y4 == 0],
x5 -> ConditionalExpression[y3/(2 y4), -1 + 2 y2 + y4 == 0]}} *)
Didn’t expect so many fans! Thank you all guys