Chemical Solubilities Revised with Computer Support

7.5E-9. 8.7E-5. 8.7E-5. 9.9E-8. 1.6E-7. Ba2*. 2.3E-8. 1.5E-4. 1.5E-4. 1.4E-7. 1.9E-7 .... Program 1. Screen print of an interactive session in Mathema...
2 downloads 0 Views 3MB Size
Chemical Solubilities Revised with Computer Support Saskja De Roo and Lea Vermeire Division of Statistics, K.U. Leuven Campus Kortrijk, 8-8500 Koltrijk Christiane Gbrller-Walrand Depaltment of Chemistry, Katholieke Universiteit Leuven, Celestijnenlaan 200 F, B-3001 Leuven, Belgium Exact Computation of Chemical Solubilities

A frequent problem in analytical chemistry is the computation Ion of a solubility from the set of expressions for t h e equilibrium- pb2' constauts,themass-balanceand ~ a ' + t h e charge-balance (see e.g., Skoog, West and Holler (11, pp a't 175-181,0rHarris(2),pp122E3a2+ 128). For salts from a dibasic acid this set is typically a non- SF linear six cd2+ with six unknowns. The equations are polynomial and depend ~ 9 ' ' on the equilibrium constants K,, ~ g * (solubility product), KI a n d Kz (acid dissociation constants), and on the ion exponent in the solubility product expression. Ion I n u n d e r g r a d u a t e courses much effort is devoted to the re- ~ ~ 2 duction of the system to a n approximate simplified system Pb2+ with a small number of equa- SF tions and a small number of variables, by focussing on the domi- ca2+ n a n t t e r m s in t h e equations. This search for dominant terms h a s to be done over again for every particular solubility probIon lem. The construction of the reduced system provides a deeper cd2+ understanding of t h e mathe- Pb2+ matical modelling. However, its essential step in ob- ca2+ claim as taining the as 68' direct solution with a high performance computer system is ac- ~ g " cessible, not only for professional ~ g + researchers but for undereraduate students a s well. par?, from numerical solutions. some more recent packages with a symbolic Ion calculator are able to eive exact solutions. cu2+ We report on a project on exact a n d efficient computation of cd2+ solubilitieswithMathematica (3, pb2+ 41, in a frame of interaction between the course on analytical 2n2+ chemistry and the course on corn- ~ e " puter science and statistics, for Mn2+ second-year undergraduate students in chemistry Mathematiea AS+ (like Maple, atl lab, Macsyma

Table 1. Solubilities of 1:l Salts and 2:l Salts Kl = 5.36E-2,

Oxalates:

K~P

G

[c&

K2 = 5.42E-5

OH^ [Hzc~o~][ H ~ O + I pH

[HCZO~

Solubility

4.8E-10

2.2E-5

2.2E-5

3.4E-8

1.2E-7

5.4E-14

8.4E-8

7.1

2.2E-5

2.3E-9

4.8E-5

4.8E-5

6.4E-8

1.4E-7

8.8E-14

7.3E-8

7.1

4.8E-5

7.5E-9

8.7E-5

8.7E-5

9.9E-8

1.6E-7

l.lE-13

6.2E-8

7.2

8.7E-5

2.3E-8

1.5E-4

1.5E-4

1.4E-7

1.9E-7

1.4E-13

5.1E-8

7.3

1.5E-4

5.6E-8

2.4E-4

2.4E-4

1.9E-7

2.3E-7

1.5E-13

4.3E-8

7.4

2.4E-4

9.0E-8

3.0E-4

3.0E-4

2.2E-7

2.6E-7

1.6E-13

39E-8

7.4

3.0E-4

8.6E-5

9.3E3

9.3E-3

1.3E-6

1.3E-6

1.9E-13

7.6E-9

8.1

9.3E-3

2.1E-4

1.7E-7

2.2E-7

1.5E-13

4.6E-8

7.3

2.1E-4

PH

Solubility

3.5~-ll

Sulfates:

GP

[SO$J

Kl = 100,

[HSOd

IC2 = 1.2E-2

[OH-]

[HzSO~] [H301

1.3E-10 +

l.lE-5

l.lE-5

9.5E-11

1.OE-7

9.5E-20

1.OE-7

7.0

1.1E-5

1.6E-8 3.2E-7

1.3E-4 5.7E-4

1.3E-4 5.7E-4

1.OE-9 4.6E-9

1.OE-7 1.OE-7

1.OE-18 4.5E-18

9.9E-8 9.8E-8

7.0 7.0

1.3E-4 5.7E-4

2.6E-5

5.1E-3

5.1 E-3

3.6E-8

1.2E-7

3.OE-17

8.4E-8

7.1

5.1 E-3

Carbonates: [co$J

&P

K1 = 4.45E-7,

[HCOd

IG = 4.7E-11

[OH1 lH2C031

[H30+l

PH

2.5E-14

1.6E-7

1.4E-8

1.7E4

1.8E-6

2.2E-8

5.7E-9

8.2

l.8E-6

3.3E-14

1.8E-7

1.7E-8

1.9E-6

1.9E4

2.2E-8

5.2E-9

8.3

1.9E-6

4.8E-9

6.9E-5

3.8E-5

9.OE-5

9.OE-5

2.2E-8

l.lE-10

10.0

1.3E-4

5.1 E-9

7.1 E-5

3.9E-5

9.1E-5

9.1 E-5

2.2E-8

I.lE-10

10.0

1-3E-4

1.OE-5

3.2E-3

2.8E3

7.7E-4

7.7E-4

2.2E-8

10.9

3.6E-3

6.3ES

1.2E-4

1.2E-4

2.2E-8

10.1

1.8E-4

8.1 E-12

Sulfides:

b

K?~5.7E-8,

1.3E-11 8.6E-11

K2 = 1.2E-15

[s21

[HSI

[H301

PH

Solubility

6.0E-36

2.4E-18

1BE-22

1.3E-14

1.OE-7

[OH1

2.4E-14

[HzSl

1.OE-7

7.0

3.7E-14

2.0E-28

1.4E-14

9.3E-19

7.8E-11

1.OE-7

1.4E-10

1.OE-7

7.0

2.1E-10

7.0~-28 2.6~-14 1.8E-18

1.5E-10

1.OE-7

2.5E-10

1.OE-7

7.0

4.oE-10

4.5E-24

2.1E-12

1.7E-16

l.lE-8

1.2E-7

1.6E-8

8.1E-8

7.1

2.7E-8

6.OE-18

2.4E-9

1.6E-12

3.5E-6

3.8E-6

1.6E-7

2.6E-9

8.6

3.7E-6

3.OE-13

5.5E-7

2.2E-9

1.4E-4

1.4E-4

1.7E-7

7.4E-11

10.1

1.4E-4

6.6E-23

5.5E-15

1.OE-7

9.6E-15

1.OE-7

7.0

1.5E-14

6.OE-50

Volume 72 Number 5 May 1995

419

Sulfates: K, =loo; K, =1.2E-2

Carbonates: K, =4.45E-7; K, =4.7E-11

-7

-6

-5

-3

-4

-2

Log [lo, Sqrt [Kspll Oxalates: K, =5.36E - 2; K, = 5.42E -5

-5 -5

-4

-3 Log [lo,SqNKs~ll

-2

Figure 1. Solubility of 1:l salb with KI > lo4 (sulfatesand oxalates). The plot of log Solubility versus log s f i t s a line through the origin with Slope 1, which states the relation Solubility = G. a.o., see Simon (5)for a comparison) is a versatile mathematical program that covers numerical as well a s symbolic computing and 2D-3D graphics a t a n advanced level. As such it is a powerful tool for scientists, engineers, and mathematicians. We investigated its performance to solve solubility systems. The actual Version 2.2, improving on the previous version, gives reliable results.

Figure 2. Solubility of 1:l salts with KT< lo4 (carbonates and sulfides). The plot of log Solubiiifyversus log s s t a t e s that the solubility increases by one to several orders of magnitude. Solubility of Pb2' -21 oxalate carbonate

.

K,= 100

Examples and Chemical Interpretation We calculate the solubility of four different salt types (carbonates, sulfides, oxalates, and sulfates) with equilibrium constants enumerated in Table 1. The structural equations are taken from Skoog, West and Holler (I), pp 177 and 180:

I. For the solubility of barium carbonate: [ B ~ ~ ~ ~ [ C=K, O:-I

-8 -6 -4 -2 Log [lo,Sqlt [Kspll Figure 3. The log-log graph contrasting Solubility of pb2+on G a t growing values of KI confirms the transition of a positive shin to a zero shin at f i > lo4. -14

-12

-10

The solubility is defined as: Solubility = [Ba2+l

420

Journal of Chemical Education

2. For the solubility of silver sulfide: [Agt12[~"l =K,

Program 1. Screen print of an interactive session in Mathematica for the solubility of barium carbonate (Solubility = x). In[l]:= eqns=(x*y==5.1*10"(-9). z*u-2.13*10A(-4)*y==O, x-y-z==0, 2x-2y-z-u==o1 0. Second -9 Out[l]= (xy == 5.1 10 , 4.000213 y + u z == 0, x - y - z == 0, > -u+2x-2y-z==01 In[2]:= Solvdeqnsl 0.783333 Second

1

Out[2]= [Ix+ 0.0000202486, y + 0.000251869, u + -0.000231621, > 2 + -0.0002316211. Ix + - 0.0000753189 - 0.0000646421 I.

The solubility is defined as: Solubility =$A lo4 (e.g., AgzC2O4)the solubility is given by

(Kw / 4)* as simply calculated from the equilibrium Ag2C20, = 2Agi + C,O;2. When Kl < lo4 the calculation confirms the assumptions (a) and (b) above for the carbonates and the sulfides, respectively.

Computation with Mathematica Programs in Mathematica T h e solubilities i n Table 1 can be obtained from t h e structural equations with the system Mathematica i n two ways: 1. a quick interactive program, which is erased at the end of the work session, 2. a shortpackage, available for several cases and for multiple use. The directness and ease of the interactive use is illustrated by the screen print i n Program 1. It gives the solution of the approximate solubility system from Skoog e t al. ( I ) , p 177, for barium carbonate. The equations are easily read i n the program, using the conversion code shown in Table 2. One notices t h a t Mathematica provides all complex solutions to the system, making a total of four solutions, of which only one h a s all concentrations positive.

Table 2. Code for the Unknown Concentrations as Used in Program 1 and Program 2

h, Fur prec~pitnwsof very h w solubilit): panicul~rlythose that do not wart exclunvel) with wntrr wg.. rulfidrs~, the dissolution of the ~recioitatcdors not swnrficantlv

change the hydronim. or hydroxide ion conc&trationi that remain essentially 1(r7mole/L(pH = 7). 3. Afew examples of cases that do not enter these categories of simplifying assumptions can be found in Table 1(e.g., MgCz04,FeS, MnS 1. Next for the 2:l salts, the examples a r e limited to the silver salts, and lead to t h e following considerations.

cation concentration cation concentration cation concentration cation ronrentntion

[ c o $ ~ [HCOd [s21

[HSl

[OH-]

[HzC03] [H301

[Hz?

[cn0$1 [HCzOd

[HzC2041

[HSOd

[HzS041

[SO~I

Volume 72 Number 5 May 1995

421

This real positive solution gives the unique chemically relevant solubility (XI. A package can incorporate the structural equations of both systems (1) and (2) in a single program, such as Program 2 with the conversion code in Table 2. The equilibrium constants and the ion exponent are treated as program parameters. This package provides all the solubilities shown in Table 1.The reader can easily adjust the program for variants of the solubility system.

Program 2. A package in Mathematica for the solution of the sys:ems (1) and (2) for general parameters Ksp,Kl and Kz used for all the cases in Table 1. Clear[ksp,kl,k2,xl,x2,i,eqns,sol,solx,soly,soIz,solu,solv,solwk ksp=Input["Givethe value of Ksp as a Mathematica-expression:"l; kl=Input["Givethe value of K1 as a Mathematica-expression:"]; xl=lOA(-14)kl; kZ=Input["Givethe value of K2 as a Mathematiea-expression:"l; x2=10A(-14)ikZ; i=Input["Givethe exponent in the equilibrium equation:"]; eqns=l(xAi)*y==ksp, z*u==x2*y, v*u==x1*z, w*u==lOA(-14), (lli)*x==y+z+v, (I/i)*2*x+w==2*y+z+ul;

Advantages of the Use of Mathematica An exact calculation of the solubility is obtained. The computation goes very fast. For one solubility the computing time is a matter of seconds. Mathematica is a versatile mathematical system, which covers symbolic and numerical computations a s well a s advanced graphics. The computed solubilities can be plotted in graphs within the active system. The system is very user friendly. Students without experience in programming learn basics on Mathematica and make the solubility application in one or two class sessions. An effkient procedure, compared to the classical methods. The reduction method requires an analysis of the dominant terms. A numerical solution, e.g. using the NAG program, requires the search for suitable starting values. None of these preliminary investigations is needed in the direct exact approach. Students enhance their computer literacy by a n application oriented active introduction into a powerful system.

sol=Solve[eqns,lw,x,y,qu,zl,So~+False,VerifySo1utions+kel;

For[ j=l, jO&& interimv>O && interimz>O&&

1;

PrintrEnd of computations."l; If[Head[solxl==S.~hal,Print~Wo positive solution found. lbanother order of the unknows or rewrite the kquations..'~l; If lHeadlsolxl==Real.PrintI*Thesolubilitv is:". soldi. "."11:

Difficulties with Mathematica Applying Mathematica Version 2.2 to the above examples, the authors have met the following difficulties. Programming Procedure

I t is possible that Mathematica does not find a solution within a reasonable time under a chosen order of the unknown variables, while another order turns out to be successful. As a rule of thumb the natural order of elimination of variables by a trained scientist is a n appropriate choice. The order can be imposed within Mathematica by enumeration of the variables and the option S o r t + F a l s e .

_

The applications on chemical solubilities are typically systems of four to six equations with degree one to two or three, which can be handled by Mathematica. Moreover, if exact solution fails, one can always ask Mathematica to give a numerical approximate solution.

Reliability of the Solutions The output of s o l v e for a nonlinear system is not always reliable, and the system does not perform a n automatic check. The user should perform a control. This can be done within Mathernatica using the option V e r i f y S o l u t i o n s + True. These shortcomings are due to fundamental mathematical reasons. A system of polynomial equations often is solved by successive elimination of variables, leading to a polynomial equation in one variable with higher order. The mathematical theory provides a n exact algebraic solution for a one-variable polynomial equation in general only for degree four or less, and in particular classes for degree higher than four Mathematica can always find the solution for degrees up to four, and in certain cases for higher degrees.

422

Journal of Chemical Education

Conclusion Mathematica provides exact solutions to the solubility system, in a direct way without a need for preliminary approximations, in a user-friendly language and a t high speed. The direct exact computation of chemical solubilities with a system like Mathernatica is a highly recommended complement to the usual approximate methodolow. Literature Cited 1. Skwg. D. A ; West. D. M.; Holler, F J.AnnIytica1 Chemistry. 6th ed.:Saunders: Fort Worth, 1992; pp 175-181. 2. Hams, D. C. Quontrloliue Chomiml Analysis, 3rd ed.;Fleeman: New York. 1991. 3. Mofhrmofim Nrsion 2.2; Wolfram Research: Champaign, 0,1993. 4. W o l f m , D. Mothomatlm, 2nd ed.:Addison-Wesley: Redwood City CA, 1991. 5. simon, B N O ~ ~ P S A Mathomoirol ~ P ~ C ~ ~ see. 1090,37,861-~68.