Exercises

Enter the commands to solve each linear system of equations.

    Use Commands

  1. Enter these equations and
    Solve the system and give the name sol1 to the solution
    Plot the two equations on the same figure.

                eq1:=2*x+3*y=2
                eq2:=3*x-4*y=9
                sol1:=solve({eq1, eq2}, {x, y})
                with(plots):
                implicitplot([eq1, eq2], x=-3..3, y=-2..2)
              
            

    Notice that the implicitplot command is required to plot equations. The statement with(plots) is required prior to using the implicitplot command. Alternatively, we could have solved each equation for y and used the plot command to plot each solution expression for y.

  2. Enter the equations and
    Solve the system and give a name to the solution
    Plot the two equations on the same graph to check solution

                eq8 := 2*x-y=5
                eq9 := x+2*y=5
                eqs89 := eq8, eq9
                sol89 := solve({eqs89}, {x, y})
                with(plots):
                implicitplot([eqs89], x=-10..10, y=-10..10, color=[red,blue])
              
            
  3. Plot and find the solution to the following system of equations

                eq5 := 3x-2y+z=4
                eq6 := x+3y+2z=5
                eq7 := 2x-2y+3z=5
                eqns := eq5, eq6, eq7
                ranges := x=-5..5, y=-5..5, z=-5..5
                with(plots):
                implicitplot3d([eqns], ranges, color=[red,green,blue],transparency=0.25)
                sol567 := solve({eqns}, {x, y, z})