Chemistry - Why can't I balance this reaction algebraically?

Solution 1:

Here's how to solve the system in python:

>>> import numpy as np
>>> stoich_mat = np.array([[-1, 0, 1, 0, 0],  # copper balance
                           [0, -1, 0, 0, 2],  # hydrogen
                           [0, -1, 2, 1, 0],  # nitrogen
                           [0, -3, 6, 1, 1],  # oxygen
                           [1, 0, 0, 0, 0]])  # impose constraint that a == val
>>> rhs = np.array([0, 0, 0, 0, 1])  # last number is assumed val of a
>>> np.linalg.solve(stoich_mat, rhs)
array([ 1.        ,  2.66666667,  1.        ,  0.66666667,  1.33333333])

Thus this solution says:

$$\ce{Cu + 2.67 HNO3 -> Cu(NO3)2 + 0.67 NO + 1.33 H2O}$$

Multiplying through by 3:

>>> rhs_times_3 = np.array([0, 0, 0, 0, 3])
>>> np.linalg.solve(stoich_mat, rhs_times_3)
array([ 3.,  8.,  3.,  2.,  4.])

$$\ce{3 Cu + 8 HNO3 -> 3 Cu(NO3)2 + 2 NO + 4 H2O}$$

If your question is how computers (or people) can solve systems of linear equations, you can read up on Gaussian elimination and related techniques.

Solution 2:

Given the reaction $\ce{a Cu + b HNO3 -> c Cu(NO3)2 + d NO + e H2O}$, we can set up four equations:

$$\begin{align} a &= c & &\text{(for Cu)} \tag{1} \\ b &= 2e & &\text{(for H)} \tag{2} \\ b &= 2c+d & &\text{(for N)} \tag{3} \\ 3b &= 6c+d+e & &\text{(for O)} \tag{4} \end{align}$$

Substituting equation $(1)$ into the rest, we get

$$\begin{align} b &= 2e & &\text{(for H)} \tag{2*} \\ b &= 2a+d & &\text{(for N)} \tag{3*} \\ 3b &= 6a+d+e & &\text{(for O)} \tag{4*} \end{align}$$

Substituting equation $(2^*)$ into equations $(3^*)$ and $(4^*)$, we have

$$\begin{align} 2e &= 2a+d & &\text{(for N)} \tag{3**} \\ 6e &= 6a+d+e & &\text{(for O)} \tag{4**} \end{align}$$

We can now multiply equation $(3^{**})$ by $3$ and subtract that from equation $(4^{**})$, which leaves us with $0 = -2d+e$. Therefore,

$$d = \frac{1}{2}e \tag{5}$$

Now, we try to express the constants $a,b,c,d$ in terms of $e$. Substituting equation $(5)$ back into equation $(3^{**})$, we find that

$$\begin{align} 2e &= 2a + \frac{1}{2}e \\ a &= \frac{3}{4}e \tag{6} \end{align}$$

and since $a = c$ (equation $(1)$), we also find that

$$c = \frac{3}{4}e \tag{7}$$

So, using equations $(6)$, $(2)$, $(7)$, and $(5)$, we can now rewrite the reaction as:

$$\ce{$\frac{3}{4}e$ Cu + $2e$ HNO3 -> $\frac{3}{4}e$ Cu(NO3)2 + $\frac{1}{2}e$ NO + e H2O} \tag{8}$$

Clear the fractional exponents by multiplying by 4:

$$\ce{$3e$ Cu + $8e$ HNO3 -> $3e$ Cu(NO3)2 + $2e$ NO + $4e$ H2O} \tag{9}$$

Now $e$ can be any positive rational number ( such as an integer $1,2,3,4,\cdots,n$ or a fraction such as 1/2 or 3/4) and for a "balanced" chemical equation, we divide by the greatest common factor of all the integer factors, thus 1 is the correct value to use. Thus the balanced equation is:

$$\ce{3 Cu + 8 HNO3 -> 3 Cu(NO3)2 + 2 NO + 4 H2O} \tag{10}$$

Note that if the equation had been something like
$$\ce{$6e$ Cu + $16e$ HNO3 -> $6e$ Cu(NO3)2 + $4e$ NO + $8e$ H2O} \tag{11}$$
then $e$ would have been 1/2 since all the species in the equation have a factor of 2 in common. For a "balanced" chemical equation integer values where the gcd is 1 are desired.


As Paul Harvey used to say here is "the rest of the story..."

The actual chemical reaction is:

$$\ce{a Cu + b HNO3 -> c Cu(NO3)2 + dNO + eNO2 + fH2O}$$

and this reaction doesn't have any unique solution.

