Complete the Square in an Irreducible Quadratic Transform

A worked explanation of complete the square in an irreducible quadratic transform, including the key limitation and a checkable example.

Complete the Square in an Irreducible Quadratic Transform

You have a rational Laplace transform with a quadratic denominator that will not factor into real linear terms, and you need its inverse. The one algebraic move that turns that denominator into a form matching the standard sine and cosine transform pairs is to complete the square in an irreducible quadratic transform. Write the denominator s² + bs + c as (s + b/2)² + (c − b²/4). When the discriminant b² − 4c is negative, that remainder c − b²/4 is positive, so you name it ω². The denominator becomes (s + α)² + ω² with α = b/2. That directly matches the Laplace pairs ℒ⁻¹{ω / ((s + α)² + ω²)} = e^{-αt} sin(ωt) and ℒ⁻¹{(s + α) / ((s + α)² + ω²)} = e^{-αt} cos(ωt). The question is how to rewrite a specific numerator so that it splits into those exact forms.

A Worked Example

Take F(s) = (s + 3) / (s² + 2s + 5). The denominator is s² + 2s + 5. The discriminant is 2² − 4·1·5 = 4 − 20 = −16, negative, so the quadratic is irreducible. Completing the square gives (s + 1)² + (5 − 1) = (s + 1)² + 4. The standard form has α = 1 and ω = 2, because 4 = 2². Now rewrite the numerator s + 3 as (s + 1) + 2. That is not a guess, you add and subtract the α that appears in the completed square. The fraction becomes (s + 1) / ((s + 1)² + 2²) + 2 / ((s + 1)² + 2²). The first term is exactly the cos pair with α = 1. The second term is 2 times the sin pair. The inverse is ℒ⁻¹{F(s)} = e^{-t} cos(2t) + e^{-t} sin(2t). The units work: α and ω carry s⁻¹ and rad/s respectively, and t is in seconds.

Calculation Steps

To perform the calculation on any irreducible quadratic, follow three steps. First, identify the denominator s² + bs + c. Compute b/2 to get α, then compute ω² = c − α². Check that ω² is positive; if it is not, the quadratic is reducible and you should use partial fractions on real linear factors instead. Second, write the completed square as (s + α)² + ω². Third, rewrite the numerator N(s) as a constant times (s + α) plus a constant. For a linear numerator As + B, the constants are A (the coefficient of s) and B − Aα. For the example above, A = 1, B = 3, α = 1, so the constants are 1 and 3 − 1 = 2. That gives (s + α) + 2. The transform then splits into two terms that each match a pair in the standard table. If the numerator degree equals or exceeds the denominator degree, perform polynomial division first and handle the remainder. A completing the square calculator can automate the arithmetic for the denominator, but the numerator rewrite requires your attention.

When the numerator has degree higher than one, for instance (s² + 3s + 2) over the same denominator, you first divide s² + 3s + 2 by s² + 2s + 5 to get a quotient of 1 and a remainder of s − 3. The inverse of the quotient 1 is the Dirac delta δ(t), which is the impulse response contribution. The remainder s − 3 over the completed square then splits into (s + 1) and −4, giving e^{-t} cos(2t) − 2e^{-t} sin(2t) plus the delta term.

Why the Method Works

The reason completing the square works here is algebraic necessity. The inverse Laplace transform table contains pairs for sine and cosine with exponential damping only in the form (s + α)² + ω². No other arrangement of a quadratic denominator yields a direct match. If the denominator were (s + 2)² − 1, as in F(s) = 1/(s² + 4s + 3), the result would be hyperbolic sine or cosine, not the oscillatory sine and cosine. That denominator factors as (s + 1)(s + 3), and partial fractions give exponentials without oscillation. The threshold discriminant for the irreducible case is zero: any quadratic with a negative discriminant requires completing the square. Positive discriminant means real linear factors and a different inversion path.

