I'm given these equations:
HA=CHA-A-
H+=OH-+A-
OH-=Kw/H+
Ka=H+*A-/HA
Using rearrangements of the first three substituted into the last one, I'm supposed to derive 0= H+3+KaH+^2-(Kw+KaCHA)*H+-Kw*Ka.
My final Ka= H+*(H+-(Kw/H+))/(CHA-(H+-(Kw/H+))
This leads to KaCHA-KaKw/H+-KaH+-H+^2+Kw=0,not the cubic. Where am I going wrong in my algebra?