Tuesday, April 19, 2011

Balance This Equation!

Let’s balance a more difficult equation today:

clip_image002

Here’s the equations based on conservation of particles:

Carbon (C)

clip_image004

Hydrogen (H)

clip_image006

Oxygen (O)

clip_image008

From the carbon and hydrogen equations we get:

clip_image010

From the oxygen equation (with substitutions for c and d based on the carbon and hydrogen equations above) we get:

clip_image012

clip_image014

clip_image016

clip_image018

Now, let’s line them all up together:

clip_image020

We need to eliminate the numerical coefficients in the numerator. We divide everything by 4:

clip_image022

Once we are satisfied that there is no factor common to all 4 of the denominators, we accept the denominators as the solution we are interested in:

clip_image024

Verify it if you’re sceptical!

Monday, April 18, 2011

Balancing Chemical Equations

Consider the following unbalanced chemical equation:
clip_image002[7]
We need to determine formula constants that will make the number of atoms of each element on both sides of the equation equal.  Right now, this equation says that there are 3+2 = 5 atoms of H on the left and 2 atoms of H on the right.  Just suppose that each atom was a part to a machine.  So, you disassemble H3PO4 and you get 3 H, 1 P and 4 O. From Ca(OH)2 you get 1 Ca, 2 O, and 2 H. We’re going to use these parts to make the stuff on the right. First, let’s make a parts list:

PartQuantity
Hydrogen (H)5
Phosphorus (P)3
Oxygen (O)6
Calcium (Ca)1

Looking at my list, I see I can make a whole bunch of H2O, but not any Ca3(PO4)2 – because I need at least another 2 Ca. At this point, we could do a bunch of trial and error until we finally get exactly the right number of parts to make the stuff on the right side of the equation without any parts left over. However, trial and error doesn’t generalize to hard problems very well, isn’t the easiest thing to program, and generally is not the best way. (It works great for simple cases though.)
Let’s rewrite the equation and introduce some variables (a, b, c, d) to indicate our unknowns:
clip_image012
Now, let’s make a parts list of a different sort than above – being sure to put our algebra caps on first:

PartLeft Side QuantityRight Side Quantity
Hydrogen (H)clip_image014clip_image016
Phosphorus (P)clip_image018clip_image020
Oxygen (O)clip_image022clip_image024
Calcium (Ca)clip_image026clip_image028

In order for this production to work properly we need the Left Side Quantities to be equal to the corresponding Ride Side Quantities. Now, that will give us 4 equations and 4 unknowns, so you’d think that we could solve it, but there is a snafu:  there are an infinite number of solutions and all zeros is one of those solutions.  First let’s write the equations:
clip_image002[9]
clip_image004[5]
clip_image006[4]
clip_image008[4]
From the second and fourth equation we can see that
clip_image002[11]

Using the first equation and making substitutions for a and b we see that
clip_image002[13]
clip_image004[7]
clip_image006[6]
clip_image008[6]
clip_image010[4]
clip_image012[5]
Let’s rewrite what we’ve found, but in a different order:
clip_image002[15]
The numbers in the denominators are the formula numbers we want.  That is to say, our balanced equation is:
clip_image002[19]

Note, that if we had c over something (other than one) it would still be valid – we don’t need to have c by itself.  Perhaps I’ll show another example in a later post to make this clearer.