In weak nitric acid the favored reaction is:

$$\ce{3 Cu + 8 HNO3 -> 3 Cu(NO3)2 + 2 NO + 4H2O}$$

but in strong nitric acid the favored reaction is:

$$\ce{ Cu + 4 HNO3 -> Cu(NO3)2 + 2 NO2 + 2H2O}$$


Solution 3:

You seem to have had the right idea of fixing the scale by arbitrarily choosing the value of one coefficient, and then solving for the rest. Apparently, you just got stuck at some point, presumably either because you couldn't solve for $b$ just with simple substitutions, or because your initial choice of $a = 1$ gave you fractional values for the other coefficients that you didn't know how to deal with.

If you plug $a = 1$ into your original equations, you'll immediately get $c = 1$, and by substituting that into the other equations, you're left with:

\begin{aligned} b & = 2e, \\ b & = 2+d, \text{ and} \\ 3b & = 6+d+e. \end{aligned}

One way to solve that remaining set of equations is to first subtract the second one from the last one, to get: $$3b - b = (6+d+e)-(2+d) \implies 2b = 4+e,$$ and then substitute in the first one to get: $$2(2e) = 4+e \implies 4e = 4 + e.$$ Subtracting $e$ from both sides then gives you $3e = 4$, which you can divide by 3 to get $e = \frac43$.

Once you have a numerical value for $e$, even if it's a fraction, you can then substitute that back into the first equation above to get $b = 2\cdot\frac43 = \frac83$, which you can then plug into the second one to get $\frac83 = 2 + d$, and then subtract 2 from both sides to get $d = \frac83-2 = \frac83 - \frac63 = \frac23$.

Now we have a solution $(a=1, b=\frac83, c=1, d=\frac23, e=\frac43)$, but it still contains fractional values that we'd like to get rid of. The way to fix that, however, is simple: just multiply all the values by their least common denominator, 3, to get $(a=3, b=8, c=3, d=2, e=4)$.

The reason that works is because your original system of linear equations was, by construction, homogeneous, i.e. every term in every equation contained exactly one of the coefficients $a$, $b$, $c$, $d$ and $e$. Thus, multiplying all the coefficients by the same scaling factor multiplies every term in the equations by the same amount, and thus turns any valid solution into another equally valid one.

Such rescaling does, in fact, have a reasonable physical interpretation: if we have $n$ instances of the reaction going on at the same time, then the combined reaction will obviously consume $n$ times as many of each reactant and produce $n$ times as many of each product. Allowing $n$ to take on fractional values does require a bit more of a mathematical leap of imagination, but we may e.g. interpret the fractionally scaled reaction as describing just a fraction of the original equation — which may or may not be chemically meaningful, depending on whether all the scaled coefficients work out to whole numbers of molecules, but which nonetheless correctly describes the proportions of reactants consumed and products yielded.

Of course, you could've also arrived at the appropriately scaled solution directly, if you had happened to start with the initial guess $a = 3$ instead of $a = 1$.

Indeed, the fact that you didn't need to make any further arbitrary choices during the solution, after this initial choice of scale, proves that all the possible solutions to this homogeneous system of linear equations are simply scalar multiples of each other. On the other hand, if you'd added a $+\ce{f NO2}$ term to the products of your reaction (as MaxW suggests in their answer, for extra realism), then you would've had to make an arbitrary choice about the proportion of $\ce{NO}$ and $\ce{NO2}$ products at some point during the solution (or, alternatively, leave it unspecified, leaving you with some non-numeric factors in your result), reflecting the fact that the solution space of this extended system of equations is multidimensional, i.e. has more than one degree of freedom, and that this extended reaction can thus yield varying proportions of its products depending on the conditions under which it occurs.


Solution 4:

You have five variables but only four equations.

Algebra tells you that this is not a fully defined set of equations and that there are infinitely many possible solutions. For five variables you would need five equations.

However, a fifth constraint can be included by aiming for the smallest possible integer-only solution.


Solution 5:

Just for fun suppose we take the element balance equations and multiply each of them by the coefficient indicated below:

Copper: $a=c$, $×0$

Hydrogen: $b=2e$, $×1$

Nitrogen: $b=2c+d$, $×5$

Oxygen: $3b=6c+d+e$, $×(-2)$

Add up that linear combination:

$0=-2c+3d$

So $c/d=3/2$. Assign values of the copper nitrate and nitric oxide coefficients accordingly and the rest of the system easily yields.

Hey wait, have we not seen that ratio before? It's the ratio we get for those two coefficients based on the standard redox method. When you use the redox method, you are using oxidation states as a tool to find a linear combination that simplifies the solution.

Tags: