Laplace Transforms for Piecewise Forcing
A lesson on encoding switching inputs with unit steps, solving an initial-value problem using Laplace transforms, and checking the solution across a switch.
Encode switches and shift delayed terms
Encode switches with unit steps
A unit step represents an input that changes abruptly at a specified time. At time ,
For example, a force that is before and from onward can be written
Before the switch, , so the force is . At and after the switch, , so the force becomes . More generally, if a forcing changes from to at , write
Before , the step contributes nothing and leaves . After , it adds the difference between the new and old forcing, giving .
Shift delayed terms
The says that if , then
The exponential factor in the transform domain signals a delay in time. Crucially, the delay applies to the entire function: the inverse transform contains , not . Thus, when inverting a term multiplied by , first identify the rest as , find its inverse , and then write .
Solve the initial-value problem
Solve the initial-value problem
Consider the source example
where the force is for and for . Set . Since the force drops by 2 at the switch, its unit-step form is
Let . Use the initial conditions in the derivative transform:
Transforming both sides of the differential equation therefore gives
Isolate by moving the initial-condition terms to the right and dividing by :
Now invert each part. The ordinary, non-delayed terms use
,
, and
. For the term containing , apply the to the whole factor : its inverse is , so its delayed version is . Combining the terms yields
Before the switch the step is zero, giving . Afterward, substitute , so , to obtain .
Check the solution at the switch
Check the solution at the switch
A solution to a piecewise-forced problem should be checked in three ways: test the initial conditions, verify the equation on each interval, and compare the one-sided values of the solution and its first derivative at the switch. For this example, the interval formulas are
At the initial time, the first formula gives . Its derivative is , so , as required.
At , the left formula gives , and the right formula gives . Thus the one-sided values of agree. The derivatives on the two intervals are, respectively,
Both give at the switch, so is continuous there as well.
Finally, differentiate again and check the equation separately on the open intervals. Before the switch, , hence . After it, , hence . These match the forcing on their respective intervals.
The second derivative need not be continuous: its left-hand limit at the switch is , while its right-hand limit is . For an ordinary differential equation with piecewise-continuous forcing, it is and that remain continuous; may jump. The equation is checked on the open intervals between switches, and at the switching instant the relevant check is the one-sided behavior—not a requirement that the differential equation hold there using a single value of the discontinuous forcing.
: The unit step u(t-a) is 0 for t<a and 1 for t≥a.