beginner question



Robert Jerrard wrote:
> Hi Doug,
>
> On Mon, 2007-10-22 at 19:49 -0500, Doug Stewart wrote:
>   
>> I have
>>
>>
>> exp1:a1*s*h1=(h2-h1)/r1 +u;
>> exp2:a2*s*h2 = -(h2 -h1)/r1 - h2/r2;
>> a1=1;
>> a2=1;
>> r1=.5;
>> r2=1/3;
>> solve([exp2,exp1],[h1,h2]);
>>
>> and this works but now I want to use the numerical values for a1 a2  r1 r2.
>>
>> How do I get a final answer.
>>     
>
> It really depends on what you mean by "use the numerical values" and
> "get a final answer". Lines like a1=1; do not cause a1 to take-on the
> value on the right side of the equation. In fact, a1=1 is just an
> equation, if you run the input a1; after doing a1=1; you will get the
> output a1, that is, Maxima still sees a1 as a variable.  If you want the
> solution for h1 and h2 with the values you give substituted in you could
> do the following.
>
> exp1:a1*s*h1=(h2-h1)/r1 +u;
> exp2:a2*s*h2 = -(h2 -h1)/r1 - h2/r2;
> solve([exp2,exp1],[h1,h2]),a1=1,a2=1,r1=0.5,r2=1/3;
>
> Is this what you are looking for? The equations after the solve command
> work as conditions to be applied to the result.
>
> HTH, Bob
>   

Yes thanks.
and thanks to  Barton Willis
Doug