I'm studying civil engineer in my first year. We have a course called "General Chemistry". One of the chapters was about chemical balance of a reaction (called equilibrium in English, I think). We got exercises on this were we had to calculate the amount of chemicals got converted to others, using acidity constants Ka.

For example, the equations we had to solve were easy and looked like this:

$$K_a = \frac{(x)^2}{(0.1 - x)(0.2 - x)}$$

These exercises were easy. But then came the point were we combined two reactions at the same time and had to calculate the balance for both at the same time. The equations we get were:

enter image description here
enter image description here

The tutor used to make simplifications by getting rid of the "$-x$" and "$-y$" in the denominator, assuming x and y would be so small it would almost make no difference. I don't like making such simplifications: I want the correct answer. So, what I did was putting the equations in WolframAlpha and let it compute it, since I don't know how to solve such a system of equations. The result shocked me: the solutions for x and y were complex (so, with a real and imaginary part).

WolframAlpha says this:

enter image description here

Whereas the tutor found (due to simplification):
enter image description here

The tutor's solution is in the complex plane not really far away from the correct solution to the equation (WolframAlpha's solution #3).

So, my question is: How do you explain these roots are in fact complex? I don't think a complex amount of chemicals can react right?

  • $\begingroup$ I generally like to use $a + b \approx a$ if $\frac{a}{b} > 10^{2}$. Note that this is not the case for the values of $x$ and $y$ obtained, so depending on other relationships, the tutor's answer may be up to ~5% off. In that case, substituting with the new value of $x$ and $y$ in the denominator may be called for. Note that with a tool like WolframAlpha, simplifications are largely unnecessary. But if you're trying to compute this without the aid of such a total, or you're looking for a quick approximation which is frequently good enough, that is the way to go. $\endgroup$
    – Zhe
    Apr 2, 2019 at 20:51

2 Answers 2


Complex roots to mass/concentration balance equations should be discarded as they have no physical interpretation. If there are only complex roots, then odds are there's some error in the manipulation of variables that lead to the equation.

Your case seems different though. Notice the very small magnitude of the imaginary part of the complex roots; the number is "almost real". This happens at times simply because of Mathematica's numerical root search algorithms, which aren't always guaranteed to reach the exact value. I'm actually a bit surprised that it got caught up in such a simple calculation.

As proof that the imaginary part of the root is nothing but an issue with the calculation, I simplified the equations until I found a better representation for Wolfram Alpha to parse, hoping the complex root would disappear.

First, let $A=1.77\times 10^{-4}$ and $B=3.3\times 10^{-4}$ for concision. Isolating $x$ in the second equation gives:


Replacing $x$ for the above expression in the first equation then yields, after some tinkering:


Aha, a simple polynomial. Alpha should be able to deal with that just fine. Replacing the values of $A$ and $B$ produces the following equation, which Alpha solves with no imaginary part. The physically meaningful solution out of the three roots is $y\simeq 0.00458505$. Replacing that value in the equation for $x$ completes the problem, with $x\simeq 0.00228225$, very close to the approximate solutions.

  • 1
    $\begingroup$ Oh... my... god... I can't even rely on WolframAlpha anymore... :/ Thanks man. I'm recalculating in meanwhile. $\endgroup$ Dec 24, 2013 at 16:41

I want to add this just as a supplement to Nicolau's answer. As he mentioned, the imaginary numbers arise due to imprecision in a computational method. However, even without resorting to computation, there are ways to see that the result is incorrect from a purely mathematical perspective.

The Fundamental Theorem of Algebra tells us that a degree $n$ polynomial will always have $n$ roots if you take into account multiplicity. From this, one can also prove that an odd degree polynomial (with real coefficients) will have at least one real root. As Nicolau showed, your equation can be written as a third degree polynomial, meaning that at least one of the roots had to be real. In fact, in your case all the roots have to be real because, with real coefficients, complex roots come in pairs $a\pm bi$ and you can see that none of your roots have the same magnitude for the imaginary part.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.