Learn
Lesson · Laplace Transforms · Switched forcing and a comparison

Three Methods, One Equation

One forced initial value problem solved two ways, and a first-order one solved a third. Undetermined coefficients guesses a particular solution, adds the homogeneous one and fits two constants. The Laplace transform puts the starting values in at the first line and ends with a table read backwards. The two give the same function, and the reason is that an initial value problem has one solution. Each method has a kind of problem it is best at.

y_p + y_h, then fit two constants transform, solve for Y, invert the answers agree: the solution is unique residual 0 settles any doubt switched forcing favours the transform
Two routes and one referee

Core ideas

What this lesson establishes

Three ideas: each method's route, why the answers must agree, and how to choose.

1

Undetermined coefficients goes through a general solution

Guess a particular solution y_p with the shape of the forcing, add the homogeneous solution y_h with two unknown constants, and fit the constants to the starting values with a 2×2 system. The constants are found last.

2

The transform puts the starting values in first

Transform both sides, with y(0) and y′(0) inside the derivative rules, and solve for Y. Partial fractions and the table finish the job. No general solution is written and no system for constants is solved.

3

They must agree, and substitution shows it

Two solutions of the same initial value problem differ by a solution of the homogeneous equation that starts at zero, and that is zero. So the routes return the same function. The lab's residual 0 is the test on any single answer, starting values included.

The material

One equation, solved twice and then a third time

The constant-force equation by both second-order routes, a proof that they agree, the first-order case by a third route, and when to choose which.

Take y″ + 3y′ + 2y = 4 with y(0) = 0 and y′(0) = 0. The forcing is constant, so the first route guesses a constant. If y_p = K, then y_p′ = 0 and y_p″ = 0, and the equation reads 2K = 4, so y_p = 2. The homogeneous equation has the characteristic roots −1 and −2, so y_h = C₁·e^(−t) + C₂·e^(−2t). The general solution is y = 2 + C₁·e^(−t) + C₂·e^(−2t).

Fitting the constants takes two equations. From y(0) = 0: 2 + C₁ + C₂ = 0, so C₁ + C₂ = −2. From y′(0) = 0, with y′ = −C₁·e^(−t) − 2C₂·e^(−2t): −C₁ − 2C₂ = 0. Adding the two equations gives −C₂ = −2, so C₂ = 2 and C₁ = −4.

The second route starts at the same equation. Transforming gives (s² + 3s + 2)·Y = 4/s, so Y = 4/(s·(s + 1)·(s + 2)). The roots give the coefficients: 4/(1·2) = 2 at s = 0, 4/((−1)·1) = −4 at s = −1, and 4/((−2)·(−1)) = 2 at s = −2. So Y = 2/s − 4/(s + 1) + 2/(s + 2), and the table backwards gives y = 2 − 4·e^(−t) + 2·e^(−2t).

undetermined coefficients: y = 2 − 4e^(−t) + 2e^(−2t) Laplace transform: y = 2 − 4e^(−t) + 2e^(−2t)

The same function from two directions. The lab prints this solution and its residual in the original equation and starting values, residual 0, so the check does not rest on reading two lines and judging them alike.

Theorem · The routes agree

If y₁ and y₂ both satisfy y″ + 3y′ + 2y = 4 with y(0) = 0 and y′(0) = 0, then y₁ = y₂.

Let d = y₁ − y₂. Because the equation is linear, the 4 cancels and d satisfies the homogeneous equation, with d(0) = 0 and d′(0) = 0.

So d = C₁·e^(−t) + C₂·e^(−2t), and the starting values give C₁ + C₂ = 0 and −C₁ − 2C₂ = 0. Adding them gives −C₂ = 0, so C₂ = 0 and C₁ = 0. The other kinds of root end the same way, because the 2×2 system for the constants has a nonzero determinant, the Wronskian at 0 of “Superposition and the Wronskian” in Second-Order Linear Equations.

□

A third route for a first-order equation

The equation y′ + 2y = e^t with y(0) = 0 has a third route, the integrating factor. With μ = e^(2t) the left side times μ is (e^(2t)·y)′, and the right side is e^(3t). So e^(2t)·y = e^(3t)/3 + C, and y(0) = 0 gives C = −1/3. The result is y = e^t/3 − e^(−2t)/3.

