April 20, 2024, 07:51:11 AM
Forum Rules: Read This Before Posting


Topic: Manually calculate pH of up to four mixed weak bases/acids  (Read 2458 times)

0 Members and 1 Guest are viewing this topic.

Offline agBr

  • Regular Member
  • ***
  • Posts: 10
  • Mole Snacks: +0/-0
Manually calculate pH of up to four mixed weak bases/acids
« on: September 01, 2018, 12:09:42 PM »
Hello everyone.

I'm not really a Chemistry student, but an Engineer, so I hope this is the right subforum for this question.

I need to find the pH of a mix of weak bases and acids.
This is easy to do using online calculators, but I'd rather do it manually, and understand the process. I like Chemistry, by the way.

I know how to get the pH for a single weak acid or base using the ICE table, and solving the second order equation, and I know what a buffer is, and I hope, the basics of pH theory.

I get trouble when disolving several substances in aqueous solution.
Example:

Sodium carbonate. pkb 3.67.
Ascorbic acid. pka1 4.10.

Let's disolve the carbonate first.
Using the online calculator I get
pH = 12,014338986003
Manually, I get 12,01 too.
(I can also find the pH of the acid on its own, of course)

Next, once the carbonate is disolved, let's add the ascorbic acid (considering only the first dissociation constant pka1 as a first approximation).
Using the online calculator I get
pH = 10,993262084327

But I just don't know how to get to this value, no matter how I tried. And I tried for many hours before posting. I also spent several days studing pH theory (including chembuddy.com), watching videos, doing exercises,... but I haven't found a single exercise like this. A lot of weak vs strong, but not weak/weak.

What puzzles me is that the online calculator works for at least four different substances, with just dissociation constants and molarity as inputs.
I'd like to know how to do it on my own. Any help is MUCH appreciated. Thanks in advance.

Offline Borek

  • Mr. pH
  • Administrator
  • Deity Member
  • *
  • Posts: 27652
  • Mole Snacks: +1800/-410
  • Gender: Male
  • I am known to be occasionally wrong.
    • Chembuddy
Re: Manually calculate pH of up to four mixed weak bases/acids
« Reply #1 on: September 01, 2018, 01:54:44 PM »
Just write all equations describing present equilibria, mass and charge balance, and solve the system (actually that's what ChemBuddy lectures say about the general case, and all specific cases mentioned there start with the same approach).
ChemBuddy chemical calculators - stoichiometry, pH, concentration, buffer preparation, titrations.info

Offline agBr

  • Regular Member
  • ***
  • Posts: 10
  • Mole Snacks: +0/-0
Re: Manually calculate pH of up to four mixed weak bases/acids
« Reply #2 on: September 01, 2018, 03:36:48 PM »
First of all, thank you.
Could you please give me some more hints?
I did read the general case on chembuddy:
http://www.chembuddy.com/?left=pH-calculation&right=pH-acid-base-solution
(and most of the other sections)
but I still don't know how to apply this to, for example, four substances.

I tried this formula:
http://www.chembuddy.com/?left=BATE&right=pH_calculation

successfuly, but, how about mixing a third weak acid or base?

Aslo, about this last formula: " calculates equilibrium state of mixture of acid and base ".
What if there're three weak bases, and a weak acid in the final solution?

Offline Borek

  • Mr. pH
  • Administrator
  • Deity Member
  • *
  • Posts: 27652
  • Mole Snacks: +1800/-410
  • Gender: Male
  • I am known to be occasionally wrong.
    • Chembuddy
Re: Manually calculate pH of up to four mixed weak bases/acids
« Reply #3 on: September 01, 2018, 04:59:23 PM »
Say you have n bases, B1, B2... BN, and m acids, A1, A2, ... AM, all of known concentrations CB1, CB2...

Write equations for dissociation constants KB1, KB2... and KA1, and KA2... (each equation will contain three unknowns).

Write formula for Kw.

Write mass balances for each acid and base.

Write charge balance for all ions present.

You have a system of equations that describes the equilibrium, just solve it for all uknowns. Preferably with some numerical method.

As I wrote earlier: it is exactly the same approach that each specific case at ChemBuddy lectures starts with, just the number of equilibrium equations and mass balances changes depending on the number of acids/bases present.
ChemBuddy chemical calculators - stoichiometry, pH, concentration, buffer preparation, titrations.info

Offline agBr

  • Regular Member
  • ***
  • Posts: 10
  • Mole Snacks: +0/-0
Re: Manually calculate pH of up to four mixed weak bases/acids
« Reply #4 on: September 08, 2018, 03:12:51 PM »
Thank you.
I solved manually, converting 11.13 (http://www.chembuddy.com/?left=pH-calculation&right=pH-salt-solution) to a polynomial, which requieres quite a lot of operations, and leads to a long uncomfortable-to-work-with formula.
Now I understand why nobody seems to solve this kind of problems by hand using a "simple" formula (which does not exist, except if we are able to make some assumptions).

Please, correct me if I'm missing something, but...
Why not just, instead of using Newton's method, use equation 11.13, as is, using a computer program to just test for all possible H+ until both sides of the equation are below an acceptable threshold? Maybe not as efficient, but this way we don't have to convert to polynomial.

Offline Borek

  • Mr. pH
  • Administrator
  • Deity Member
  • *
  • Posts: 27652
  • Mole Snacks: +1800/-410
  • Gender: Male
  • I am known to be occasionally wrong.
    • Chembuddy
Re: Manually calculate pH of up to four mixed weak bases/acids
« Reply #5 on: September 08, 2018, 05:49:05 PM »
I solved manually, converting 11.13 (http://www.chembuddy.com/?left=pH-calculation&right=pH-salt-solution) to a polynomial, which requieres quite a lot of operations, and leads to a long uncomfortable-to-work-with formula.

Which is why such things are best done with some kind of https://en.wikipedia.org/wiki/Computer_algebra_system

Polynomial form will speed up calculations - these days it doesn't matter much, but the original work on the equations used in BATE was done almost 40 years ago and they were used on TI-59, so making it possible to use Horner's scheme was an important factor.

Quote
Why not just, instead of using Newton's method, use equation 11.13, as is, using a computer program to just test for all possible H+ until both sides of the equation are below an acceptable threshold? Maybe not as efficient, but this way we don't have to convert to polynomial.

Sounds like you think Newton's method requires the polynomial form. It doesn't. Just rearrange equation 11.13 to LHS-RHS=0 and go from there. Actually any numerical method of finding roots will do: https://en.wikipedia.org/wiki/Root-finding_algorithm, they are all zillions times more efficient than testing all possible values.
ChemBuddy chemical calculators - stoichiometry, pH, concentration, buffer preparation, titrations.info

Sponsored Links