Substitutions and the subs command

Suppose you have a variable thing , defined in terms of another variable t:

> thing := t^4 - 2*t^3 + t + 6;

You'd like to know the value of thing if [Maple Math] . One way to do this is to assign t := 2 and then look at the value of thing. One drawback to this approach is that now t has been set equal to 2 and if you're planning to use t again you'll have to clear its value. There is an alternate approach that will tell you the value of thing when [Maple Math] , without actually assigning t equal to 2. It's Maple's subs command. An example:

> subs( t=2, thing );

The above command told Maple "tell me the value of thing supposing t is equal to 2", without actually setting t equal to 2; you can check that t has not been assigned any value. Also, the subs command can substitute several variables at once. To find the value of [Maple Math] when [Maple Math] , [Maple Math] , and [Maple Math] ,

> subs( {s=a+5, t=9, u=-4}, u^2 - t - s );
s;
t;
u;

>

Note that the values of s, t, and u have not been altered.
Do you see why the curly braces {} are needed here?