Algebraic equations

In Maple, the = operator reflects the equals sign in secondary school. With it, you can describe an algebraic equation. It is not like C++ where = is the assignment operator. Remember, in C++, never read a = 3; as 'a' equals three, but rather, 'a' is assigned the value three.

In Maple, however, the equals operator signifies an equation. Both sides of the equals operator can be algebraic expressions:

[> 13*x = 57/9;

$13x = \frac{19}{3}$

[> 3x + 7 = x^2 - 5;

$3*x + 7 = x^2 - 5$

[> x + y + z + 1 = x^2 - xy^2 + z^3 + 5;

$x + y + z + 1 = x^2 - xy^2 + z^3 + 5$

Later, we will look into how we can find one or all values of $x$ that satisfy a given equation.

Assignment

We can assign an equation to a symbol using the := assignment operator:

[> eqn := x + y + 1 = x^2y - xy^2;

$eqn := x + y + 1 = x^2y - xy^2$

Left- and right-hand sides of an equation

Given an algebraic equation, you can request for either the left-hand side or right-hand side of the equation by using the lhs( ... ) or rhs( ... ) functions, respectively.

[> lhs( eqn );

$x + y + 1$

[> rhs( eqn );

$x^2y - xy^2$