The Maxima on-line user's manual

Algebra Calculator

Lhs

Function: lhs (<expr>) Returns the left-hand side (that is, the first argument) of the expression <expr>, when the operator of <expr> is one of the relational operators `< <= = # equal notequal >= >`, one of the assignment operators `:= ::= : ::`, or a user-defined binary infix operator, as declared by `infix`.

When <expr> is an atom or its operator is something other than the ones listed above, `lhs` returns <expr>.

See also `rhs`.

Examples:

```          (%i1) e: aa + bb = cc;
(%o1)                     bb + aa = cc
(%i2) lhs (e);
(%o2)                        bb + aa
(%i3) rhs (e);
(%o3)                          cc
(%i4) [lhs (aa < bb), lhs (aa <= bb), lhs (aa >= bb),
lhs (aa > bb)];
(%o4)                   [aa, aa, aa, aa]
(%i5) [lhs (aa = bb), lhs (aa # bb), lhs (equal (aa, bb)),
lhs (notequal (aa, bb))];
(%o5)                   [aa, aa, aa, aa]
(%i6) e1: (foo(x) := 2*x);
(%o6)                     foo(x) := 2 x
(%i7) e2: (bar(y) ::= 3*y);
(%o7)                    bar(y) ::= 3 y
(%i8) e3: (x : y);
(%o8)                         x : y
(%i9) e4: (x :: y);
(%o9)                        x :: y
(%i10) [lhs (e1), lhs (e2), lhs (e3), lhs (e4)];
(%o10)               [foo(x), bar(y), x, x]
(%i11) infix ("][");
(%o11)                         ][
(%i12) lhs (aa ][ bb);
(%o12)                         aa```

```(%o1)                                true
(%i2) ```

Related Examples

lhs-rhs-sqrt

lhs : 10*y+329;

rhs : 36 * sqrt( x^2 ...

lhs_new : lhs ^ 2;

Calculate

lhs

liste1 : [12,0,7,3,5,...

liste2 : [x=%i,x=-r,z...

liste3 : [[1,6],[2,5]...

Calculate

lhs-rhs

A_xm[t]:=(Mwi_x[t]-Mw...

eq:A_xm[t]=Cwi[t]/Dwi...

f1:rhs(eq)-lhs(eq);

Calculate

lhs-solve

e1:30=5*i1+5*%i*(i1-i2);

e2:0=2*i2+3*%i*i2+5*%...

e3:-20=4*i3+6*(i3-i2);

Calculate

eq:Aw_xm[0]/awi_12xm[...

f:rhs(eq)-lhs(eq);

Calculate

lhs

liste1:[0,8,5,9,1,4,3...

liste2:[x=-r,x=%i,y=1...

liste3:[[1,4],[2,7],[...

Calculate

V0[t]:=A_x[t]+(%beta_...

eq:V0[t]=C_x[t]/D_x[t...

Calculate

V[t]:=12*awi_12xm[0]/...

eq:V[t]=12*awi_12xm[0...

Calculate

eq1:sin(0.5*x)-2*x+0....

plot2d([lhs(eq1)],[x,...

Calculate

lhs-linsolve-plot2d

eq1:x*4+y-2=y;

eq2:x+2=y;

linsolve([eq1,eq2],[x...

Calculate