Section 10.1 Assigning Equations
The assignment operator
:= can be used to assign a name to nearly any type of output. Often, it is useful to assign an equation (involving a regular \(=\) sign) a name. Some of the operations that we discussed in Basic Operations (such as simplifying, expanding, substituting, etc.) can then be applied to that equation.
Recall that \(x^2+y^2=25\) represents a circle of radius 5 centred at the origin.
> circle := x^2 + y^2 = 25;
\begin{equation*}
\displaystyle circle\, := \,{x}^{2}+{y}^{2}=25
\end{equation*}
> subs(x = 3, y = 4, circle);
\begin{equation*}
\displaystyle 25=25
\end{equation*}
Here we can see that it is possible to add or subtract a value from both sides of an equation and factor the result.
> eqn := x^4 + 1 = 2*x^2;
\begin{equation*}
\displaystyle \textit{eqn}\, := \,{x}^{4}+1=2\,{x}^{2}
\end{equation*}
> eqn - 2*x^2; factor(%);
\begin{equation*}
\displaystyle {x}^{4}-2\,{x}^{2}+1=0
\end{equation*}
\begin{equation*}
\displaystyle \left( x-1 \right) ^{2} \left( x+1 \right) ^{2}=0
\end{equation*}
