# Strange behaviour of Append [closed]

I have the following situation and I completely do not understand why the second system can be solved but the first (of the same equations, as it seems) cannot. How is it possible?

In[1]:= a={x^2+y^2==1};
Append[a,x+y==0]
Solve[a,{x,y}]

b={x^2+y^2==1,x+y==0}
Solve[b,{x,y}]

Out[2]= {x^2+y^2==1,x+y==0}
During evaluation of In[1]:= Solve::svars: Equations may not give solutions for all "solve" variables. >>
Out[3]= {{y->-Sqrt[1-x^2]},{y->Sqrt[1-x^2]}}
Out[4]= {x^2+y^2==1,x+y==0}
Out[5]= {{x->-(1/Sqrt[2]),y->1/Sqrt[2]},{x->1/Sqrt[2],y->-(1/Sqrt[2])}}
• Did you mean to use AppendTo[a,x+y==0]? ...because simply using Append does not modify a Apr 14 '15 at 16:13
• @Manuel--Moe--G Thank you! So that is just a consequence of my poor knowledge of the program. Apr 14 '15 at 16:23

Append has no side effect

You may try AppendTo

a = {x^2 + y^2 == 1};
AppendTo[a, x + y == 0]
Solve[a, {x, y}]

resulting in

(* {{x -> -(1/Sqrt[2]), y -> 1/Sqrt[2]}, {x -> 1/Sqrt[2],
y -> -(1/Sqrt[2])}} *)

or consider simply

Append[a, x + y == 0] // Solve
• a=Append[a,x+y==0] also would work. Apr 14 '15 at 23:29