Algebraic equations

In order to solve some equations, we need to make an equation.  This might seem simple.

x+ y = 2
x-y=4.

However in Mathematica we do not do this with just an equal sign.  An equal sign in Mathematica means the thing on the left is replaced by the thing on the right -- when ever you type the thing on the left.  

For example

[Graphics:../Images/mma_primer_gr_88.gif]
[Graphics:../Images/mma_primer_gr_89.gif]
[Graphics:../Images/mma_primer_gr_90.gif]
[Graphics:../Images/mma_primer_gr_91.gif]
[Graphics:../Images/mma_primer_gr_92.gif]
[Graphics:../Images/mma_primer_gr_93.gif]
[Graphics:../Images/mma_primer_gr_94.gif]
[Graphics:../Images/mma_primer_gr_95.gif]

Since we might use the symbol b elsewhere here or in another open Mathematica notebook, I need to unassign the value of 6 to b.  

[Graphics:../Images/mma_primer_gr_96.gif]
[Graphics:../Images/mma_primer_gr_97.gif]
[Graphics:../Images/mma_primer_gr_98.gif]

To make equations, use ==.

[Graphics:../Images/mma_primer_gr_99.gif]
[Graphics:../Images/mma_primer_gr_100.gif]
[Graphics:../Images/mma_primer_gr_101.gif]
[Graphics:../Images/mma_primer_gr_102.gif]
[Graphics:../Images/mma_primer_gr_103.gif]
[Graphics:../Images/mma_primer_gr_104.gif]
[Graphics:../Images/mma_primer_gr_105.gif]
[Graphics:../Images/mma_primer_gr_106.gif]

Now how can we solve these?

[Graphics:../Images/mma_primer_gr_107.gif]
[Graphics:../Images/mma_primer_gr_108.gif]

Solve is fairly powerful

Or even:

Or a little harder problem:


Converted by Mathematica      August 20, 2000