quadratic formula

The quadratic formula


Consider the equation

(1)ax 2+bx+c=0, a{x}^2 + b{x} + c = 0 ,

which we wish to solve for xx. In certain contexts, the solutions are given by one or more versions of the quadratic formula.


The coefficients a,b,ca, b, c are commonly taken from an algebraically closed field KK of characteristic 00, such as the field \mathbb{C} of complex numbers, although any quadratically closed field whose characteristic is not 22 would work just as well. Alternatively, the coefficients can be taken from a real closed field KK, such as the field \mathbb{R} of real numbers; then the solutions belong to K[i]K[\mathrm{i}]. (Of course, [i]\mathbb{R}[\mathrm{i}] is simply \mathbb{C} again.) More generally, starting from any integral domain KK whose characteristic is not 22, the solutions belong to some splitting field of KK. (Of course, there are solutions in some splitting field, regardless of the characteristic, but they are not given by the quadratic formula if the characteristic is 22.)

Explicitly, the solutions of (1) may be given by the usual quadratic formula

(2)x ±=b±b 24ac2a, x_\pm = \frac{-b \pm \sqrt{b^2 - 4a{c}}}{2a} ,

which works as long as a0a \ne 0. There is also an alternate quadratic formula

(3)x ±=2cbb 24ac, x_\pm = \frac{2c}{-b \mp \sqrt{b^2 - 4a{c}}} ,

which may be obtained from (2) by rationalizing the numerator; this works as long as c0c \ne 0. (Note that ±\pm and \mp appear here simply to indicate the two square roots of the determinant b 24acb^2 - 4a{c} and how they correspond to the two solutions x ±x_\pm; we do not need to have a function \sqrt{} which always chooses a ‘principal’ square root.)

These two formulas are reconciled in the projective line of KK. As long as (a,b,c)(0,0,0)(a, b, c) \ne (0, 0, 0), there are two solutions (which might happen to be equal) in the projective line. If a=0a = 0, then one of these solutions is \infty, and (2) correctly gives us that solution (as long as b0b \ne 0) for one choice of square root, although it gives 0/00/0 for the other choice. Similarly, (3) correctly gives us x=0x = 0 when c=0c = 0 and b0b \ne 0, but it does not give us the other root when c=0c = 0. Note that if a,c=0a, c = 0 but b0b \ne 0, then (2) gives us one root (\infty) while (3) gives us the other (00).

So in general, we should be given a0a \ne 0, b0b \ne 0, or c0c \ne 0 for a nondegenerate equation (1). If a0a \ne 0, then we use (2); if c0c \ne 0, then we use (3). Finally, if b0b \ne 0, then we use both; each root will be successfully given by at least one formula for some choice of square root of b 24acb^2 - 4a{c}.

When the coefficients come from an ordered field KK (which we assume real closed), then we can write down a formula specially for the case when b0b \ne 0. This is the numerical analysts' quadratic formula

(4)x b^=2cbb^b 24ac; x b^=bb^b 24ac2a. \begin {gathered} \displaystyle x_{\hat{b}} = \frac{2c}{-b - \hat{b}\sqrt{b^2 - 4a{c}}} ;\\ \displaystyle x_{-\hat{b}} = \frac{-b - \hat{b}\sqrt{b^2 - 4a{c}}}{2a} .\\ \end {gathered}

In this formula, b^\hat{b} is the sign of bb, that is |b|/b{|b|}/b; also, we must choose a nonnegative principal square root, so that b 24ac<0\sqrt{b^2 - 4a{c}} \lt 0 in KK is avoided (and thus the common denominator of x b^x_{\hat{b}} and numerator of x b^x_{-\hat{b}} is nonzero even if not imaginary). Despite the name, this formula is not sufficient for all purposes in numerical analysis?; one still needs all three formulas and chooses between them based on whether a0a \ne 0, b0b \ne 0, or c0c \ne 0 is best established.

There is also an interesting issue about whether b 24ac0b^2 - 4a{c} \ne 0. Everything above is valid in weak forms of constructive mathematics, except for the statement that \mathbb{C} is algebraically closed. That claim follows from weak countable choice (WCCWCC), which in turn will follow from either excluded middle or countable choice, which is accepted by most constructive mathematicians. Nevertheless, the statement

a,b,c:,r:,r 2=b 24ac \forall\, a, b, c\colon \mathbb{C},\; \exists\, r\colon \mathbb{C},\; r^2 = b^2 - 4a{c}

is false in (for example) the internal language of the sheaf topos over the real line. (Essentially, this is because there is no continuous map \sqrt{} on any neighbourhood of 00 in \mathbb{C}.) If we are given that a,b,ca, b, c are real, or if we are given that b 24acb^2 \ne 4a{c}, then there is no problem. But in general, we cannot define this square root, which appears in every version of the quadratic formula.

However, there is a more subtle sense in which \mathbb{C} is algebraically closed even without WCCWCC; essentially, this allows us to approximate the subset of \mathbb{C} whose elements are the two solutions of (1) (using two-element subsets of the field of, say, Gaussian numbers) even if we can't approximate any one solution (using individual, say, Gaussian numbers); see Richman (1998) for details. The quadratic formula can then be interpreted as indicating this approximated subset.

Sometimes one considers the equation

ax 2+2px+c=0 a{x}^2 + 2p{x} + c = 0

instead of (1); then (2) simplifies to

x ±=p±p 2aca. x_\pm = \frac{-p \pm \sqrt{p^2 - a{c}}}a .

This is valid even in characteristic 22, but unfortunately then it is fairly useless, since 2p=02p = 0. In fact, (1) is solvable in characteristic 22 only if b=0b = 0.


Revised on August 6, 2015 23:43:06 by Toby Bartels (