Differential Equations › Section D · Laplace transforms › Topic D.7

Problems with step functions

This is where Laplace transforms leave the older methods behind. An input that switches on, off or changes formula partway through is handled in a single calculation, with the switching times carried along by exponential factors.

Where the transform pays off

A heater that runs for ten minutes and then stops, a load added to a beam at a given moment, a voltage that ramps up and then holds steady: all give equations whose forcing changes formula at certain times. Without transforms you must solve on each interval separately and match the solution across every switch. With them, the topic Step functions lets you write the forcing as one formula, the second shifting theorem transforms it, and the method from Solving initial value problems does the rest. The exponential factors \(e^{-cs}\) remember where each switch happens.

The strategy

1. Write the forcing with steps, and put every stepped term in the form \(u_c(t)f(t - c)\), rewriting where needed. 2. Transform the equation and solve for \(Y(s)\). 3. Group \(Y\) by exponential factor:

Y = F_0(s) + e^{-c_1s}F_1(s) + e^{-c_2s}F_2(s) + \dots

4. Invert each \(F_k\) separately, with partial fractions as needed, ignoring its exponential. 5. Reassemble: \(y = f_0(t) + u_{c_1}(t)f_1(t - c_1) + \dots\). Never include the exponential inside partial fractions. It is not a polynomial, so it would wreck the algebra; it only signals a shift.

Worked example: a switch turned on

