On Tue, 03 Apr 2012 13:03:19 +0200, Sara Pashmin wrote:
> Hello,
>
> I try to eliminate the right side of the following equation, which I got
> from algsys-function:
>
> a = x+y
>
> but rhs(a) gives the answer: "0"
I guess 'a' is not defined. rhs returns 0 if 'a' is not an equation (or
inequality, etc).
You need to assign the resulting equation to a variable and take the
rhs of that, eg
eq1: 2*x+y=4;
eq2: x+2*y=5;
sol:algsys([eq1,eq2],[x,y]);
solx:sol[1][1];
soly:sol[1][2];
rhs(solx); /* gives you 1 */
or do it directly:
rhs(sol[1][1]);
Best,
Tamas