The calculation of formation curves of metal complexes from pH titration curves in mixed solvents