Solving equilibrium constant expressions using spreadsheets

be erased from the spreadsheet allowing only positive values to be plotted. Summary. The above procedures have been used in undergraduate classes to g...
0 downloads 0 Views 1MB Size
ed acid and baseand FrA is the fraction of A. By substitutron in and rearrangement of eq 3 it ran he shcmn that

+

Vbase = Vacid * Cacid*FrA [OH] - [HI Cbase [HI - [OH]

+

(4)

Willis'argues that Vbase may be considered the dependent variable, and thus various values for the proton concentration are used to compute the hydroxide ion and conjugate base concentrations. These are then substituted into eq 4 to compute the volume of base that would need to he added to give that proton concentration. I t should he noted that same proton eoncentrations will give negative values for base volume added. These values may, however, be erased from the spreadsheet allowing only positive values to be plotted.

Summary The above procedures have been used in undergraduate classes to good effect. The diagrams have proved useful in enabling students to "visualize" acid-base systems and the changes in such systems during titrations. While the production of the diagrams and development of charge, proton, and mass balances has necessitated the development of a real working grasp of the chemistry of the systems.

'

Atkinson. G. F.; Doadt, E. G.: Reil. C. J. Chem. Educ 1986.63.841. Slumm. W.; Morgan. J. J. Aqustic Chemistly: An inwuction Emphasizing Chemicd Equiiibria in NBhKBl Waters 2nd d . : Wlley: New York. 1981. Sillen. L. G. Qaphiml Presentation of Equiiib ria Data. In Treatise on Anaiytimi Chemistv; Kollb off. I. M.; Elvlng. P. J.: Eds.: Interscience: New Ywk. 1959: Part 1. Vol. 2. 4Wllls,C. J. J. Chem. E&c. 1981, 58.659.

Solving Equilibrium Constant Expressions Using Spreadsheets Clyde Metz and Henry Donato, Jr. The College ol Charleston Charleston. SC 29424 The concepts of chemical equilibrium, the equilihrium constant, and the equilibrium constant expression are presented in virtuall" all introduetorv calleee ehemistrv coursesfor both majorsand nonmajon. Stu. dentsare usually asked to solve equilibrium problems both ro test their understanding of the underlying chemical principles and to illustrate the utility of these principles. We have observed that the solution to these problems can he divided into two steps: 1. Students must desrrihe a chemical aituation with an algebraic equation. 2. The algebraic equation must be solved to find a physirally meaningful root.

The first step requires some understanding of chemical principles to identify the chemieal reaction involved and initial conditions for the chemical reaction, describe the net changes that must take place to reach equilibrium, and write down the equilihrium constaht expression in terms of a single unknown quantity. The second step involves finding the unknown quantity. In general,

this may require solving a quadratic, cubic, or higher order polynomial equation. The mathematical complexities of finding roots of cubic or higher order polynomial equations has led to the situation in which only problems leading to quadratic equations are considered in many introductory chemistry courses. Breneman (5) has addressed this lack of completeness by investigating the use of spreadsheets for finding r w t s of polynomial equations arising from equilibrium problems. He has shown that a spreadsheet can easily be constructed to find the root of a fourth-degree polynomial using an iterative procedure, the Newton-Raphson method. Joshi ( 6 ) has described a spreadsheet template which can be used to find the roots of any polynomial of order three, againusing the Newton-Raphson formula. While quick and convenient, these methods require from the student the ahilitv to d a c e the eauation in pdynomial form,a knowledgeofdiffermtial calculus, and enuugh chemiral intuition to start the iterative procedure reasonably close to the physically meaningful root. In this paper, we describe a general numerical method for obtaining a chemically relevant root to polynomial expressions generated from a consideration of chemical equilihrium. This method is based on a trial and error procedure tur findma the physically relevant root and rs convenrently executed on a personal romputer runnmg a spread sheet program

volved in solving the equilibrium constant expression. Suppuse that at a temperature of 400 'C a mixture of 3 parts H&J and 1 part NAg) is placed in a container with a total pressure of 10 bar and the parrial pressures of H2. N2. and NHx at equilibrium are desired. The reartion involved is

The initial partial pressures of Np and Hp can be extracted from information given in l the nrahlem. If onelets x he t h e ~ a r t i aureasure of the nitrop;en gar that reacts in order t t reach ~ equilibrium, then the equrlibrium partial pressures of the gases are given below:

. .

Description and Application of the Method Consider a reaction that is usually not discussed in introductory chemistry courses because of the mathematical difficulties in-

The equilibrium constant expression then hecomes

Remmd at me 10th Blsnnlal Conference on Chsrn!cal Educatoon. Purdue Unlverslly. A~gust 1988.

(Continued on page A242)

An analytical solution to this quartic eqnation is beyond most beginning chemistry students. However, one may find a solution quickly by trial and error. Note that the difference between the left- and right-hand sides of eq 1is zero when r is a root. I t is also clear that x must be between 0 and 2.5 bar in order m be physically meaningful. Anexam. plr of aspreadsheet which findsa physically mpanindul mot for ea 1 is described below. The v&es of K, and the initial pressure are in cells A2 and A4, respectively. Trial values of x starting a t 0.0 bar, increasing in increments of 0.1 bar and ending a t 2.5 bar, are placed in the cell range A6 to A30. The difference between the left- and right-hand sides of eq 1is calculated by the spreadsheet for each trial value of x and entered in the cell range B6 to B30. The difference calculated in column B changes sign between the x values 0.1 and 0.2 bar, hence a root of eq 1 must lie in that interval. In column C, trial values of x starting with 0.1 bar and increasingin increments of 0.01 bar until02 bar are entered. The difference is calculated for the x values in column C and entered into column D. Inspection of column D reveals that a root must be between 0.17 bar and 0.18 bar. Proceeding in this fashion in columns E and F one can further narrow the interval in wbich the physically meaningful root lies. One would proceed until a value of x is found by trial and error whose difference from the physically meaningful root is insignificant, given the precisian of the experimental data in the problem. I t should be noted that this trial and error method is suitable for finding roots of any nonlinear algebraic equation in one unknown. The chief advantages of this proeedure are that it is conceptually simple, requires no calculus, and could be executed by any beginning chemistry student. The major disadvantage is that some problems require considerable spreadsheet manipulation and may take as Long as 15 min. We have comnared the nerformance of our method to that of commercial equation solvers like Eureka for a variety of equilibrium problems. When the algebraic expression derived from the consideration of the chemical equilibrium is transformed to a polynomial form, which may involve considerable algebraic manipulation, and the polynomial is scaled properly, i.e., the order of magnitude difference between the quantities in the problem is not too large, tben Eureka finds the roots of the equation in a few seconds. Even if equation solvers like Eureka could be applied in a straightforward manner to every equilibrium problem, we would still argue that the trial and error method makes better pedagogical sense. Students like Eureka as tend to auuroach nromams . . black bones. Artive p n r r i r p t i m o n the part of thestudent is requ~redto use the trial and error method. Caution should be used when applying the trial and error method to some equilibrium problems. Difficulties may arise if the equilibrium constant is too large or too small. First, consider the chemical reaction:

..

A242

Journal of Chemical Education

with the initial concentration of C at 0.20 M and K = 6.00 X 10 -*.The a b w e represents an unlikely situation, hut a beginning rhemistry student could easily calculate the equilibrium concentration of A and B.

[A] = [B] = [(6.00 X 10-99)(0.20)]05 = 3.5 X

lo-"

M

The trial and error method can only locate and 3.8 X the solution between 3.1 X lo-". Closer approach to the solution yields a difference hetween K and the equilibrium constant expression of less than 1 X 10-99, wbich is an undefined number for the spreadsheet. Second, consider the reaction, first pointed out tous by the editor, whose equilibrium constant is very large.

If the initial concentration of H202i~ 0.01 M, tben one might proceed to calculate the equilibrium concentrations of all reacting species by letting r he the concentration of Hz02 that reacts to reach equilibrium. Defined in this way, r is very close to 0.01 M because K is so large. Therefore z must be calculated with very high precision ( x = 0.00999999988 M) in order to find the desired quantity, i.e., the equilibrium concentration of HzOz which is 1.2 X 10-I0 M. This example pushed our spreadsheet to its limit oi prerisiun. To avoid this difficulty, one could assume that all the H?O is ronverted into products and let the equfiihrium state be annroacbed from the other direction. If this assumption is made, the initial conditions become

Now x is the concentration of Hz02 formed

to reach equilihrium. One may now calculatex by the straightforward application of the trial and error procedure.