# 15.4: Using Equilibrium Constants in Calculations


## Overview

In the last section we used the initial concentrations and the equilibrium concentration of one species to calculate the equilibrium constant. In this section we use the equilibrium constant to calculate the equilibrium concentration of all species. If K is a very large number, we have a product favored reaction and we do not need to do an equilibrium calculation, we simply base the theoretical yield on the complete consumption of the limiting reagent. But if K is a small number, or if you mixed "products" instead of "reactants", the reaction may not go to completion in the general Chemistry 1 sense, and you need to do an equilibrium calulation to calculate the final reactant and product.

• If the reaction proceeds as written (forming products and consuming reactants) the extent of reaction (x) is positive.
• If the reverse reaction procees (forming reactants and consuming products) the extent of reaction (x) is negative.

The overall strategy for these problems is to set up an RICE diagram and solve for x, the extent of reaction. Once you know x, you can calculate the equilibrium (final) concentration of each chemical species. This process is similiar to that in the last section (15-3), but you are now using the equilibrium constant expression to solve for the extent of reaction and not K, and then you use that value to calculate the equilbrium concentration of each species.

## Generic RICE Diagram

For the generic reaction

$aA +bB \rightleftharpoons cC + dD$

the RICE diagram is:

Reactants aA + bB cC dD
Initial [A]Initial [B]Initial [C]Initial [D]Initial
Change -ax -bx +cx +dx
Equilibrium [A]Eq [B]Eq [C]Eq [D]Eq

noting that:

$\left [ A\right ]_{Eq}=\left [ A\right ]_{Initial}-ax \\ \left [B\right ]_{Eq}=\left [ B\right ]_{Initial}-bx \\ \left [ C\right ]_{Eq}=\left [C\right ]_{Initial}+cx \\ \left [D\right ]_{Eq}=\left [D\right ]_{Initial}+dx \label{15.4.3}$

We know the equilbrium constant is:

$K=\frac{\left [C\right ]_{eq}^{c}\left [D\right ]_{eq}^{d}}{\left [A\right ]_{eq}^{a}\left [B\right ]_{eq}^{b}}$

substituting the above relationship into eq. \ref{15.4.3} gives us a single equation with just one unknown, x, which means we can algebraically solve for x.

$K=\frac{\left ( \left [C\right ]_{Initial}+cx \right )^{c}\left ( \left [D\right ]_{Initial}+dx \right )^d }{\left ( \left [A\right ]_{Initial}-ax \right )^{a}\left ( \left [B\right ]_{Initial}-bx \right )^b} \label{15-4.4}$

## Solving Equilibrium Problems

Lets take a closer look at eq \ref{15-4.4} and solve for x, first we realize this is a polynomial equation where the degree (maximum power of x) is determined by the sum of the stoichiometric coefficients of either the numerator (products) or denominator (reactants), depending on which is larger.

$a_nx^n + ... + a_2x^2 + a_1x + a_0$

This will make sense as you work through the problems, but the bottom line is these can become very complicated to solve and in this class we are going to look at several simple cases that are easy to solve.

Quadratic equations are polynomial equations of degree 2.

$ax^2 + bx + c = 0$

These occur for the following types of reactions (note, the highest sum of stoichiometric coefficients on either the reactant or product side is 2, and so the polynomial is quadratic)

\begin{align}A +B \nonumber & \rightleftharpoons C + D \\ A +B \nonumber & \rightleftharpoons C \\ 2A \nonumber & \rightleftharpoons C + D \\ A \nonumber & \rightleftharpoons C + D \end{align}

There will be two approaches we can use, the quadratic formula, and complete the square.

From algebra there are two roots to the quadratic equation, $$ax^2 + bx + c = 0$$ that can be determined from the quadratic formula.
$x= \dfrac{−b \pm \sqrt{b^2−4ac}}{2a}$

These two roots occur because there are two solutions to a square root. One of the answers will make no sense, typically giving a negative concentration for one species, meaning you consumed more of it than you have, which is impossible.

