Skip to main content

Exploring Calculus with Maple Introductory Calculus

Section 10.4 Solving a System of Equations in Multiple Variables

We can also solve a system of equations by placing the various equations in a list (by using curly brackets) inside the solve() command.
> eq1 := x - y = 2;
\begin{equation*} \displaystyle eq1\, := \,x-y=2 \end{equation*}
> eq2 := y = x^2 - 4;
\begin{equation*} \displaystyle eq2\, := \,y={x}^{2}-4 \end{equation*}
> solve( {eq1, eq2}, {x, y});
\begin{equation*} \displaystyle \left\{ x=2,y=0 \right\} ,\, \left\{ x=-1,y=-3 \right\} \end{equation*}

Example 10.2. Finding the Intersection of Two Functions (Continued).

Using a system of equations, we can complete the example from Exampleย 10.1 with either a single solve() or fsolve() command.
> solve( {y = x*ln(x), y = sin(x)}, {x,y} );
\begin{equation*} \begin{array}{l} \left\{ x=RootOf \left( \_Z\,\ln \left( \_Z \right) -\sin \left( \_Z \right) \right) ,\right.\\ \left. y=\sin \left( RootOf \left( \_Z\,\ln \left( \_Z \right)-\sin \left( \_Z \right) \right) \right) \right\} \end{array} \end{equation*}
Once again, we may find that fsolve() provides a more useful output.
> fsolve( {y = x*ln(x), y = sin(x)}, {x,y} );
\begin{equation*} \displaystyle \left\{ x= 1.752677281,y= 0.9835052061 \right\} \end{equation*}