chembal

-------



This program uses matrices to balance chemical equations. For example:

Zn + HCl --> ZnCl2 + H2



This program will tell you to put a 2 in front of the HCl, balancing the

equation. For instructions, read on.



The first thing you do is input the number of compounds in the full equation.

In the above equation, there are 4 (2 on the right, 2 on the left). Next, you

input the number of compounds on the right side of the equation. There are 2.



Now you will have to plug in the number of moles of each element into the

calculator, but first you have to label each element. Lets call Zinc (Zn),

Hydrogen (H), and Chlorine (Cl) elements 1, 2, and 3, respectively. The

compounds go from left to right.



You first input 1, because there is 1 mole of Zn in compound 1. You next input

0, and 1. Now watch, because we're onto element 2 now. So, you put in 0, 1, 0.

For element 3, you put in 0,1,2.



Watch out, because we're now in compound 4. Element 1=0, element 2 = 2. and

element 3=0.



On the screen it should say 2 compound 1, 4 compound 2, 2 compound 3, and 2

compound 4. These are the coefficients that you will place in front of the

corresponding compounds to balance the equation. But, at the bottom it says to

make sure to reduce. If you notice, all of the numbers are divisible by 2, and

you can reduce. This gives you a smaller number that may appeal more to your

chemistry teacher (the other answer is correct, but is not in reduced terms).

All you have to do is write down the proper coefficients.



You're answer should now look like this, in reduced form:

Zn + 2HCl  -->  ZnCl2 + H2



***NOTE*** You have to make sure that one of the elements that you input is in

the last compound, or else incorrect results will appear. This equation has no

problem with that, but some equations do. I would test this program out on

some equations already balanced so you get the hang of it.



Thank you.



ClrHome

ClrDraw

AxesOff

Text(1,17,"BALANCES CHEMICAL"

Text(7,1,"EQUATIONS USING [A],[B],[C]"

Line(?10,5.4,10,5.4

Text(15,0,"MAKE SURE THAT ELEMENTS IN

Text(21,0,"THE LAST COMPOUND ARE USED

Text(27,0,"IN THE FIRST COMPOUND(S)"

Text(33,0,"COMPOUNDS GO FROM L TO R"

Text(41,0,"KEEP TRACK OF ELEMENT NUMB."

Text(47,0,"IF PROBLEM OCCURS USE DIF.

Text(53,0,"ELEMENTS"

Text(56,39,"BY: JEFF FREEMAN"

Pause

Disp "HOW MANY

Input "COMPOUNDS? ",Q

Disp "","ON THE RIGHT"

Input "SIDE? ",R

Q-1?M

{M,M}?dim([A]

{M,1}?dim([B]

{M,1}?dim([C]

For(A,1,M,1)

For(B,1,M,1)

ClrHome

Disp "NUMBER OF","ELEMENT",A,"IN COMPOUND",B

Input E

If B>Q-R

?E?E

E?[A](A,B)

End

End

For(C,1,M,1)

ClrHome

Disp "NUMBER OF","ELEMENT",C,"IN COMPOUND",M+1

Input F

F?[B](C,1)

End

1?J

(det([A])[A]?[B])?[C]

ClrDraw

For(D,1,M,1)

[C](D,1)?H

Text(J,1,abs(H)," OF COMPOUND ",D

J+8?J

If J>49:Then

Pause

ClrDraw

1?J

End

End

Text(J,1,abs(det([A]))," OF COMPOUND ",D

Text(56,1,"MAKE SURE TO REDUCE"

Pause

ClrDraw

AxesOn

ClrHome

