lhs - Maple Help

Online Help

All Products    Maple    MapleSim

lhs

left-hand side of an expression

rhs

right-hand side of an expression

 Calling Sequence lhs(expr) rhs(expr)

Parameters

 expr - equation, inequality, relation, range, or type test/declaration

Description

 • lhs(expr) returns the left-hand side of expr, which is equivalent to  $\mathrm{op}\left(1,\mathrm{expr}\right)$.
 • rhs(expr) returns the right-hand side of expr, which is equivalent to $\mathrm{op}\left(2,\mathrm{expr}\right)$.

Thread Safety

 • The lhs and rhs commands are thread-safe as of Maple 15.
 • For more information on thread safety, see index/threadsafe.

Examples

 > $e≔y=a{x}^{2}+b$
 ${e}{:=}{y}{=}{a}{}{{x}}^{{2}}{+}{b}$ (1)
 > $\mathrm{lhs}\left(e\right)$
 ${y}$ (2)
 > $\mathrm{rhs}\left(e\right)$
 ${a}{}{{x}}^{{2}}{+}{b}$ (3)
 > $r≔2..5$
 ${r}{:=}{2}{..}{5}$ (4)
 > $\mathrm{lhs}\left(r\right)$
 ${2}$ (5)
 > $\mathrm{rhs}\left(r\right)$
 ${5}$ (6)
 > $t≔a::\mathrm{integer}$
 ${t}{:=}{a}{::}{\mathrm{integer}}$ (7)
 > $\mathrm{lhs}\left(t\right)$
 ${a}$ (8)
 > $\mathrm{rhs}\left(t\right)$
 ${\mathrm{integer}}$ (9)
 > $h≔w+z<6$
 ${h}{:=}{w}{+}{z}{<}{6}$ (10)
 > $\mathrm{lhs}\left(h\right)$
 ${w}{+}{z}$ (11)
 > $\mathrm{rhs}\left(h\right)$
 ${6}$ (12)
 > $f≔y={x}^{2}+2x+1$
 ${f}{:=}{y}{=}{{x}}^{{2}}{+}{2}{}{x}{+}{1}$ (13)
 > $\mathrm{solve}\left(f=0,x\right)$
 > $\mathrm{solve}\left(\mathrm{rhs}\left(f\right)=0,x\right)$
 ${-}{1}{,}{-}{1}$ (14)

 See Also

Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam