kill(all);

Titration : Polyprotic Acids (H(2)A) with strong Base (NaOH)
(peter.vlasschaert@gmail.com,23/09/2016)
[H(+)] =(H(+))'from H(2)A'+(H(+))'from aq'-(H(+))'reacted base'

M = molarity of base in the buret
x = volume of base added from the buret
v = initial volume of H(2)A,before added NaOH
V + x = volume at any time in the vessel
cA0   = initial analytical concentration , x=0 ( CA=CA0*(v/(v+x)) )
CB    = M *(x/(v+x))

charge balance :[H(+)]=[HA(-)]+2[A(2-)]+[OH(-)]'aq'-[OH(-)]'base,buret = CB'
rem : [OH(-)] 'aq' = kw/[H(+)]

CB = alpha(1)*CA + 2*alpha(2)*CA + kw/[H(+)] - [H(+)]

p1:M*(x/(v+x))=alpha(1)*cA0*(v/(v+x))+2*alpha(2)*cA0*(v/(v+x))+kw/h-h;

p2:lhs(p1)-rhs(p1)=0;

p3:factor(lhs(p2))=0;

p4:solve(lhs(p3),x);

p5:part(p4,1);

p6:num(rhs(p5));

p7:denom(rhs(p5));