My code:
eq = {x + y - z == -1, x^2 + y^2 - z == 3};
sol1 = Eliminate[eq, z]
sol2 = Solve[sol1, y]
At this point I would like to define to functions $y(x)$ to get theri domain with FunctionDomain. But I get an error typing this line:
{a1[x_], a2[x_]} := {y /. sol2}
The problem is that the two lists are not of the same type. How can I explain that the right term is a function in x?
{a1[x_], a2[x_]} := Evaluate[y /. sol2]
. You can check the definitions with?a1
and?a2
. $\endgroup$SetDelayed
has the attributeHoldAll
. In particular,{a1[x_], a2[x_]} := y /. sol2
cannot see that the right hand side is also a list of length 2. This is what gets remedied byEvaluate
. $\endgroup$