7.5: Constant Coefficient Equations with Piecewise Continuous Forcing Functions
- Page ID
- 134375
( \newcommand{\kernel}{\mathrm{null}\,}\)
We’ll now consider initial value problems of the form
ay″+by′+cy=f(t),y(0)=k0,y′(0)=k1,
where a, b, and c are constants (a≠0) and f is piecewise continuous on [0,∞). Problems of this kind occur in situations where the input to a physical system undergoes instantaneous changes, as when a switch is turned on or off or the forces acting on the system change abruptly.
It can be shown (Exercises 8.5.23 and 8.5.24) that the differential equation in Equation ??? has no solutions on an open interval that contains a jump discontinuity of f. Therefore we must define what we mean by a solution of Equation ??? on [0,∞) in the case where f has jump discontinuities. The next theorem motivates our definition. We omit the proof.
Theorem 7.5.1
Suppose a,b, and c are constants (a≠0), and f is piecewise continuous on [0,∞). with jump discontinuities at t1, …, tn, where
0<t1<⋯<tn.
Let k0 and k1 be arbitrary real numbers. Then there is a unique function y defined on [0,∞) with these properties:
- y(0)=k0 and y′(0)=k1.
- y and y′ are continuous on [0,∞).
- y″ is defined on every open subinterval of [0,∞) that does not contain any of the points t1, …, tn, and ay″+by′+cy=f(t) on every such subinterval.
- y″ has limits from the right and left at t1, …, tn.
We define the function y of Theorem 7.5.1 to be the solution of the initial value problem Equation ???.
We begin by considering initial value problems of the form
ay″+by′+cy={f0(t),0≤t<t1,f1(t),t≥t1,y(0)=k0,y′(0)=k1,
where the forcing function has a single jump discontinuity at t1.
Howto: Solve Constant Coefficient Equations with Piecewise Continuous Forcing Functions
We can solve Equation ??? by the these steps:
- Step 1. Find the solution y0 of the initial value problem ay″+by′+cy=f0(t),y(0)=k0,y′(0)=k1.
- Step 2. Compute c0=y0(t1) and c1=y′0(t1).
- Step 3. Find the solution y1 of the initial value problem ay″+by′+cy=f1(t),y(t1)=c0,y′(t1)=c1.
- Step 4. Obtain the solution y of Equation ??? as y={y0(t),0≤t<t1y1(t),t≥t1.
It is shown in Exercise 8.5.23 that y′ exists and is continuous at t1. The next example illustrates this procedure.
Example 7.5.1
Solve the initial value problem
y″+y=f(t),y(0)=2,y′(0)=−1,
where
f(t)={1,0≤t<π2,−1,t≥π2.

Solution
The initial value problem in Step 1 is
y″+y=1,y(0)=2,y′(0)=−1.
We leave it to you to verify that its solution is
y0=1+cost−sint.
Doing Step 2 yields y0(π/2)=0 and y′0(π/2)=−1, so the second initial value problem is
y″+y=−1,y(π2)=0,y′(π2)=−1.
We leave it to you to verify that the solution of this problem is
y1=−1+cost+sint.
Hence, the solution of Equation ??? is
y={1+cost−sint,0≤t<π2,−1+cost+sint,t≥π2
If f0 and f1 are defined on [0,∞), we can rewrite Equation ??? as
ay″+by′+cy=f0(t)+u(t−t1)(f1(t)−f0(t)),y(0)=k0,y′(0)=k1,
and apply the method of Laplace transforms. We’ll now solve the problem considered in Example [example:8.5.1} by this method.
Example 7.5.2
Use the Laplace transform to solve the initial value problem
y″+y=f(t),y(0)=2,y′(0)=−1,
where
f(t)={−1,0≤t<π2,−1,t≥π2.
Solution
Here
f(t)=1−2u(t−π2),
so Theorem 7.5.1 (with g(t)=1) implies that
L(f)=1−2e−πs/2s.
Therefore, transforming Equation ??? yields
(s2+1)Y(s)=1−2e−πs/2s−1+2s,
so
Y(s)=(1−2e−πs/2)G(s)+2s−1s2+1,
with
G(s)=1s(s2+1).
The form for the partial fraction expansion of G is
1s(s2+1)=As+Bs+Cs2+1.
Multiplying through by s(s2+1) yields
A(s2+1)+(Bs+C)s=1,
or
(A+B)s2+Cs+A=1.
Equating coefficients of like powers of s on the two sides of this equation shows that A=1, B=−A=−1 and C=0. Hence, from Equation ???,
G(s)=1s−ss2+1.
Therefore
g(t)=1−cost.
From this, Equation ???, and Theorem 8.4.2,
y=1−cost−2u(t−π2)(1−cos(t−π2))+2cost−sint.
Simplifying this (recalling that cos(t−π/2)=sint) yields
y=1+cost−sint−2u(t−π2)(1−sint),
or
y={1+cost−sint,0≤t<π2−1+cost+sint,t≥π2
which is the result obtained in Example 7.5.1.
Note
It isn’t obvious that using the Laplace transform to solve Equation ??? as we did in Example 7.5.2 yields a function y with the properties stated in Theorem 7.5.1; that is, such that y and y′ are continuous on [0,∞) and y″ has limits from the right and left at t1. However, this is true if f0 and f1 are continuous and of exponential order on [0,∞). A proof is sketched in Exercises 8.6.11–8.6.13.
Example 7.5.3
Solve the initial value problem
y″−y=f(t),y(0)=−1,y′(0)=2,
where
f(t)={t,0≤t<1,1,t≥1.
Solution
Here
f(t)=t−u(t−1)(t−1),
so
L(f)=L(t)−L(u(t−1)(t−1))=L(t)−e−sL(t) (from Theorem 8.4.1)=1s2−e−ss2.
Since transforming Equation ??? yields
(s2−1)Y(s)=L(f)+2−s,
we see that
Y(s)=(1−e−s)H(s)+2−ss2−1,
where
H(s)=1s2(s2−1)=1s2−1−1s2;
therefore
h(t)=sinht−t.
Since
L−1(2−ss2−1)=2sinht−cosht,
we conclude from Equation ???, Equation ???, and Theorem 7.5.1 that
y=sinht−t−u(t−1)(sinh(t−1)−t+1)+2sinht−cosht,
or
y=3sinht−cosht−t−u(t−1)(sinh(t−1)−t+1)
We leave it to you to verify that y and y′ are continuous and y″ has limits from the right and left at t1=1.
Example 7.5.4
Solve the initial value problem
y″+y=f(t),y(0)=0,y′(0)=0,
where
f(t)={0,0≤t<π4cos2tπ4≤t<π0,t≥π
Solution
Here
f(t)=u(t−π/4)cos2t−u(t−π)cos2t,
so
L(f)=L(u(t−π/4)cos2t)−L(u(t−π)cos2t)=e−πs/4L(cos2(t+π/4))−e−πsL(cos2(t+π))=−e−πs/4L(sin2t)−e−πsL(cos2t)=−2e−πs/4s2+4−se−πss2+4.
Since transforming Equation ??? yields
(s2+1)Y(s)=L(f),
we see that
Y(s)=e−πs/4H1(s)+e−πsH2(s),
where
H1(s)=−2(s2+1)(s2+4) and H2(s)=−s(s2+1)(s2+4).
To simplify the required partial fraction expansions, we first write
1(x+1)(x+4)=13[1x+1−1x+4].
Setting x=s2 and substituting the result in Equation ??? yields
H1(s)=−23[1s2+1−1s2+4] and H2(s)=−13[ss2+1−ss2+4].
The inverse transforms are
h1(t)=−23sint+13sin2t and h2(t)=−13cost+13cos2t.
From Equation ??? and Theorem 8.4.2,
y=u(t−π4)h1(t−π4)+u(t−π)h2(t−π).
Since
h1(t−π4)=−23sin(t−π4)+13sin2(t−π4)=−√23(sint−cost)−13cos2t
and
h2(t−π)=−13cos(t−π)+13cos2(t−π)=13cost+13cos2t,
Equation ??? can be rewritten as
y=−13u(t−π4)(√2(sint−cost)+cos2t)+13u(t−π)(cost+cos2t)
or
{0,0≤t<π4−√23(sint−cost)−13cos2t,π4≤t<π,−√23sint+1+√23cost,t≥π
We leave it to you to verify that y and y′ are continuous and y″ has limits from the right and left at t1=π/4 and t2=π (Figure 7.5.2).