Note, if your reaction is product loaded, that is, you start with more products than you would have at equilibrium, the correct solution would be the one that has a negative x, if you set up the RICE diagram so that reactants are consumed and products are produced, that is, you are consuming the things on the right side of the equation, not producing them.

Consider the following problem: Calculate the equilibrium concentration of all species if 1 mol of COCl2 is placed in a 10 L container and undergoes the following reaction.

Problem $$\PageIndex{1}$$: $CO(g) + Cl_2(g) \rightleftharpoons COCl_2$In the following video this problem is solved, and it was noted that the COCl2 must be a reactant and so the equation was written backwards and the reciprocal of K was used.

Video $$\PageIndex{1}$$: Solution for Problem$$\PageIndex{1}$$, with the equation rewritten so the COCl2 is a reactant. Note how the extent of reaction (x) is a positive number.

After watching the above video, you should try and solve it as written in equation 15-4.9, that is, while treating COCl2 as a product, even though it is obviously a reactant. In this case, the solution that makes sense will have a negative value for x, the extent of reaction. This has been done with the following

Video $$\PageIndex{2}$$: Solution for Problem$$\PageIndex{1}$$, with the equation written with the COCl2 as product, even though it is obviously a reactant. Note how the extent of reaction (x) is a negative number

In the above two videos we knew the COCl2 was a product because there was no CO or Cl2 and therefor they could not be reactants, and thus the system had to be product loaded (as written n eq. 15-4.9). As K = 26.7 we know that at equilibrium there can be substantial amounts of both products and reactants coexisting at equilibrium, and if we had mixed similar quantities of all three species we would not have known ahead of time if the reaction would go to the right (reactant loaded - forming products), or to the left (product loaded - forming reactants). So in solving these problems you need to be prepared to check both roots of the square root term in the quadratic formula. Since your calculator gives the positive root, it is probably best to use that one first, and then if the answer makes no sense, go back and recalculate, using the other root.

#### Complete the Square

If two reactants create two products, and the species mixed are in stoichiometric proportions, you can simplify the problem where the equilibrium constant equals a single expression to the power of two.

$K=(expression\; of\; x)^2$

This is a much easier mathematical problem to solve than the quadratic equation, as you simply take the square of both sides and then algebraically solve for x. The technique works if you start with just reactants, or just products, or a mixture of the two, as long as they are in stoichiometric proportions.

Consider the following reaction

$H_2(g) + Br_2(g) \leftrightharpoons 2HBr(g)$

There are three types of problems we can use complete the square and avoid using the quadratic formula

1. Mix equal amounts of bromine and hydrogen
2. Mix any amount of hydrogen bromide gas
3. Mix equal amounts of bromine and hydrogen, along with any amount of hydrogen bromide gas.