Solve \(y' + 2y = 4u_3(t)\) with \(y(0) = 1\). 1. Transform: \(sY - 1 + 2Y = \frac{4e^{-3s}}{s}\). 2. Solve:

Y = \frac{1}{s + 2} + e^{-3s}\frac{4}{s(s + 2)}

3. The unshifted part \(\frac{1}{s + 2}\) inverts to \(e^{-2t}\). 4. Partial fractions give \(\frac{4}{s(s + 2)} = \frac{2}{s} - \frac{2}{s + 2}\), with inverse \(f_1(t) = 2 - 2e^{-2t}\). 5. Shift and switch on at 3:

y = e^{-2t} + u_3(t)\big(2 - 2e^{-2(t - 3)}\big)

Check: before \(t = 3\) only \(e^{-2t}\) is present, the free decay from \(y(0) = 1\).

Reading the answer

Written piece by piece, the solution is \(y = e^{-2t}\) for \(t < 3\) and \(y = 2 + e^{-2t} - 2e^{-2(t - 3)}\) for \(t \ge 3\). At \(t = 3\) both formulas give \(e^{-6}\), so \(y\) is continuous, although \(y'\) jumps by 4, the size of the switched input. As \(t \to \infty\) both exponentials die away and \(y \to 2\), the equilibrium of \(y' + 2y = 4\). Writing the pieces out like this is the best way to read an answer: it shows what happens before, at and after each switch, and it makes the continuity check easy.

The same problem without transforms

For comparison, solve the last example piece by piece. On \([0, 3)\) the equation is \(y' + 2y = 0\) with \(y(0) = 1\), so \(y = e^{-2t}\) and \(y(3) = e^{-6}\). From \(t = 3\) on it is \(y' + 2y = 4\), with general solution \(2 + Ke^{-2(t - 3)}\). Continuity at 3 requires \(2 + K = e^{-6}\), so \(K = e^{-6} - 2\), which gives the same formula. One switch already costs two solutions and a matching step. With several switches, or a second order equation that needs \(y\) and \(y'\) matched at each one, the transform's single pass is much shorter.

Worked example: a pulse on a spring

Solve \(y'' + 4y = g(t)\), where \(g = 8\) for \(0 \le t < 2\) and 0 afterwards, starting from rest. 1. Write \(g = 8 - 8u_2(t)\). 2. Transform: \((s^2 + 4)Y = \frac{8}{s} - \frac{8e^{-2s}}{s}\), so \(Y = (1 - e^{-2s})\frac{8}{s(s^2 + 4)}\). 3. From Inverse Laplace transforms, \(\frac{8}{s(s^2 + 4)}\) inverts to \(f(t) = 2 - 2\cos 2t\). 4. So

y = 2 - 2\cos 2t - u_2(t)\big(2 - 2\cos(2(t - 2))\big)

Check: for \(t \ge 2\) the constants cancel, leaving \(y = 2\cos(2t - 4) - 2\cos 2t\), an undamped oscillation about 0 once the force is removed.

How smooth is the solution?

A step in the forcing does not make the solution jump. For a second order equation with leading coefficient 1, such as \(y'' + 4y = g\), the forcing jump appears in \(y''\) only: \(y\) and \(y'\) stay continuous, and \(y''\) jumps by exactly the jump in \(g\). In the pulse example, \(g\) drops by 8 at \(t = 2\), so \(y''\) drops by 8 there. Similarly, in a first order equation \(y' + py = g\), \(y\) is continuous and \(y'\) jumps. This gives a quick test: if your solution itself jumps at a switching time, something has gone wrong.

Worked example: forcing that needs rewriting

Solve \(y' + y = t\,u_2(t)\) with \(y(0) = 0\). 1. The forcing is not shifted, so transform \(g(t + 2) = t + 2\):

\mathcal{L}\{tu_2(t)\} = e^{-2s}\Big(\frac{1}{s^2} + \frac{2}{s}\Big)

2. Solve: \(Y = e^{-2s}\frac{2s + 1}{s^2(s + 1)}\). 3. Partial fractions:

\frac{2s + 1}{s^2(s + 1)} = \frac{1}{s} + \frac{1}{s^2} - \frac{1}{s + 1}

so \(f(t) = 1 + t - e^{-t}\). 4. Shift by 2: \(y = u_2(t)\big(1 + (t - 2) - e^{-(t - 2)}\big)\), that is \(u_2(t)\big(t - 1 - e^{-(t - 2)}\big)\). Check: at \(t = 2\) this gives \(2 - 1 - 1 = 0\), so \(y\) is continuous, and for \(t > 2\), \(y' + y = t\).

Common mistakes to avoid

Transforming \(u_c(t)g(t)\) as \(e^{-cs}G(s)\) without first shifting \(g\). Putting \(e^{-cs}\) inside the partial fractions instead of setting it aside. Shifting only the obvious \(t\) when inverting: in \(f_1(t) = 2 - 2e^{-2t}\) the \(t\) inside the exponential must become \(t - 3\) as well. Forgetting the step in the final answer, which switches a term on too early. Writing the jump in the forcing as its new value rather than the change. Skipping the continuity check at each switch.

Key takeaways

Write the forcing with steps in the shifted form \(u_c(t)f(t - c)\), transform, and solve for \(Y\). Group \(Y\) by exponential factors, invert each coefficient separately, then shift by \(c\) and switch on at \(c\). Exponentials never enter partial fractions. Write the answer piece by piece to read it. Step forcing leaves the solution continuous: in second order problems \(y\) and \(y'\) are continuous and \(y''\) jumps by the jump in the forcing, so a jump in \(y\) signals an error.

Flashcards

Flashcard

Strategy for step forcing

Shift, transform, solve, group by e^(-cs), invert, reassemble

Exponentials only mark shifts.

Test your understanding

Question 1 of 5

Transforming y′ + y = 3u₁(t) with y(0) = 0 and solving gives which Y(s)?

Question 2 of 5

What is the solution of y′ + y = 3u₁(t) with y(0) = 0?

Question 3 of 5

For y″ + 4y = g(t), where g jumps by 8 at a switching time, what happens there?

Question 4 of 5

A forcing is 5 for 0 ≤ t < 2 and 0 afterwards. What is its Laplace transform?

Question 5 of 5

What is the solution of y″ + y = u_π(t) with y(0) = 0 and y′(0) = 0?

← Previous topicNext topic →