Complementary Function and Particular Integral

One part kills the left side, one builds the right.

A right side that is not zero

Take d²y/dx² − 3 dy/dx + 2y = 4x. Its auxiliary equation m² − 3m + 2 = 0 has roots 1 and 2, so eˣ and e^(2x) make the left side 0. But the equation asks for 4x, not 0, so those exponentials cannot be the whole answer.

Split the answer in two

Look for the solution as a sum, y = u + v. The left side d²y/dx² − 3 dy/dx + 2y is linear: put in u + v and it gives what u gives plus what v gives, because the derivative of a sum is the sum of the derivatives.

So choose u to give 0 and v to give 4x. Then u + v gives 0 + 4x = 4x, and it is a solution. The part u is called the complementary function, and the part v the particular integral.

The complementary function

The complementary function solves the equation with 0 on the right, d²y/dx² − 3 dy/dx + 2y = 0, so it comes from the auxiliary equation. The roots 1 and 2 give u = A eˣ + B e^(2x).

It carries both constants. Whatever A and B are, u adds 0 to the left side.

The particular integral

The particular integral only has to produce 4x. The right side is linear, so try a linear function with unknown coefficients: v = px + q. Then dv/dx = p and d²v/dx² = 0.

Substitute: 0 − 3p + 2(px + q) = 4x, which is 2px + (2q − 3p) = 4x. Two expressions in x are equal for every x only when their x terms match and their constant terms match. So 2p = 4 and 2q − 3p = 0.

Add the two parts

From 2p = 4, p = 2, and then 2q = 3p = 6 gives q = 3. So the particular integral is v = 2x + 3. Check it: d²v/dx² − 3 dv/dx + 2v = 0 − 6 + 4x + 6 = 4x.

The general solution is complementary function plus particular integral: y = A eˣ + B e^(2x) + 2x + 3.

Starting values fix A and B, and they go on the whole solution. If y = 0 and dy/dx = 0 at x = 0, then A + B + 3 = 0 and A + 2B + 2 = 0. Subtracting gives B − 1 = 0, so B = 1 and A = −4: y = −4eˣ + e^(2x) + 2x + 3.

Choosing the trial function

The trial copies the form of the right side, with unknown coefficients in place of the given numbers. A right side kx is tried as px + q, k e^(ax) as p e^(ax), and k cos ax or k sin ax as p cos ax + q sin ax.

For d²y/dx² − 3 dy/dx + 2y = 6e^(3x), try v = p e^(3x). Then dv/dx = 3p e^(3x) and d²v/dx² = 9p e^(3x), so the left side is (9p − 9p + 2p)e^(3x) = 2p e^(3x). Matching 6e^(3x) gives p = 3, and v = 3e^(3x).

For d²y/dx² − 3 dy/dx + 2y = 10 cos x, try v = p cos x + q sin x. The dy/dx term turns a cosine into a sine, so the trial needs both. Substituting gives (p − 3q) cos x + (3p + q) sin x = 10 cos x, so p − 3q = 10 and 3p + q = 0. Then q = −3p, so 10p = 10, p = 1, q = −3, and v = cos x − 3 sin x.

When the trial is already in the complementary function

For d²y/dx² − 3 dy/dx + 2y = e^(2x), the trial p e^(2x) fails: e^(2x) is part of the complementary function, so it gives 0 on the left for every p, never e^(2x).

Multiply the trial by x instead: v = p x e^(2x). Then dv/dx = p(1 + 2x)e^(2x) and d²v/dx² = p(4 + 4x)e^(2x), and the left side is p(4 + 4x − 3 − 6x + 2x)e^(2x) = p e^(2x). So p = 1 and the particular integral is x e^(2x).

The usual mistakes

Fitting the starting values to the complementary function before the particular integral is added. The values describe the whole solution, so they go on u + v.

Trying v = px for a right side 4x. The dy/dx term turns px into a constant −3p, and with no q in the trial nothing can cancel it: 2px − 3p = 4x needs p = 2 and p = 0 at once.

Trying only q sin ax for a right side k sin ax when the equation has a term in dy/dx. The derivative of the sine is a cosine, so the cosine term must be in the trial too.

Multiplying the two parts. The argument rests on a sum: u gives 0 and v gives the right side, so y = u + v.

A car on an undulating road

