general formula,salt from strong base(p) and strong acid(q).
peter.vlasschaert@gmail.com,28/09/2016

salt : M(p)A(q),p=q=1 , M = metal anion,A = non metal kation
       M(1)A(1)=Na(1)Cl(1) => pH =7
       M(p)A(q) -> p*M(x+)+q*A(y-) -> p*(x+)+q*(y-) = 0
       M(p)A(q) -> strong base(p) + strong acid(q)

p1: p*cb+h = q*ca + kw/h;

p2 : ev(lhs(p1)-rhs(p1)=0,ca=c,cb=c);

p3:(-1)*factor(p2);

p4:-1*(num(lhs(p3)))=0;

first approximation:salt(strong base(p)+strong acid(q))

p5:factor(lhs(p4))=0;

p6:part(p5,1,1)=0;

first approximation ( kw = 0),p ? q ?

p7:ev(p6,kw=0);

p8:factor(p7);

p9:part(lhs(p8),2)=0;

p10:solve(p9,h);

p11:factorsum(part(p10,1));

pH = -log(c*(q-p))
if p<>q then pH = -log(c*(p-q)) else pH=7,see above example NaCl