Diprotic acid is the one, which is capable of giving 2 protons per molecule in water. Let us take a weak diprotic acid (H2A) in water whose concentration is c M. In an aqueous solution, following equilbria exist.
If α1 = degree of ionization of H2A in presence of HA–
Ka1 = first ionisation constant of H2A
α2 = degree of ionisation of HA– in presence of H2A
Ka2 = second ionisation constant of H2A
I step:

II step

Knowing the values of Ka1 , Ka2 and c, the values of α1 and α2 can be calculated using equations (i) and (ii) After getting the values of α1 and α2, [H3O+ ] can be calculated as

Finally, for calculation of pH
If the total [H3O+] < 10–6 M, the contribution of H3O+ from water should be added.
If the total [H3O+] > 10–6 M, then [H3O+] contribution from water can be ignored. Using this [H3O+], pH of the solution can be calculated.
Approximation :
For diprotic acids, Ka2 << Ka1 and α2 would be even smaller than α1.

Thus, equation (i) can be reduced to

This is expression similar to the expression for a weak monoprotic acid.
Hence, for a diprotic acid (or a polyprotic acid) the [H3O+] can be calculated from its first equilibrium constant expression alone provided Ka2 << Ka1