How to write chemical formulas and chemical equation in Maxima. (version 1.0)
peter.vlasschaert@gmail.com,09/10/2017

kill(all)$
p1:H$
p2:2$
p3:SO$
p4:4$
f1:[p1,p2,p3,p4];
a1:subvar(p1,p2);
a2:subvar(p3,p4);
q1:a1*a2;

1e) write equation : H2SO4+NaOH  = Na2SO4+H20

p5:Na$
p6:OH$
p7:Na$
p8:2$
p9:H$
p10:2$
p11:O$

a3:subvar(p5,"")$
a3a:subvar(p6,"")$
a4:subvar(p7,p8)$
a5:subvar(p9,p10)$
a6:subvar(p11,"")$

q2:a1*a2+a3*a3a = a4*a2+a5*a6;

output  : 1e)

2e)write equation : Mn04(-) + H(+) + 5*e(-) = Mn(2+) + H20

p12:MnO4$
p14:H$
p15:Mn$

a7:subvar(p12,"")$
a8:a7^"-"$
a9:subvar(p14,"")$
a10:a9^"+"$
a11:subvar(p15,"")$
a12:a11^"2+"$

output  : 2e)

q3:a8+a10 + 5*e^"-" =  a5*a6+a12$
q4:q3;

output products are equations

q1;
q2;
q3;