# Trouble in solving simultaneous equations with subscripts

My goal is to solve equation with subscripts. But the result shows {{}}. Strange enough, If I don't use subscripts, result shows. Is there a limitation in using subscripts? How to fix code below?

This code doesn't work. How to fix to use subscript?

 Clear["Global*"]
Solve[Subscript[y, 1] == Subscript[x, 1] + Subscript[x, 2] &&
Subscript[y, 2] == Subscript[x, 1]/(
Subscript[x, 1] + Subscript[x, 2]), {Subscript[x, 1], Subscript[x,
2]}]


This code works with no subscript.

Clear["Global*"]
Solve[y1 == x1 + x2 && y2 == x1/(x1 + x2), {x1, x2}]

• Don't use subscripts. Subscripts are primarily a formatting command. Use arrays a[], a[].. or functions a, a, instead Apr 29 at 15:13
• If you really need the output to have subscripts, you can use what @bills recommends and then convert to subscripts at the end: sol = Solve[y == x + x && y == x/(x + x), {x, x}]; sol /. x[i_] -> Subscript[x, i] /. y[i_] -> Subscript[y, i].
– JimB
Apr 29 at 15:55
• MMA version 12.1 Both calculations work for me. Apr 29 at 15:58
• You can format the display of indexed variables with subscripts, e.g., Clear["Global*"]; Format[x[n_]] := Subscript[x, n]; Format[y[n_]] := Subscript[y, n]; Solve[y == x + x && y == x/(x + x), {x, x}]` Apr 29 at 17:38