**Advice:**
Picking out members of a solution set

When Maple's various "solve" commands (including
**solve**
,
**dsolve**
,
**fsolve**
,
**isolve**
,
**msolve**
and
**rsolve**
) return the values of more than one variable or function, they generally do so in the form of a set of equations, e.g.
. As with any set, the order in which these occur is unpredictable. In particular, if you save your worksheet and reload it in another session, the answer that was
the first time may well be
the next time. Therefore it is dangerous to try to extract the parts of a solution in a way that depends on the order in which they are presented in the set. Instead, the recommended method is to use the
**subs**
command.

In the case of the numerical solution of a differential equation (
**dsolve(...,numeric)**
), the default is to return a procedure whose output will be a list of values of the dependent and independent variables. If the dependent variables are specified as a list rather than a set, this list will have the independent variable followed by the dependent variables in the same order as in the list. Note that without the
**numeric**
option, the dependent variables must be a set, not a list. Still, the most convenient method is to use
**subs**
to extract the value of the variable you want. On the other hand,
**dsolve(..., numeric, output=listprocedure)**
returns a list from which
**subs**
extracts a procedure to calculate the value of each variable. Alternatively,
**dsolve(..., numeric, values=...)**
returns a matrix with the values of the dependent variables at each of an array of values of the independent variable.

**Examples:**

`> `
**solution:= solve({ x + y = 9, x - y = 1},{x,y});**

`> `
**xvalue:= subs(solution,x);**

`> `
**xy:= subs(solution,[x,y]);**

`> `
**q:= subs(solution, x^2 + y^2);**

`> `
**de:= {D(x)(t)=x(t)+y(t), D(y)(t)=y(t), x(0)=1, y(0)=1}:**

`> `
**desol1:= dsolve(de, {x(t),y(t)}); **

`> `
**x1:= unapply(subs(desol1,x(t)), t);**

`> `
**desol2:= dsolve(de, [x(t),y(t)],numeric);**

`> `
**desol2(1);**

`> `
**subs(%, x(t));**

`> `
**desol3:=dsolve(de,[x(t),y(t)],numeric,
output=listprocedure);**

`> `
**x3:= subs(desol3,x(t));**

`> `
**x3(1);**

`> `
**desol4:= dsolve(de,[x(t),y(t)],numeric,
value=array([0,1,2]));**

**See also:**
__subs__
,
__solve__
,
__dsolve__
,
__dsolve/numeric__
,
__fsolve__
,
__isolve__
,
__msolve__
,
__rsolve__

**Maple Advisor Database, **
R. Israel 1997