(Note: from general chemistry1, HBr(aq) is hydrobromic acid, but HBr(g) is hydrogen bromide (gas).

Problem $$\PageIndex{1}$$: Calculate the equilibrium concentration of all species if the initial concentrations of hydrogen and bromide react 0.6 M and that of HBr is 1.25M and K = 50 for the reaction as written in equation 15-4.10.

$K=\frac{\left [HBr\right ]_{eq}^{2}}{\left [H_2\right ]_{eq}\left [Br_2\right ]_{eq}}= \frac{\left ( \left [HBr\right ]_{Initial}+2x \right )^{2}}{\left ( \left [H_2\right ]_{Initial}-x \right) \left ( \left [Br_2\right ]_{Initial}-x \right)}$

since $$H_2=Br_2$$, everything in the right becomes a single expression, as can be seen by substituting in actual values.

$K= \frac{\left ( \left [1.25\right ]_{Initial}+2x \right )^{2}}{\left ( \left [0.6\right ]_{Initial}-x \right )^2}=\left ( \frac{\left ( \left [1.25\right ]_{Initial}+2x \right )}{\left ( \left [0.6\right ]_{Initial}-x \right )}\right )^2$

Now you simply take the square root of both sides:\

$\sqrt{K}= \frac{\left [1.25\right ]_{Initial}+2x }{ \left [0.6\right ]_{Initial}-x }$

Video 15-4.3 shows how to solve this problem

Video $$\PageIndex{3}$$: Solution to a complete the square problem$$\PageIndex{1}$$:

#### Complete the Cube (or higher degree polynomials)

If n reactants create n products, and the species mixed are in stoichiometric proportions, you can simplify the problem where the equilibrium constant equals a single expression to the power of n.
$K=(expression\; of\; x)^n$

Lets consider a problem where three reactants form three products and they were mixed in stoichiometric proportions. This results in a cubic equation, and we will solve by completing the cube.s.

Consider the following reaction

$Cl_2(g) + 2HBr(g) \leftrightharpoons Br_2(g) + 2HCl(g)$

Problem $$\PageIndex{2}$$: Calculate the equilibrium concentration of all species if the initial concentrations of chlorine if 2.00 moles of chlorine and 4.00 moles of hydrogen bromide are added to a 10.0 liter container and K = 15.

Since we start with no products we know this is a reactant loaded system and will proceed to the right, meaning the extent of reaction will be a positive number. We also know that since K = 15, which is greater than 0.001 and less than 1,000, that there will be substantial amounts of reactants and products coexisitng at equlibrium, and so we have an equilibrium problem. That is for example, if K = 1015 we could treat this as a general chemistry 1 problem and say the amount of product produced is based on the complete consumption of the limiting reagent, and if K = 1015 we could say that no reaction occurs.

$K=\frac{\left [ Br_2 \right ]\left [HCl\right ]_{eq}^{2}}{\left [Cl_2\right ]_{eq}\left [HBr\right ]^2_{eq}}= \frac{\left ( \left [ Br_2 \right ]+x \right )\left ( \left [HCl\right ]_{Initial}+2x \right )^{2}}{\left ( \left [Cl_2\right ]_{Initial}-x \right) \left ( \left [HBr\right ]_{Initial}-2x \right)^2}$

substituting the initial concentrations:

$K= \frac{\left ( \left [ 0 \right ]+x \right )\left ( \left [0\right ]+2x \right )^{2}}{\left ( \left [0.200\right ]-x \right) \left ( \left [0.400\right ]-2x \right)^2}= \frac{\left ( x \right )\left (2x \right )^{2}}{\left ( \left [0.200\right ]-x \right) \left ( \left [0.400\right ]-2x \right)^2}$

Bringing the right hand side to a common power

$K= \frac{x^3}{\left ( \left [0.200\right ]-x \right)^3}=\left ( \frac{x}{0.200-x} \right )^3$

Now you simply take the cube root of both sides, and then solve for x:

$\sqrt[3]{K}=\frac{x}{0.200-x}$

Please watch the following YouTube if you need help solving this problem

Video $$\PageIndex{4}$$:

#### Method of Successive Approximations

Lets look at the RICE diagram again for the generic reaction $aA + bB \leftrightharpoons cC +dD$

Table $$\PageIndex{2}$$: Generic RICE Diagram
Reactants aA + bB cC dD
Initial [A]Initial [B]Initial   [C]Initial [D]Initial
Change -ax -bx   +cx +dx
Equilibrium [A]Eq [B]Eq   [C]Eq [D]Eq

noting that:

$\left [ A\right ]_{Eq}=\left [ A\right ]_{Initial}-ax \\ \left [B\right ]_{Eq}=\left [ B\right ]_{Initial}-bx \\ \left [ C\right ]_{Eq}=\left [C\right ]_{Initial}+cx \\ \left [D\right ]_{Eq}=\left [D\right ]_{Initial}+dx \label{15.3.3}$

where,

x=extent of reaction

and

$K=\frac{\left [C\right ]_{eq}^{c}\left [D\right ]_{eq}^{d}}{\left [A\right ]_{eq}^{a}\left [B\right ]_{eq}^{b}}=\frac{\left ( [C]_i-cx \right )^c\left ( [D]_i-dx \right )^d}{\left ( [A]_i-ax \right )^a\left ( [B]_i-bx \right )^b}$

In the method of successive approximations you make an intelligent estimate of what x would be, plug it into the above equation and calculate the value.

Python Script $$\PageIndex{1}$$

The following python script was developed by Elena Lisitsyna and Bob Belford and can be activated by clicking  which allows you to input the chemical identities, stoichiometric coefficients, initial concentrations and an equilibrium constant for the above equation.  You can then iteratively input different extent of reactions until the value of x gives the equilibrium constant you want.  Once you are happy with the K based on your extent of reaction you can input what you think are the equilibrium concentrations and the program will compare those values to the values based on the K you choose to use.

If there is only one reactant or product you can name the second nothing, give it a concentration of 1 and a coefficient of zero. Any comments can be sent to Bob Belford, rebelford@ualr.edu

To start the program click "Run" and it may take a little time to load the kernal the first time, but once loaded it is fast.

#Start
import math

def checkStr(a):
while a.isnumeric() == True:
a = input("Please type the full name or formula. Input the name: ")
return a

def checkInt(a):
try:
val = int(a)
except ValueError:
a = input("Has to be a positive number. Please input a different value: ")
return int(a)

def checkFloat(a):
try:
val = float(a)
except ValueError:
a = input("Has to be a positive number. Please input a different value: ")
return float(a)

def getReaction():
#Get coefficients and names
global reactName1, reactName2, prodName1, prodName2, reactCoef1, reactCoef2, prodCoef1, prodCoef2

a = input("Input the name of reactant # 1: ")
reactName1 = checkStr(a)

a = input("Input the coefficient of {}: ".format(reactName1))
reactCoef1 = checkInt(a)

a = input("Input the name of reactant # 2: ")
reactName2 = checkStr(a)

a = input("Input the coefficient of {}: ".format(reactName2))
reactCoef2 = checkInt(a)

a = input("Input the name of product # 1: ")
prodName1 = checkStr(a)

a = input("Input the coefficient of {}: ".format(prodName1))
prodCoef1 = checkInt(a)

a = input("Input the name of product # 2: ")
prodName2 = checkStr(a)

a = input("Input the coefficient of {}: ".format(prodName2))
prodCoef2 = checkInt(a)

#Output the reaction
print(" ")
print ("Check the reaction:")
print(reactCoef1, reactName1, "+", reactCoef2, reactName2, "\u21CC", prodCoef1, prodName1, "+", prodCoef2, prodName2)

print(" ")
print("Type 1 to continue to the next step")
print("Type 2 to input the values again")
while True:
proceed = input ("Type '1' or '2': ")
if proceed == "1":
print (" ")
getConc()
break
elif proceed == "2":
print (" ")
getReaction()
break
else:
print (" ")
print ("'1' and '2' are the only acceptable inputs for this step.")

def getConc():
#get concentrations of all reactants and products
global reactConc1, reactConc2, prodConc1, prodConc2

a = (input("Input the initial concentration of {} in units of M: ".format(reactName1)))
reactConc1 = checkFloat(a)

a = (input("Input the initial concentration of {} in units of M: ".format(reactName2)))
reactConc2 = checkFloat(a)

a = (input("Input the initial concentration of {} in units of M: ".format(prodName1)))
prodConc1 = checkFloat(a)

a = (input("Input the initial concentration of {} in units of M: ".format(prodName2)))
prodConc2 = checkFloat(a)

#check for no reaction
if reactConc1*reactConc2 == 0 and prodConc1*prodConc2 == 0:
print ("No reaction. Try again.")
getConc()

def getK():
global guessX, concGuessR1, concGuessR2, concGuessP1, concGuessP2

a = float (input("Input your estimated extent of reaction: "))
guessX = checkFloat(a)
concGuessR1 = float(reactConc1 - (reactCoef1*guessX))
concGuessR2 = float(reactConc2 - (reactCoef2*guessX))
concGuessP1 = float(prodConc1 + (prodCoef1*guessX))
concGuessP2 = float(prodConc2 + (prodCoef2*guessX))
#check for division by 0
if concGuessR1 != 0 and concGuessR2!=0:
calcK = float(((concGuessP1**prodCoef1)*(concGuessP2**prodCoef2))/((concGuessR1**reactCoef1)*(concGuessR2**reactCoef2)))
else:
print (" ")
print ("Unable to calculate K (division by 0). Try again.")
getK()
#check if calculated K is a negative number
if calcK<0:
print ("Your estimated extent of reaction requires you to consume more of a species than is present, and so is not logical.")
getK()
else:
#compare K
print ("K_real = ", realK)
print ("K_calculated = ", calcK)
compareK = (math.log10(calcK))-(math.log10(realK))
#print (compareK)
if compareK < 0:
compareK = int(compareK*(-1)) #remove negative sign, round to the nearest whole number
#print (compareK)
print ("Your calculated K is apriximatelly {} orders of magnitude smaller than K_real".format(compareK))
elif compareK > 0:
compareK = int(compareK)
print ("Your calculated K is apriximatelly {} orders of magnitude larger than K_real".format(compareK))
else:
print ("Good job! Your calculated K is equal to K_real")

print (" ")
print ("Type 1 to input the estimated extent of reaction again")
print ("Type 2 to continue to the next step")
while True:
proceed = input ("Type '1' or '2': ")
if proceed == "1":
print (" ")
getK()
break
elif proceed == "2":
print (" ")
print ("--- STEP 3 ---")
print ("Your estimated extent of reaction is {}".format(guessX))
print ("Your value of K is {}".format(calcK))
print ("Calculate equlibrium concentrations of all reactants and products")
getEqConc()
break

else:
print (" ")
print ("'1' and '2' are the only acceptable inputs for this step.")

def getEqConc():
#asking for eq.conc calculated by student
reactEqConc1 = input ("Input the equilibrium concentration of {} in units of M: ".format(reactName1))
reactEqConc2 = input ("Input the equilibrium concentration of {} in units of M: ".format(reactName2))
prodEqConc1 = input ("Input the equilibrium concentration of {} in units of M: ".format(prodName1))
prodEqConc2 = input ("Input the equilibrium concentration of {} in units of M: ".format(prodName2))
#printing student calculated values and python calculated values
print (" ")
print ("Your value of the equilibrium concentration of {} is {}M".format(reactName1, reactEqConc1))
print ("Based on your calculated K, the equilibrium concentration of {} should be {}M".format(reactName1, concGuessR1))
print (" ")
print ("Your value of the equilibrium concentration of {} is {}M".format(reactName2, reactEqConc2))
print ("Based on your calculated K, the equilibrium concentration of {} should be {}M".format(reactName2, concGuessR2))
print (" ")
print ("Your value of the equilibrium concentration of {} is {}M".format(prodName1, prodEqConc1))
print ("Based on your calculated K, the equilibrium concentration of {} should be {}M".format(prodName1, concGuessP1))
print (" ")
print ("Your value of the equilibrium concentration of {} is {}M".format(prodName2, prodEqConc2))
print ("Based on your calculated K, the equilibrium concentration of {} should be {}M".format(prodName2, concGuessP2))

print ("--- STEP 1 ---")
getReaction()

print (" ")
print ("--- STEP 2 ---")
realK = float (input("Input K_real: "))
getK()
print (" ")
print ("Click 'restart & run all' to start over")

#End


Hello world!

## Test Yourself

Homework

Robert E. Belford (University of Arkansas Little Rock; Department of Chemistry). The breadth, depth and veracity of this work is the responsibility of Robert E. Belford, rebelford@ualr.edu. You should contact him if you have any concerns. This material has both original contributions, and content built upon prior contributions of the LibreTexts Community and other resources, including but not limited to:

This page titled 15.4: Using Equilibrium Constants in Calculations is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Robert Belford.