The transform gives (s + 2)·Y = 1/(s − 1), so Y = 1/((s − 1)(s + 2)). At s = 1 the coefficient is 1/3, and at s = −2 it is −1/3. Undetermined coefficients guesses A·e^t: A + 2A = 1, so A = 1/3, and the starting value gives the constant −1/3. All three return e^t/3 − e^(−2t)/3.

For the cosine-force preset, y″ + 4y = 3cos(t) from rest, undetermined coefficients guesses A·cos(t): −A + 4A = 3, so A = 1, and the starting values give C₁ = −1 and C₂ = 0. The transform gives Y = 3s/((s² + 1)(s² + 4)) = s/(s² + 1) − s/(s² + 4). Both give y = cos(t) − cos(2t).

When to choose which

  • Undetermined coefficients is shortest when the forcing is one of the shapes it guesses, and when what you want is the long-run response, the particular solution itself.
  • The transform is shortest when the forcing switches on or off, since the step is one factor, and when the starting values are not zero, since they go in at the first line.
  • The integrating factor needs a first-order equation, and then works for any forcing that can be integrated against μ.
  • Substitution is not a method but a referee. Whichever route is used, put the answer in the equation and its starting values.

Interactive

The Laplace transform

Transforms, partial fractions and solutions, exactly

The Laplace transformfunctions of t as exact rational functions of s
the function of t, drawn from its closed form

Method

Solving one equation twice

Do both routes, compare, and let substitution decide any disagreement.

1

Solve by undetermined coefficients

Guess y_p with the forcing's shape, solve for its coefficient, add y_h with two constants.

2

Fit the constants

Put y(0) and y′(0) into the general solution and its derivative, and solve the 2×2 system.

3

Solve by transform

Transform both sides with the starting values inside, solve for Y, decompose and invert.

4

Compare

Match the two functions term by term. A mismatch is an arithmetic slip in one route.

5

Substitute

Put the suspect answer into the equation and the starting values. The residual must be zero.

Comparing the routes

Score 0 / 0

y″ + 3y′ + 2y = 4 from rest, two ways

The first preset: the constants fitted on one side and the fractions on the other.

y_p = 2 (2K = 4) y = 2 + C₁·e^(−t) + C₂·e^(−2t) C₁ + C₂ = −2, −C₁ − 2C₂ = 0 C₂ = 2, C₁ = −4 Y = 4/(s·(s + 1)·(s + 2)) = 2/s − 4/(s + 1) + 2/(s + 2) y = 2 − 4e^(−t) + 2e^(−2t)

Both lines end at the same function. Check the starting values once: y(0) = 2 − 4 + 2 = 0 and y′(0) = 4 − 4 = 0. The lab reports residual 0 for the equation.

The two routes differ in where the work falls. The first found the constants last, from a 2×2 system. The second found them as the coefficients of the fractions, and the starting values never needed a separate step.

Common mistakes

1
The three methods are three theories that may disagreeA reader who gets 2 − 4e^(−t) + 2e^(−2t) from one route and 2 − 2e^(−t) + 2e^(−2t) from the other may conclude that the methods give different answers. The second has y(0) = 2 and not 0, so it is wrong on its face. The routes are one theory run in different orders, and the uniqueness result says they cannot disagree.
2
Applying the starting values to y_p aloneRequiring the particular solution itself to start at 0 is wrong, since y_p = 2 starts at 2. The conditions belong to the whole of y_p + y_h, which is why the constants C₁ and C₂ are fitted after the two are added. Fitting them to y_h alone gives C₁ = C₂ = 0 and the answer y = 2, which starts at 2.
3
Transforming the forcing as if it were a numberIn (s² + 3s + 2)·Y = 4/s the right side is 4/s, not 4. Using 4 gives Y = 4/((s + 1)(s + 2)) and the solution 4e^(−t) − 4e^(−2t), which starts at 0 but has y′(0) = −4 + 8 = 4, not 0. A constant forcing has the transform c/s, and the pole at 0 is the particular solution.

Check your understanding

✓
Finish when you can solve one forced initial value problem by undetermined coefficients and by the transform, check that the answers agree, and say which method suits a given problem.

You should be able to fit the constants from a 2×2 system, decompose the transform of the answer, compare the two results term by term, and verify the answer by substitution.

Note: That closes the transform: the table, the derivative rule, the poles and the switch. The same problems are solved elsewhere by other means, and the answer is the same function.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.