In the application below, the body of a car obeys d²x/dt² + 4 dx/dt + 40x = 750 sin 5t, with x in millimeters and t in seconds. Its auxiliary roots are −2 ± 6i, so the complementary function e^(−2t)(A cos 6t + B sin 6t) shrinks by a factor of e^(−2) every second. The particular integral −24 cos 5t + 18 sin 5t keeps the same size, and after a few seconds it is all that is left.

tx

The gold curve is the car’s solution, x = e^(−2t)(24 cos 6t − 7 sin 6t) − 24 cos 5t + 18 sin 5t, starting at 0 at rest. The dashed curve is the particular integral alone, which starts at −24 and swings between −30 and 30. The gap between them is the complementary function: about 3.4 at t = 1, and never more than 1.3 after t = 1.5.

Worked example: A Car Driven Onto a Stretch of Undulating Road: The Body's Motion From the First Moment, and the Swing It Settles Into

Question One corner of a car carries 400 kilograms of its body on a spring of stiffness 16000 newtons per meter and a damper that resists with 1600 newtons for each meter per second of speed. The car has been driving on level road, with the body resting on the spring, when it reaches a stretch whose slabs have settled into long, regular undulations. From then on the road pushes up on that corner with an extra force of 300sin 5t newtons, where t is the number of seconds since the car reached the stretch. Let x be the height of the body in millimeters above where it rested. (a) Find x in terms of t. (b) Find the amplitude of the motion once it has settled down, and how many times as large that is as the height at which a steady upward push of 300 newtons would hold the body.

  1. 1.Let X be the height in meters. Newton's second law, with the spring and the damper both pulling back, is 400d2Xdt2 = 300sin 5t − 1600dXdt − 16000X. Putting x = 1000X millimeters and dividing every term by 400 gives d2xdt2 + 4dxdt + 40x = 750sin 5t, with x = 0 and dxdt = 0 at t = 0, since the body was resting.

    −300300123time, secondsheight x, mmat rest when the push beginsdivide by 400, in mm: 4, 40 and 750
    −300300123time, secondsheight x, mmat rest when the push beginsdivide by 400, in mm: 4, 40 and 750
    Newton's second law, in millimeters and divided by 400: d2xdt2 + 4dxdt + 40x = 750sin 5t, starting from rest.
  2. 2.The complementary function solves the equation with 0 on the right. Its auxiliary equation is r2 + 4r + 40 = 0, so r = −4 ± √16 − 1602 = −2 ± 6i, and the complementary function is e−2t(Acos 6t + Bsin 6t): a swing of 6 radians a second inside a factor that shrinks by e−2 every second.

    −300300123time, secondsheight x, mmat rest when the push beginsdivide by 400, in mm: 4, 40 and 750r2+ 4r + 40 = 0, so r = −2 ± 6ithe CF shrinks by e−2every second
    −300300123time, secondsheight x, mmat rest when the push beginsdivide by 400, in mm: 4, 40 and 750r2+ 4r + 40 = 0, so r = −2 ± 6ithe CF shrinks by e−2every second
    The auxiliary equation r2 + 4r + 40 = 0 has roots −2 ± 6i, so the complementary function is e−2t(Acos 6t + Bsin 6t).
  3. 3.For the particular integral, copy the shape of the right side with a cosine as well as a sine, because the damper turns one into the other: try x = pcos 5t + qsin 5t. Then d2xdt2 = −25x and dxdt = −5psin 5t + 5qcos 5t, so the left side is (15p + 20q)cos 5t + (15q − 20p)sin 5t. Matching it to 750sin 5t gives 15p + 20q = 0 and 15q − 20p = 750, so q = −34p and −1254p = 750, that is p = −24 and q = 18.

    −300300123time, secondsheight x, mmparticular integraldivide by 400, in mm: 4, 40 and 750r2+ 4r + 40 = 0, so r = −2 ± 6ithe CF shrinks by e−2every secondtry p cos + q sin, both at 5 rad/s15p + 20q = 0, 15q − 20p = 750p = −24, q = 18
    −300300123time, secondsheight x, mmparticular integraldivide by 400, in mm: 4, 40 and 750r2+ 4r + 40 = 0, so r = −2 ± 6ithe CF shrinks by e−2every secondtry p cos + q sin, both at 5 rad/s15p + 20q = 0, 15q − 20p = 750p = −24, q = 18
    Try pcos 5t + qsin 5t: matching gives 15p + 20q = 0 and 15q − 20p = 750, so the particular integral is −24cos 5t + 18sin 5t.
  4. 4.(a) The general solution is the two parts added: x = e−2t(Acos 6t + Bsin 6t) − 24cos 5t + 18sin 5t. At t = 0, x = A − 24 = 0, so A = 24; and dxdt = −2A + 6B + 90 = 0, so 6B = 48 − 90 and B = −7. Hence x = e−2t(24cos 6t − 7sin 6t) − 24cos 5t + 18sin 5t millimeters.

    −300300123time, secondsheight x, mmparticular integralthe sumdies awaydivide by 400, in mm: 4, 40 and 750r2+ 4r + 40 = 0, so r = −2 ± 6ithe CF shrinks by e−2every secondtry p cos + q sin, both at 5 rad/s15p + 20q = 0, 15q − 20p = 750p = −24, q = 18(a) A − 24 = 0, so A = 24−2A + 6B + 90 = 0, so B = −7
    −300300123time, secondsheight x, mmparticular integralthe sumdies awaydivide by 400, in mm: 4, 40 and 750r2+ 4r + 40 = 0, so r = −2 ± 6ithe CF shrinks by e−2every secondtry p cos + q sin, both at 5 rad/s15p + 20q = 0, 15q − 20p = 750p = −24, q = 18(a) A − 24 = 0, so A = 24−2A + 6B + 90 = 0, so B = −7
    (a) Add the two parts, then fit the start: A = 24 and B = −7, so x = e−2t(24cos 6t − 7sin 6t) − 24cos 5t + 18sin 5t.
  5. 5.(b) By t = 3 the factor e−2t is below 0.003, so the complementary function has died away and the body moves as −24cos 5t + 18sin 5t, whose amplitude is √242 + 182 = √900 = 30 millimeters. A steady push of 300 newtons puts 750 on the right in place of 750sin 5t; its particular integral is the constant x = 75040 = 18.75 millimeters. So the undulations swing the body 3018.75 = 1.6 times as far as the same force held steady. Check: putting the particular integral back gives 15(−24) + 20(18) = 0 and 15(18) − 20(−24) = 750, as it must.

    −30018.75300123time, secondsheight x, mmparticular integralthe sumdies away30 mm each waydivide by 400, in mm: 4, 40 and 750r2+ 4r + 40 = 0, so r = −2 ± 6ithe CF shrinks by e−2every secondtry p cos + q sin, both at 5 rad/s15p + 20q = 0, 15q − 20p = 750p = −24, q = 18(a) A − 24 = 0, so A = 24−2A + 6B + 90 = 0, so B = −7(b) 242+ 182= 900: 30 mm each waysteady 300 N: 750 over 40 = 18.75 mm30 is 1.6 times 18.75
    −30018.75300123time, secondsheight x, mmparticular integralthe sumdies away30 mm each waydivide by 400, in mm: 4, 40 and 750r2+ 4r + 40 = 0, so r = −2 ± 6ithe CF shrinks by e−2every secondtry p cos + q sin, both at 5 rad/s15p + 20q = 0, 15q − 20p = 750p = −24, q = 18(a) A − 24 = 0, so A = 24−2A + 6B + 90 = 0, so B = −7(b) 242+ 182= 900: 30 mm each waysteady 300 N: 750 over 40 = 18.75 mm30 is 1.6 times 18.75
    (b) The complementary function dies away, leaving a swing of √242 + 182 = 30 millimeters each way, 1.6 times the 18.75 millimeters a steady 300 newtons would hold.

Answer: (a) x = e−2t(24cos 6t − 7sin 6t) − 24cos 5t + 18sin 5t millimeters; (b) the amplitude settles at 30 millimeters, 1.6 times the 18.75 millimeters at which a steady push of 300 newtons would hold the body

Common mistakes

  • Fitting the starting conditions to the complementary function before the particular integral is added. Applied to e−2t(Acos 6t + Bsin 6t) alone, x = 0 and dxdt = 0 make both constants 0, and the answer is the particular integral by itself, which starts at −24 millimeters rather than at rest. The conditions describe the whole motion, so they go on the whole solution.
  • Trying x = qsin 5t for the particular integral because the right side is a sine. The damping term differentiates the sine into a cosine, so the cosine terms must cancel as well, and with no cosine in the trial that asks for 20q = 0: there is then no particular integral at all. The trial needs both pcos 5t and qsin 5t.

More using integration problems, worked step by step →

Practice Complementary Function and Particular Integral in the app