Mathematica
Tutor
Part 9:
Solving systems of linear equations
- How hard is it to
solve linear equations? First, make sure the variables x,
y, and z are unassigned:
x=.
y=.
z=.
Then enter
{x+4*y+3*z==10, 2*x+y-z==-1, 3*x-y+z==11}
and
Solve[%]
Impressed?
- You don't have to
trust Mathematica's calculations any more than you would
trust your own. Assign the answers to the variables (you can edit
the unassign lines in Step 1), and re-enter the line that defines
the equations. Satisfied?
- Unassign your
variables again, and ask Mathematica to solve
2x + 3y
- 7z + w = 8
|
4x - 2y
+ z + 2w = 4
|
5x + y
- 4z + 3w = 6
|
(Don't forget to use double equals signs!)
- What do you think
about the solutions in Step 3? What do they mean? Did you get a
warning message? What do you think that meant? Copy your input
line that defines the equations to a new line, and enter it again
-- so it becomes the "last result" again. Then enter
Solve[%, {x,y,z}]
How does the second set of solutions compare to the first? How
could you check that the two sets of solutions are equivalent? Do
it.