Back to the on-screen lesson ·

Transforming an initial value problem

The transform of a derivative, and how it turns a second-order initial value problem into one rational function with both initial conditions already inside it.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

By the end of this lesson you will be able to state and apply the transform of a first and second derivative, transform a constant-coefficient initial value problem term by term, collect and divide to get the transform of the solution as a single rational function, read the characteristic polynomial off its denominator, and say why no arbitrary constants remain to be fitted.

2. What you already have

You can transform constants, powers, exponentials and sinusoids by linearity, and you can solve a constant-coefficient initial value problem by characteristic roots and then fitting two constants. This lesson replaces that two-pass process with one, and the rule that makes it possible is the transform of a derivative.

3. Words this lesson uses

TermWhat it means
$Y(s)$The transform of the unknown $y(t)$: the thing being solved for, in the new variable.
Subsidiary equationWhat the differential equation becomes after transforming: an algebraic equation in $Y$.
Characteristic polynomialThe denominator of $Y$, the same polynomial as in the classical method.
Derivative rule$\mathcal{L}\{y'\} = sY - y(0)$, which brings the initial value in automatically.

4. What the transform does to a derivative

Integrating $\int_0^{\infty} e^{-st}y'(t)\,dt$ by parts gives the one rule this whole unit rests on:

$$\mathcal{L}\{y'\} = sY(s) - y(0),$$

and applying it twice,

$$\mathcal{L}\{y''\} = s^{2}Y(s) - s\,y(0) - y'(0).$$

Two things happened at once. Differentiation became multiplication by $s$, which is why calculus turns into algebra. And the initial values appeared in the formula, which is why no arbitrary constants are left over at the end.

So for $ay'' + by' + cy = g(t)$ with $y(0)$ and $y'(0)$ given, transforming every term and collecting gives

$$(as^{2} + bs + c)\,Y(s) = G(s) + a\,(s\,y(0) + y'(0)) + b\,y(0),$$

and dividing leaves $Y(s)$ as a rational function whose denominator is the characteristic polynomial. Everything the problem contained — the equation, the forcing, both initial conditions — is in that one expression.

Another way: picture

A translator sitting between two rooms. In the first room the question is in the language of calculus and is hard; the translator carries it into the second room, where it is a question about fractions and is easy; the answer is carried back. The derivative rule is the translator's dictionary entry for the word differentiate, and it happens to translate the initial conditions in the same breath.

Another way: steps

  1. Transform every term, using the derivative rules where derivatives appear.
  2. Substitute the initial values as you apply those rules.
  3. Collect every $Y(s)$ on one side.
  4. Divide by the bracket, which is the characteristic polynomial.
  5. Invert — the next lesson — to get $y(t)$.

5. Reading the result before inverting it

$Y(s)$ can be read for information before any inversion is attempted, and the habit is worth having.

The denominator is the characteristic polynomial. Its roots are the characteristic roots, so they already say whether the solution grows, decays or oscillates, exactly as in unit 2.

The numerator carries the initial conditions and the forcing. A forced problem adds $G(s)$ to it, so the response splits visibly into a part driven by the initial state and a part driven by the forcing — and the two can be inverted separately.

There is also a free check. Multiplying $Y(s)$ by $s$ and letting $s$ grow recovers $y(0)$, so a numerator that disagrees with the initial value given in the question has an arithmetic error in it, found before any partial fractions are attempted.

6. Where this goes wrong

Forgetting that $y(0)$ appears twice. It is in the first-derivative rule as well as the second, and in $ay'' + by'$ it therefore arrives twice with different coefficients. Missing the $b\,y(0)$ term is the single most common error in this lesson.

Transforming only the left-hand side. The forcing has a transform too, and it belongs in the numerator.

Applying the initial conditions again at the end. They have already been used; doing it twice produces a contradiction or an answer that satisfies nothing.

Expecting the method to be shorter. For a plain homogeneous problem it is usually longer. It earns its place on forced problems, on discontinuous forcing, and on systems.

7. The method, step by step, and how to check it

Solving an initial value problem by the Laplace transform always follows the same four stages: transform, solve for $Y$, invert, check.

  1. Transform every term. Use the derivative rules

$$\mathcal{L}\{y'\} = sY - y(0), \qquad \mathcal{L}\{y''\} = s^{2}Y - sy(0) - y'(0),$$

and the table for the forcing. Write the initial values in as numbers straight away. 2. Collect the $Y$ terms on the left and everything else on the right. The coefficient of $Y$ is always the characteristic polynomial, which is a check on this step. 3. Divide by that polynomial to get $Y$ as a fraction, and factor its denominator. 4. Split into partial fractions and invert each piece from the table. 5. Check the solution in the equation and against both initial values.

Why the derivative rule holds. Integrate $\int_0^{\infty} e^{-st}y'(t)\,dt$ by parts: the boundary term is $\left[e^{-st}y\right]_0^{\infty} = 0 - y(0)$, and the remaining integral is $s\int_0^{\infty} e^{-st}y\,dt = sY$. So $\mathcal{L}\{y'\} = sY - y(0)$, and applying it twice gives the rule for $y''$. The initial value is not added by hand; it falls out of the integration by parts, which is why the method never needs constants fitted at the end.

How to check along the way. Before inverting, compute $\lim sY$ as $s \to \infty$: it must equal $y(0)$. For a second-order problem, $\lim s\left(sY - y(0)\right)$ must equal $y'(0)$. After inverting, put $t = 0$ into $y$ and $y'$, and substitute $y$ into the equation. If the forcing is a constant, the solution should settle at the constant divided by the coefficient of $y$ when every other root decays.

The most common error is losing the second appearance of $y(0)$: in $ay'' + by'$ it enters as $-asy(0)$ from the first term and $-by(0)$ from the second.

8. The forcing, and when the method pays

The forcing is transformed with the same table as everything else, and it always lands on the right-hand side, added to the terms that carry the initial values. That is what makes the method attractive for forced problems: the response splits into $\frac{\text{initial terms}}{P(s)}$ and $\frac{G(s)}{P(s)}$, where $P$ is the characteristic polynomial and $G$ the transformed forcing. The first piece is what the system does if it is released and left alone; the second is what the forcing adds from a standing start. Each can be inverted on its own and the two added, and each has a physical meaning worth saying out loud.

Compare the two routes on $y'' + 3y' + 2y = 4$. By undetermined coefficients you find $y_h$, guess $y_p = A$, assemble, differentiate and solve two equations for the constants. By transform you do one piece of algebra and one partial-fraction split, and the constants never appear. For a homogeneous problem the classical route is usually quicker; once there is a forcing, and especially one switched on or off part-way through, the transform is.

9. In the world: a car's speed after the cruise control is set

Set a car's cruise control and its speed $v$ does not jump to the new value; it approaches it. A simple model is $\tau v' + v = Ku$, where $u$ is the throttle setting, $K$ the speed that setting eventually gives and $\tau$ the time constant of the car's response. Starting from $v(0) = 0$ with the throttle stepped to $u = 1$ at $t = 0$, transform every term:

$$\tau(sV - 0) + V = \frac{K}{s} \quad\Rightarrow\quad V = \frac{K}{s(\tau s + 1)}.$$

Split it: $\frac{K}{s(\tau s + 1)} = \frac{K}{s} - \frac{K\tau}{\tau s + 1} = \frac{K}{s} - \frac{K}{s + 1/\tau}$, and invert: $v = K\left(1 - e^{-t/\tau}\right)$.

With $K = 30$ metres a second and $\tau = 5$ seconds, after $10$ seconds $v = 30(1 - e^{-2}) \approx 25.9$ metres a second, and the car is within $1\%$ of the target after $5\ln 100 \approx 23$ seconds. The transform method did the initial condition, the forcing and the solving in one pass, and the same pass handles a throttle that is changed partway through, which the next lessons use.

10. In the world: an electrical circuit released from charge

A capacitor charged to $Q_0$ and connected to an inductor, with no resistance, holds a charge that obeys $Lq'' + \frac{q}{C} = 0$, with $q(0) = Q_0$ and no current at the start, $q'(0) = 0$. Transform with the second-derivative rule:

$$L\left(s^{2}Q - sQ_0 - 0\right) + \frac{Q}{C} = 0 \quad\Rightarrow\quad Q = \frac{Q_0s}{s^{2} + \frac{1}{LC}},$$

which is a cosine entry of the table: $q = Q_0\cos\frac{t}{\sqrt{LC}}$. With $L = 10$ millihenries and $C = 100$ microfarads, $LC = 10^{-6}$, so the charge oscillates at $1000$ radians a second, about $159$ hertz, sloshing between the two plates for ever in this idealised circuit.

Notice what did not happen: no constants were fitted at the end. Both initial values went into the transform in the first line, which is the practical reason circuit designers solve with transforms. A real circuit has some resistance, adds a term $RsQ$, and the transform becomes a shifted cosine and sine: the decaying ringing of lesson 8, read off the same table.

11. In the world: why engineers prefer transforms to guessing

A forced problem with an input that switches on, off or changes shape partway through would need a new guess and new constants on every stretch by the methods of unit 2. The transform needs one pass and the table, which is why simulation software for circuits and control systems works in $s$.

Consider a heater switched on at full power for ten minutes and then turned to half power. By the classical route the problem is solved twice, once on each stretch, with the end of the first solution becoming the initial condition of the second, and a mistake at the join spoils everything after it. By transform the input is one expression, full power minus half power delayed by ten minutes, its transform is one fraction, and the answer comes out whole, correct on both stretches and continuous at the join without being told to be. Lesson 16 builds exactly this, and it is the same one-pass calculation as in this lesson, with a factor of $e^{-10s}$ added. For a system with several inputs switching at different times, the saving is the difference between a page of bookkeeping and a few lines.

12. Multiplication by $s$ is differentiation, and the initial value is the price

The rule is often remembered as differentiating becomes multiplying by $s$, with the $-y(0)$ treated as a detail to be tidied up. It is the opposite: the $-y(0)$ is the substantive part, and it is there because the integration by parts that proves the rule leaves a boundary term at $t = 0$. Dropping it does not make the answer slightly wrong; it makes the method solve a different problem, one with zero initial data, and the resulting $Y(s)$ has the right denominator and a numerator belonging to somebody else's question. The habit that prevents it is to write both rules out in full every time, before substituting anything.

13. A homogeneous problem, in one pass

  1. Solve $y'' - y = 0$ with $y(0) = 2$, $y'(0) = 0$. Transform both terms.

    $\left(s^{2}Y - s \cdot 2 - 0\right) - Y = 0$

    Both initial values enter through the second-derivative rule.

  2. Collect the $Y$ terms and move $2s$ across.

    $(s^{2} - 1)Y = 2s$

    Add $2s$ to both sides. The bracket is the characteristic polynomial.

  3. Divide both sides by $s^{2} - 1$.

    $Y = \dfrac{2s}{s^{2} - 1}$

    The whole solution is now in this one fraction.

  4. Check the initial value from the transform.

    $sY = \dfrac{2s^{2}}{s^{2} - 1} \to 2 = y(0) \quad \text{as } s \to \infty$

    Divide top and bottom by $s^{2}$ to see the limit. The numerator agrees with the given $y(0)$.

  5. Split into partial fractions over $(s - 1)(s + 1)$.

    $\dfrac{2s}{(s - 1)(s + 1)} = \dfrac{1}{s - 1} + \dfrac{1}{s + 1}$

    Check by recombining: $\frac{(s + 1) + (s - 1)}{(s - 1)(s + 1)} = \frac{2s}{s^{2} - 1}$.

  6. Invert each term from the table.

    $y = e^{t} + e^{-t} = 2\cosh t$

    $\frac{1}{s - a}$ inverts to $e^{at}$. Check: $y(0) = 2$ and $y'(0) = 1 - 1 = 0$.

14. A forced problem, where the method earns its keep

  1. Solve $y' + 3y = e^{-t}$ with $y(0) = 4$. Transform every term, the forcing included.

    $sY - 4 + 3Y = \dfrac{1}{s + 1}$

    The forcing is transformed with the table like everything else.

  2. Collect the $Y$ terms and add $4$ to both sides.

    $(s + 3)Y = 4 + \dfrac{1}{s + 1}$

    Adding $4$ moves the initial value across.

  3. Divide both sides by $s + 3$.

    $Y = \dfrac{4}{s + 3} + \dfrac{1}{(s + 1)(s + 3)}$

    The first term is the response to the initial state and the second to the forcing; each inverts on its own.

  4. Split the forced term into partial fractions.

    $\dfrac{1}{(s + 1)(s + 3)} = \dfrac{\frac{1}{2}}{s + 1} - \dfrac{\frac{1}{2}}{s + 3}$

    Cover up $s + 1$ and put $s = -1$: $\frac{1}{2}$. Cover up $s + 3$ and put $s = -3$: $\frac{1}{-2}$.

  5. Combine the two terms over $s + 3$.

    $Y = \dfrac{4 - \frac{1}{2}}{s + 3} + \dfrac{\frac{1}{2}}{s + 1} = \dfrac{\frac{7}{2}}{s + 3} + \dfrac{\frac{1}{2}}{s + 1}$

    Like denominators add their numerators.

  6. Invert from the table.

    $y = \dfrac{7}{2}e^{-3t} + \dfrac{1}{2}e^{-t}$

    $\frac{1}{s + a}$ inverts to $e^{-at}$.

  7. Check the solution in the equation and at the start.

    $y' + 3y = \left(-\dfrac{21}{2} + \dfrac{21}{2}\right)e^{-3t} + \left(-\dfrac{1}{2} + \dfrac{3}{2}\right)e^{-t} = e^{-t}, \qquad y(0) = \dfrac{7}{2} + \dfrac{1}{2} = 4$

    The equation and the condition both hold, and nothing had to be fitted at the end.

15. A second-order forced problem, both initial values used

  1. Solve $y'' + 3y' + 2y = 4$ with $y(0) = 1$, $y'(0) = 0$. Transform each derivative with its rule.

    $\mathcal{L}\{y''\} = s^{2}Y - s, \qquad \mathcal{L}\{y'\} = sY - 1$

    $y(0) = 1$ appears in both rules; $y'(0) = 0$ only in the first.

  2. Transform the whole equation, the constant forcing included.

    $(s^{2}Y - s) + 3(sY - 1) + 2Y = \dfrac{4}{s}$

    $\mathcal{L}\{4\} = \frac{4}{s}$. Note the $-3$: the initial value arrives a second time through $3y'$.

  3. Collect the $Y$ terms and move the rest across.

    $(s^{2} + 3s + 2)Y = s + 3 + \dfrac{4}{s} = \dfrac{s^{2} + 3s + 4}{s}$

    Add $s + 3$ to both sides, then write the right side over one denominator.

  4. Divide by the characteristic polynomial, factored.

    $Y = \dfrac{s^{2} + 3s + 4}{s(s + 1)(s + 2)}$

    $s^{2} + 3s + 2 = (s + 1)(s + 2)$.

  5. Find the partial-fraction coefficients by covering up each factor.

    $A = \dfrac{4}{1 \cdot 2} = 2, \qquad B = \dfrac{1 - 3 + 4}{(-1)(1)} = -2, \qquad C = \dfrac{4 - 6 + 4}{(-2)(-1)} = 1$

    For $\frac{A}{s}$ put $s = 0$ in the rest; for $\frac{B}{s + 1}$ put $s = -1$; for $\frac{C}{s + 2}$ put $s = -2$.

  6. Invert term by term.

    $Y = \dfrac{2}{s} - \dfrac{2}{s + 1} + \dfrac{1}{s + 2} \quad\Rightarrow\quad y = 2 - 2e^{-t} + e^{-2t}$

    $\frac{1}{s}$ inverts to $1$ and $\frac{1}{s + a}$ to $e^{-at}$.

  7. Check both conditions and the equation.

    $y(0) = 2 - 2 + 1 = 1, \quad y'(0) = 2 - 2 = 0; \qquad y'' + 3y' + 2y = (-2 + 6 - 4)e^{-t} + (4 - 6 + 2)e^{-2t} + 4 = 4$

    With $y' = 2e^{-t} - 2e^{-2t}$ and $y'' = -2e^{-t} + 4e^{-2t}$, everything holds. The constant $2$ is the steady state $\frac{4}{2}$.

16. Your turn: transform $y'' + 4y = 0$ with $y(0) = 0$ and $y'(0) = 6$

  1. Transform $y''$ with the initial values.

    $\mathcal{L}\{y''\} = s^{2}Y - s \cdot 0 - 6 = s^{2}Y - 6$

    A zero initial value removes a whole term.

  2. Your turn: work this step out. Its working is at the end of the packet.

    Transform the equation, collect and divide.

  3. Your turn: work this step out. Its working is at the end of the packet.

    Recognise a multiple of a table entry and invert.

17. Guided practice

Put the steps of solving $y'' + 6y' + 3y = 0$ with $y(0) = 2$ into the order they must be done.

Number the steps in order (write the number in the box):

18. Guided practice

Complete the worked solution: transform $y'' + 6y' + 3y = 0$ with $y(0) = 5$ and $y'(0) = 1$, and solve for $Y(s)$.

  1. Transform $y''$, putting in both initial values.

    $\mathcal{L}\{y''\} = s^{2}Y - s\,y(0) - y'(0) = s^{2}Y - 5s - 1$

    The second-derivative rule uses $y(0)$ and $y'(0)$.

  2. Transform $6y'$ and multiply out the bracket.

    $6\mathcal{L}\{y'\} = 6\left(sY - 5\right) = 6sY - 6 \cdot 5, \qquad 6 \cdot 5 =$ m

    The coefficient multiplies both terms of $sY - y(0)$.

  3. Add the transformed terms, then move every term without $Y$ to the right.

    $\left(s^{2} + 6s + 3\right)Y = 5s + 1 + 6 \cdot 5$

    Adding the same terms to both sides moves them across with their signs changed.

  4. Add the two constants on the right.

    $1 + 6 \cdot 5 =$ z

    The numerator's constant collects $y'(0)$ and the coefficient times $y(0)$.

  5. Divide both sides by the bracket.

    $\dfrac{\left(s^{2} + 6s + 3\right)Y}{s^{2} + 6s + 3} = \dfrac{5s + 1 + 6 \cdot 5}{s^{2} + 6s + 3} \quad\Rightarrow\quad Y(s) = \dfrac{5s + 1 + 6 \cdot 5}{s^{2} + 6s + 3}$

    The bracket multiplying $Y$ is the characteristic polynomial; dividing leaves $Y$ alone.

19. Guided practice

Transform $y'' + 4y' + 7y = 0$ with $y(0) = 2$ and $y'(0) = 6$. The result is $Y(s)$ as one fraction; fill in its four coefficients.

Coefficient
Numerator: the coefficient of $s$
Numerator: the constant
Denominator: the coefficient of $s$
Denominator: the constant

20. Practice

Transform $y'' + 6y' + 7y = 0$ with $y(0) = 4$, $y'(0) = 5$, and solve for $Y(s)$. Write it as a single fraction in $s$.

Answer:

21. Practice

Transform $y'' + 5y' + 3y = 0$ with $y(0) = 3$ and $y'(0) = 5$. What is the constant term of the numerator of $Y(s)$?

Answer:

22. Practice

A frictionless mass on a spring is pulled out $3$ centimetres and pushed, and its displacement $y$ after $t$ seconds obeys the equation below. Solve $y'' + 4y = 0$ with $y(0) = 3$ and $y'(0) = 4$ by the Laplace transform. Write $y$ as a formula in $t$ (type cos(...) and sin(...)).

Answer:

23. Somewhere new

Solving $y'' + 2y' + 2y = 0$ by characteristic roots leaves two constants to be fitted at the end. Solving it by transforming leaves none. Why?

24. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

25. Test question

A frictionless mass on a spring is pulled out $1$ centimetres and pushed, and its displacement $y$ after $t$ seconds obeys the equation below. Solve $y'' + 16y = 0$ with $y(0) = 1$ and $y'(0) = 16$ by the Laplace transform. Write $y$ as a formula in $t$ (type cos(...) and sin(...)).

Answer:

26. What you can do now

You can transform an initial value problem and solve for the transform of its solution in one pass. Say in your own words where the initial conditions enter, and why nothing is left to fit at the end.

Working for the steps left to you

16. Your turn: transform $y'' + 4y = 0$ with $y(0) = 0$ and $y'(0) = 6$, step 2

$s^{2}Y - 6 + 4Y = 0 \;\Rightarrow\; (s^{2} + 4)Y = 6 \;\Rightarrow\; Y = \dfrac{6}{s^{2} + 4}$

Add $6$ to both sides, then divide by $s^{2} + 4$.

16. Your turn: transform $y'' + 4y = 0$ with $y(0) = 0$ and $y'(0) = 6$, step 3

$Y = 3 \cdot \dfrac{2}{s^{2} + 2^{2}} \quad\Rightarrow\quad y = 3\sin 2t, \qquad y'(0) = 6\cos 0 = 6$

The denominator carried the frequency; only the numerator depended on how hard the system was struck.