One specific failure case occurs when the numerator is not a linear function of s. For F(s) = 1/(s² + 2s + 5), the numerator is constant. Complete the square to get 1/((s + 1)² + 4). That is ½ times 2/((s + 1)² + 2²), which yields (½)e^{-t} sin(2t). That works. But for F(s) = s²/(s² + 2s + 5), the numerator degree equals the denominator degree. If you try to complete the square without dividing first, you get nonsense. The correct step is polynomial division to obtain 1 − (2s + 5)/(s² + 2s + 5), then complete the square on the remainder. The division step is the one most often missed. A student who skips it and attempts to match the sine and cosine forms directly will produce an inverse that fails the initial value theorem: the limit f(0+) will disagree with the limit of sF(s) as s→∞.

Limits And When This Method Fails

The method is only valid when the quadratic is irreducible. For F(s) = 1/(s² + 4s + 3), the discriminant is 16 − 12 = 4. The quadratic factors as (s + 1)(s + 3). Completing the square yields (s + 2)² − 1, which is not a sum of squares and does not match the sine or cosine form. The correct inverse uses partial fractions: 1/((s + 1)(s + 3)) = ½(1/(s + 1) − 1/(s + 3)), which inverts to ½(e^{-t} − e^{-3t}). The two results look completely different because the system is overdamped, no oscillation, while the irreducible case always produces underdamped oscillation with exponential decay. If you force the completed-square form onto a reducible quadratic, you get a hyperbolic function that is not the inverse of the original transform.

Another limit appears when the numerator has a term that cannot be expressed as A(s + α) + B. A numerator of s² + s + 1 over an irreducible quadratic requires polynomial division first. After division, the remainder is linear and the method works, but the quotient adds a delta function or a step, which may be the dominant term in the time-domain response. Overlooking that term is the most common error in practice. Engineers verifying a step-response calculation from a control-system simulation should check that the delta term is not missing when the numerator degree equals the denominator degree.

Completed Square Forms and Their Inverse Transforms
Denominator FormNumerator FormInverse Transform f(t)
(s + α)² + ω²ωe^{-αt} sin(ωt)
(s + α)² + ω²s + αe^{-αt} cos(ωt)
(s + α)² + ω²A(s + α) + BA e^{-αt} cos(ωt) + (B/ω) e^{-αt} sin(ωt)

What Most Often Goes Wrong

The single thing that most often goes wrong is applying the method to a reducible quadratic. A student sees a quadratic denominator and completes the square by habit, then looks up the sine or cosine pair, getting a result that oscillates when the true time-domain response does not. Check the discriminant before you start. If it is zero or positive, stop and factor. If it is negative, then and only then does completing the square produce the standard sine and cosine forms. Every engineering mathematics textbook, from Boyce and DiPrima to Kreyszig, teaches this check as the first step, yet it remains the error that costs the most time.

Common Questions

What is the first step in completing the square for an irreducible quadratic?

Identify the coefficient b of the s term in s² + bs + c. Take half of b to get α, then compute ω² = c − α². Confirm that ω² is positive, that is what makes the quadratic irreducible.

How do I rewrite the numerator after completing the square?

For a linear numerator As + B, express it as A(s + α) + (B − Aα). This separates the transform into a cosine term and a sine term.

What if the numerator degree equals the denominator degree?

Perform polynomial division first. Divide the numerator by the denominator to get a quotient and a remainder. The remainder will be linear, and you apply completing the square to it. The quotient inverts to a Dirac delta or a step function.

Can I complete the square if the quadratic has a positive discriminant?

You can, but the result will be a difference of squares, not a sum. That form matches hyperbolic sine and cosine, not sine and cosine. Use partial fractions on the real linear factors for a simpler path.

What are the units of α and ω in the completed square?

α has units s⁻¹ because it comes from the coefficient of s. ω has units rad/s because it produces the oscillation frequency. The time variable t is in seconds.

How do I verify my partial-fraction decomposition before inverting?

Recombine the decomposed terms over a common denominator. The numerator should match the original F(s) numerator. For the completed-square form, check that the two terms add back to the original rational function.

What is the failure case for this method?

The quadratic s² + 4s + 3 has discriminant 4 and factors as (s + 1)(s + 3). Completing the square gives (s + 2)² − 1, which does not match the sine or cosine forms. The correct inverse uses partial fractions, not the completed-square transform pairs.