Class Notes
(809,569)

Canada
(493,754)

University of Ottawa
(32,198)

Mathematics
(1,092)

MAT2384
(62)

Robert Smith
(3)

Lecture

# MAT2384_solutions1.pdf

Unlock Document

University of Ottawa

Mathematics

MAT2384

Robert Smith

Fall

Description

General Introduction
0.1 Basic Deﬁnitions
0.1.1 Diﬀerential equation
A diﬀerential equation is an equation involving an unknown function and some of its derivatives.
0.1.2 Examples
dy 2
= 10y + sin(t)
d00 0
y + 10y y = 0
Here y is really y(t).It’s easy to spot which are the variables and which are the unknown constants: variables
have derivatives.
A derivative is a rate of change, so functions are used because they change (with respect to time, or space
or whatever).
0.1.3 Order
The order of the diﬀerential equation is the order of the highest derivative appearing in the equation.
0.1.4 Examples
dy
= 10y + sin(t)
dt
has order 1 while
00 0
y + 10y y = 0
has order 2.
0.1.5 Linear equations
A linear equation is an equation in which the unknown function y(t) and its derivatives appear by themselves.
For example, 2 2
d y dy
dt2 = 10 dt + sin(t)
is nonlinear while
00 0
y + 10y + 2y = 0
is linear.
0.1.6 Existence and uniqueness
Existence and uniqueness are important questions. Does a solution for an equation exist? An existence theorem
might tell us if it does. Is the solution unique? Some equations may have no solutions at all and some may
have inﬁnitely many. Some equations have inﬁnitely many solutions but only one solution that satisﬁes certain
conditions.
0.1.7 Initial value problem
If we are given a diﬀerential equation and all the required conditions that the solution must satisfy at a single
point then we have an initial value problem. For example,
y + y + y = 1 with y(0) = 1 and y (0) = 3
Many functions may satisfy the DE and not the initial conditions. For example, y(t) = 1 satisﬁes the DE and
one condition but not the other - so it doesn’t satisfy the IVP. 0.1.8 Two-point boundary value problem
If we are given a diﬀerential equation but the conditions are at two diﬀerent values of t, we have a two-point
boundary value problem. For example,
y + y + y = 1 with y(0) = 1 and y(1) = 3
0.1.9 General solutions
If we are not given any conditions then we can only ﬁnd a general solution that will usually contain one or
more unknowns.
Example.
00
y + y = 0
has the solutions
y = Asin(t) + B cos(t)
where A and B are arbitrary constants.
This allows us to add in initial or boundary conditions later.
0.2 Modelling with ODEs
0.2.1 Introduction
An important aspect of the study of ordinary diﬀerential equations is the use of such equations in the study of
problems in diverse areas such as physical and biological sciences and ﬁnance.
The basic idea is that we build a mathematical model of the problem which lets us investigate relevant charac-
teristics while being simple enough to study and analyze.
Anything that changes in some way can be modelled by DEs.
We look at some simple models.
0.3 Growth and decay of populations
Let the population of cod in the North Atlantic at a time t be C(t). Suppose that we assume that the change
in population at a time t is proportional to the population itself. Then
dC
dt = kC
where k is the constant of proportionality. If k is positive then the population will increase if k is negative then
the population will decrease.
This is an example of a separable equation. We rearrange the terms to get
dC
= kdt
C
and then integrate both sides to get
kt
C(t) = C0e
where C 0 C(0). This simple model suggests that the cod population will grow (or decrease) exponentially
with time. This neglects the fact that a population cannot grow beyond limits set by availability of resources
such as food. Let’s see how we can incorporate this idea onto a model.
Suppose that we can set a limit to the number of cod based on information about food sources. Let this limit
be Cmax . Then a new model might be
dC C
dt = kC 1 − C max
We see that this equation is nonlinear. For C small compared maxCwe have approximately our original linear
equation. As C approaches C the time derivative goes to zero and so the population levels oﬀ at .
max max
The solution is of the form
C(t) = Cmax C0
C 0 (C max− C 0e −kt where C = C(0).
0
A separable equation is one where we can separate the variables, in this case putting all the Cs on one side
(including dC) and the t’s on the other. The constant k could go on either side.
We’ll see later how to get this solution. For now, try diﬀerentiating and putting it into the original equation
with the initial condition to verify that it is the solution.
0.3.1 Compound interest
Example. If we invest 100 dollars at 5 percent interest, after one year we have a sum of 100*1.05 and after n
years we have a sum of
100 × (1.05)n
In general if we invest an amount D at an interest rate r compounded m times a year for t years we get
0
D 01 + r/m) mt
How much do we have if we compound continuously?
If we let the number of times that the interest is compounded increase indeﬁnitely, i.e. m → ∞, we get
continuous compounding and we see that the capital D(t) after t years is
mt
D(t) = m→∞ D (0 + r/m)
Take the limit:
lnD(t) = lnD + lim mtln(1 + r/m)
0 m→∞
= lnD + lim ln(1 + r/m) = lnD + ∞
0 m→∞ 1/(mt) 0 ∞
1 ·−r2
= lnD 0 lim 1+r/m m (L’Hoˆpital’s Rule)
m→∞ − 12
m t
rt
= lnD 0 lm→∞ 1 + r/m
= lnD 0 rt.
Thus
rt
D(t) = D 0
This is the same as for our growth and decay example, so the problem of continuously compounded interest
can be modelled by the diﬀerential equation
D = rD with D(0) = D .0
0.3.2 Radioactive Decay
Some elements decay at a rate which depends on the amount of material present. The more of the element that
is present the faster the decay. Thus if Q(t) is the amount of the element present at time t, the rate of decay
could be modelled as
dQ
= −rQ
dt
where r is a positive constant that diﬀers from material to material. Thus if Q(0) 0 Q our previous results
give us
Q(t) = Q 0−rt
The half-life is the amount of time taken for the sample to decay to half of what it was originally. If T is the
half-life then
1 −rT
Q(t) = Q0= Q e0
2 Solve for r in terms of T to get
log0.5 0.6931
r = − =
T T
and so we can also express the decay law as
Q(t) = Q 0 0.6931/Tt 1 First order diﬀerential equations
1.1 First order equations
1.1.1 Form
A general form of these equations is
dy
= f(y,t)
dt
where we will assume that f(y,t) is a reasonably well-behaved function of both y and t.
1.1.2 Conditions
Usually, we are also given a condition at some value of t, such as
y(0) = 0
where y0is some constant.
1.1.3 Solutions
We do not have a procedure for solving the general ﬁrst order equation for arbitrary f. However, there are
solutions for separable and linear equations which we consider next.
1.2 Separable equations
1.2.1 Form
If the equation
dy
= f(y,t)
dt
can be expressed as a product of a function of y times a function of t, that is, in the form
dy
= Y (y)T(t)
dt
we call the equation separable.
1.2.2 Solutions
The expression for a separable equation can be manipulated to give
dy
= Y (y)T(t)
dt
dy
Y (y) = T(t)dt
and then integrated on both sides to give
Z Z
dy = T(t)dt + K
Y (y)
where K is an arbitrary constant which will be evaluated by applying the condition at t = 0. Of course, the
two integrations may be diﬃcult or impossible.
The constant of integration K is absolutely vital here. Sometimes it does turn out to be zero, but that does
not diminish its importance.
Example. Solve the population growth problem
dC = kC.
dt Treating this as a separable equation, we rearrange to get
dC
= kdt
C
Integrate both sides to get
lnC = kt + K
Using the initial condition C(0), we have
lnC(0) = k · 0 + K
lnC = kt + lnC(0)
kt
C = C(0)e
dy 2
Example. Solve the equation dx = (1 − 2x)y .
We use separation of variables:
dy
2 = (1 − 2x)dx
Z y Z
−2
y dy = (1 − 2x)dx
−y −1 = x − x + c
1
y = x − x − c
Exercise. A more sophisticated model for population growth was
dC C
= kC 1 −
dt Cmax
Rearrange the equation to get
dC
2 = kdt
C − C /C max
Hint: use partial fractions.
1.3 Linear equations
1.3.1 Deﬁnition
If
dy
= f(y,t)
dt
is linear in y (y appears by itself and not in a function) then the ﬁrst order equation is said to be linear.
2 √
We can’t have y or y + 1 or anything fancy.
However, we don’t care about t, so √
y = t y + t
is linear (in y), whereas
y = t
y
is not.
1.3.2 Form
A linear ﬁrst order equation can be written in the form
dy
+ p(t)y = q(t)
dt 1.3.3 Integrating factors
We can use an integrating factorto make the equation integrable. Consider the function
Z
F(t) = exp p(t)dt
Note that
0
F (t) = F(t)p(t)
We multiply both sides of the linear equation by F(t).
dy
F(t) + p(t)y = F(t)q(t)
dt
Consider now the expression
d dy dF
(F(t)y(t)) = F(t) + y(t) product rule
dt dt dt
and so
d dy
(F(t)y(t)) = F(t) + F(t)p(t)y(t)
dy dt
Thus, the equation we want to solve has become
d
(F(t)y(t)) = F(t)q(t)
dt
which can be integrated to give
Z Z
d(F(t)y(t)) = F(t)q(t)dt
We can now solve to get
1 Z
y(t) = F(t)q(t)dt + K
F(t)
where K is a constant of integration.
The function F(t) is called an integrating factor. This uses the product rule for derivatives, but in reverse.
Again, the constant of integration is vital.
Example. Solve
y + 1 y = 1 + x, y(0) = 0.
1 + x
The integrating factor is
Z
F(x) = exp dx = 1 + x
1 + x
Rewrite the equation as 0 2
(1 + x)y + y = (1 + x)
or
d ((1 + x)y) = (1 + x) .
dx
(See how the product rule “collapses” the left-hand side?)
Integrating both sides, we get
1 3
((1 + x)y) =3 (1 + x) + K
where K is an arbitrary constant. Now, solve for y to get
y(x) = 1(1 + x) + K
3 1 + x
Use the condition y(0) = 0 to get
1
K = − 3
Thus the solution is 1 1 1
y(x) = (1 + x) − ·
3 3 1 + x 1.4 Exact solutions
We can generalise the idea of an integrating factor. What was really going on was that we used the integrating
factor to put the equation into an exact form.
From calculus, if a function u(x,y) has continuous partial derivatives, then its total or exact diﬀerential is
∂u ∂u
du = dx + dy.
∂x ∂y
In particular, if u(x,y) = c (a constant), then du = 0.
Example. Suppose u = x + x y = c. Find the diﬀerential equation fory.
dx
We have
du = (1 + 2xy )dx + 3x y dy = 0.
Rearranging,
3 2 2dy
(1 + 2xy ) = −3x y dx
3
dy = − 1 + 2xy.
dx 3x y2
What we’ve done here is “solved” a diﬀerential equation, only in reverse. This gives us a powerful solution
method.
A ﬁrst-order diﬀerential equation of the form
M(x,y)dx + N(x,y)dy = 0 (1)
is called exact its left-hand side is the total or exact diﬀerential
∂u ∂u
du = dx + dy
∂x ∂y
of some function f(x,y). Then the diﬀerential equation (1) can be written
du = 0.
By integration, we obtain the general solution of (1) in the form
u(x,y) = c. (2)
Comparing (1) and (2), we see that (1) is exact if there is some function u(x,y) such that
∂u ∂u
= M and = N.
∂x ∂y
Suppose M and N are deﬁned and have continuous ﬁrst partial derivatives in a region of the xy-plane whose
boundary is a closed curve having no self-intersections. Then
2
∂M = ∂ u
∂y ∂y∂x
2
∂N ∂ u
∂x = ∂x∂y.
By continuity, the two second derivatives are equal. Thus
∂M ∂N
= .
∂y ∂x
This condition is both necessary and suﬃcient for Mdx + Ndy to be an exact diﬀerential. Example. Show that
(x + 3xy )dx + (3x y + y )dy (3)
is exact.
We have
3 2 2 3
M = x + 3xy N = 3x y + y
∂M ∂N
= 6xy = 6xy
∂y ∂x
∂M ∂N
Since ∂y = ∂x , the equation is exact.
If (1) is exact, the function u(x,y) can be found either by guessing or by integrating twice, once with respect
to each variable.
Integrating with respect to x, we have
Z
u = Mdx + k(y)
where y is regarded as a constant in this integration, so k(y) plays the role of the arbitary constant.
Integrating with respect to y, we have
Z
u = Ndy + j(x)
where x is regarded as a constant in this integration, so j(x) plays the role of the arbitary constant.
To determine j(x), we derive ∂u to get djand integrate.
∂x dx
Example. Find the solution to (3). Check that this solution solves the diﬀerential equation.
We have
Z
u = Mdx + k(y)
Z
3 2
= (x + 3xy )dx + k(y)
1 4 3 2 2
= x + x y + k(y).
4 2
Diﬀerentiating this, we have
∂u 2 dk 2 3
= 3x y + = N = 3x y + y .
∂y dy
Hence dy= y . Thus k = y4+ c ¯. Thus
u(x,y) = 1x + 3x y + 1y = c.
4 2 4
To check, we can diﬀerentiate u implicitly with respect to x:
du
= 0
dx
x + 3xy + 3x yy + y y = 0
3 2 2 3 dy
x + 3xy + (3x y + y ) = 0.
dx
Example. Solve
dy
cosxsinhy − sinxcoshy = 0, y(0) = 0
dx Check that the solution satisﬁes the diﬀerential equation.
We have
M = −sinxcoshy N = cosxsinhy
∂M = −sinxsinhy ∂N = −sinxsinhy
∂y ∂x
Thus the equation is exact.
To solve, we have
Z
u = − sinxcoshydx + k(y)
= cosxcoshy + k(y)
∂u = cosxsinhy + dk = N = cosxsinhy.
∂y dy
dk
Thus dy= 0 so k = ¯.
The general solution is then
u(x,y) = cosxcoshy = c.
The initial condition y(0) = 0 gives
cos0cosh0 = 1 = c.
Thus the solution is cosxcoshy = 1.
Checking, we see that
(cosxcoshy) = −sinxcoshy + cosx(sinhy)y = 00
cos0cosh0 = 1
(Don’t forget to check the initial condition!)
What happens if the equation isn’t exact? In this case, we cannot use this technique.
Example. Consider
0
y − xy = 0
Show that the equation is not exact and that the integrating method fails.
We have
M = y N = −x
∂M ∂N
∂y = 1 ∂x = −1.
∂M ∂N
Thus the equation is not exact, sinc∂y 6= ∂x .
Trying the integral method, we have
Z
u = Mdx + k(y) = xy + k(y)
∂u 0
∂y = x + k (y).
This should equal N = −x. But this is impossible, since k(y) can only depend on y.
Exercise. Solve the last equation using a diﬀerent method. 1.5 The Bernoulli Equation
Some nonlinear diﬀerential equations can be reduced to linear forms. The most famous of these is the Bernoulli equation
0 a
y + p(x)y = g(x)y (a any real number). (4)
If a = 0 or a = 1, the equation is linear. Otherwise it is nonlinear. In that case, set
u(x) = [y(x)]1−a.
Diﬀerentiating and substituting into (4), we have
0 −a 0 −a a
u = (1 − a)y y = (1 − a)y (gy − py)
1−a
= (1 − a)(g − py ).
Since u = y1−a, we thus have a linear equation
0
u + (1 − a)pu = (1 − a)g.
Example. Solve
y − Ay = −By 2 (A,B positive constants).
Here a = 2, so u = y−1 and we thus have
0 −2 0 −2 2
u = −y y = −y (−By + Ay)
−2
= B − Ay
= B − Au
u + Au = B
This is a linear equation, so we can use an integrating factor :
Ax 0 Ax Ax
e u + Ae u = Be
d
(eAxu) = Be Ax
dx
Z d Z
(eAxu) = BeAx
dx
B
eAxu = e Ax+ c
A
B
u = + ce−Ax .
A
We thus have
1 1
y = = B −Ax . (5)
u A + ce
Another (trivial) solution is y = 0. The solution (5) is called the logistic law of population growth, where x
Ax
represents time. For B = 0, it gives exponential growth y = (1/c)e , which is Malthus’s law.
Exponential growth is of course not very realistic, as solutions head to inﬁnity very quickly. Thus, the term
−By in the original diﬀerential equation acts as a “braking term”, preventing the population from growing
without bound. Indeed, small populations (with 0 < y(0) < A/B) will increase monotonically to A/B, whereas
initial conditions with y(0) > A/B will decrease monotonically to the same limit A/B. The value A/B is called
the carrying capacity of a population. 2 Second order linear diﬀerential equations
2.1 Second order equations
2.1.1 Form
The general form of a second order linear equation is
00 0
a(t)y + b(t)y + c(t)y = f(t)
Once again, a(t), b(t), c(t) and f(t) can be nonlinear in t, it’s only y we care about. For example,
q
t y − cos(t)y + ln(t)y = 6 + sin(t)
is a linear second order diﬀerential equation.
2.1.2 Homogeneous equation
The equation is homogeneous if f(t) = 0, that is, if it is of the form
00 0
a(t)y + b(t)y + c(t)y = 0
For example, t y − cos(t)y + ln(t)y = 0 is a homogeneous second order linear diﬀerential equation. Note that
cy is also a solution for any c.
2.1.3 Initial and boundary conditions
In order to get a solution which contains no arbitrary constants, we must have two initial conditions or two
boundary conditions. For example, we may be given the information
0
y(0) = 0, y (0) = 1
or the boundary conditions
y(0) = 1.0, y(1) = 0.0
First-order equations require one condition. Second order equations require two conditions. Initial conditions
don’t have to be at 0, they just have to be at the same point. For example, y(3) = 0, y (3) = 1 are also initial
conditions.
2.1.4 Particular solutions
A particular solution yP to some nonhomogeneous equation is any solution — not necessarily the most general
one — to the nonhomogeneous solution.
Example. Find a particular solution to
00 3 0
y + x y + 2y = 1
1
yP =
2
is a particular solution, but it is certainly not the full solution.
2.2 Complete solutions to the nonhomogeneous equation
The general solution to the nonhomogeneous equation can be written as
y = yh+ y P
where y hs the general solution to the corresponding homogeneous equation and y P is any particular solution
to the nonhomogeneous equation. The procedure for solving the nonhomogeneous equation is as follows:
1) Find the general solution to the homogeneous equation.
2) Find a particular solution to the original equation.
3) Add the two expressions together.
4) Apply initial or boundary conditions to evaluate the arbitrary constants in y . h
Example. Solve
y + y = 1 + t, y(0) = 3
First we look at the homogeneous equation:
0
y + y = 0
0
y = −y
−t
y = ce
0
Next we try and guess a particular solution. In this case, y = t will work, since y +y = 1+t. Formally, we have
yh= ce −t
yp= t
−t
) y = ce + t
y(0) = 3 → c = 3
Thus the solution is y(t) = 3e −t + t.
2.3 Homogeneous equations
Exercise. Suppose that y (t) and y (t) are solutions to the homogeneous equation. Show that the linear
1 2
combination
y(t) = c1 1(t) + c2 2(t)
is also a solution for constants c1and c .2
2.4 Euler-Cauchy equation
Consider the Euler-Cauchy equation
2 00 0
t y + αty + βy = 0
For now let t be greater than zero.
2.4.1 Guess for Euler-Cauchy equation
Note that if y = t then t y and ty are multiples of y. So, let’s try this as an answer.
y = tr
y = rt r−1
y = r(r − 1)t r−2
Substitute back into the original equation to get
r r r
r(r − 1)t + αrt + βt = 0
2.4.2 Indicial equation
We get
r
F(r)t = 0
where
F(r) = r(r − 1) + αr + β
and so we have the indicial equation
F(r) = r(r − 1) + αr + β = r + (α − 1)r + β = 0 2.4.3 Roots of the indicial equation
The indicial equation has two roots
q
1 2
r1= − (α − 1) + (α − 1) − 4β
2
1 q
r2= − (α − 1) − (α − 1) − 4β
2
2.4.4 Two real roots
y(t) = At 1 + Bt r2
Example. Solve
2 00 0
t y + 4ty + 2y = 0.
r
Letting y = t , we have
r(r − 1) + 4r + 2 = 0
r + 3r + 2 = 0
(r + 1)(r + 2) = 0
r = −1,−2.
Thus
−1 −2
y(t) = At + Bt
2.4.5 Two equal roots
Suppose that the indicial equation has two equal roots. Then the solution is of the form
r r
y(t) = At + B log(t)t
We can see this if we let t = e . Then
z dy 1 dy
dt = e dz so = z
dt e dz
d y 1 d y
and 2 = 2z 2
dt e dz
) t y + αty + βy = 0 becomes
1 d y 1 dy
e2z + αe z + βy = 0
e 2zdz2 e dz
d y dy
+ α + βy = 0 - constant coeﬃcients
dz2 dz
For the case of two equal roots with constant coeﬃcients, solutions are of the form
y = Ae rz+ Bze rz
√ 2
where r + αr + β = 0 and r = −α± α −4β = − α since the roots are repeated.
2 2
Check:
y = Are rz+ Be rz + Brze rz
y = Ar e 2 rz+ Bre rz + Bre rz+ Br ze rz
= Ar e2 rz+ 2Bre rz+ Br ze rz
y + αy + βy = Ar e 2 rz+ 2Bre rz+ Br ze rz + α(Are rz + Be rz
+ Brze ) + β(Ae rz+ Bze )z
= Ae (r + αr + β) + Be (2r + α)
+ Bze (r + αr + β) = 0 z
Thus, since t = e ,
y = At + B ln(t)t r
Example.
t y − 5ty + 9y = 0
Show that the indicial equation has equal real roots r = 3. What is the general solution?
y = t r
r(r − 1)t − 5rt + 9t = 0
r − r − 5r + 9 = 0
r − 6r + 9 = 0
(r − 3) = 0
3 3
y = At + B log(t) − t
2.4.6 Complex roots
Suppose that the solutions to the indicial equation are
r = λ ± iµ
Then the solutions are
y(t) = t [Acos(µlog(t)) + B sin(µlog(t))]
z
We can see this from letting t = e again. Then
y = c1e ez µiz+ c 2 ez −µiz
= e (c c1s(µz) + ic si1(µz) + c cos2µz) − c isin2µz))
= e (Acos(µz) + B sin(µz))
λ
= t (Acos(µlog(t)) + B sin(µlog(t)))
Example. Solve t y − 5ty + 25y = 0.
2 00 0
0 = t y − 5ty + 25y
r r r
0 = r(r − 1)t − 5rt + 25t
2
0 = r − r − 5r + 25
2
0 = r − 6r + 25
√
6 ± 36 − 100
r =
2
6 ± 8i
=
2
= 3 ± 4i
y = e (Acos(4z) + B sin(4z))
3
= t (Acos(4log(t)) + B sin(4log(t)))
2.4.7 The Wronskian
The Wronskian of two functions u and1u is de2ned as
!
u u
W(u ,1 ) 2 det 1 2 = u 1 0− u 0u2
u1 u 2 2 1 2.4.8 Linear independence
Two solutions are linearly independent if the Wronskian of the two functions is not zero.
Example. Show that y(t) = t and y(t) = 1 + t are two independent solutions of y = 0, but that 3 − 2t
and 6t − 9 are not.
Clearly, all the functions solve the diﬀerential equation.
!
W(t,1) = det t 1 + t = t − 1 − t = −1
1 1
so t and 1 + t are independent.
Conversely, !
3 − 2t 6t − 9
W(3 − 2t,6t − 9) = det = 18 − 12t + 12t − 18 = 0
−2 6
so 3 − 2t and 6t − 9 are dependent. (In fact, one is simply a multiple of the other.)
2.4.9 General solution to the homogeneous equation
If y1(t) and y2(t) are linearly independent solutions of
00 0
a(t)y + b(t)y + c(t)y = 0
then the general solution is given by
y(t) = c y (t) + c y (t)
1 1 2 2
where c and c are arbitrary constants. The set {y ,y } is called the fundamental set of solutions.
1 2 1 2
Two solutions are linearly independent if and only if one is not a constant multiple of the other.
2.5 Homogeneous equations with constant coeﬃcients
2.5.1 Form
We consider equations of the form
00 0
ay + by + cy = 0
where a, b, and c are constants and a is not zero.
2.5.2 Guessing a solution
We need to ﬁnd two independent solutions. Let’s guess a solution of the form
rt
y = e
Substitute this solution into the equation, we get
ar e rt+ bre rt+ cert= 0
Now divide by the common factor to get the characteristic equation.
ar + br + c = 0
rt
Thus y = e is a solution to the second order linear homogeneous equation with constant coeﬃcients for values
of r which satisfy the characteristic equation.
The roots of the characteristic equation are given by the quadratic formula
√
−b ± b − 4ac
r = 2a
We can always divide by e rt since it is never zero (even when r is complex).
Example. Solve y + y = 0 (not a second order equation obviously).
We have r+1 = 0 → r = −1. So a solution is y = e −t and the general solution consists of all scalar multiples
−t
of this: y = ce . 2.5.3 First possibility
If the discriminant is positive
2
b − 4ac > 0
then we have two real and distinct roots r and r1and two2linearly independent solutions
y1= e r1t
y2= e r2t
and so the general solution to the homogeneous equation is
r1t r2t
y = c 1 + c 2
Example. Solve y − 5y + 6y = 0
2 2t 3t
The characteristic equation is r − 5r + 6 = 0, so r = 2,3. Thus the general solution is y = c e 1 + c 2 .
2.5.4 Second possibility
If the discriminant is zero
b − 4ac = 0
then the roots are equal: r = 1 = r.2One solution is
rt
y 1 e
and we already saw that another (clearly linearly independent) solution is
y = te .rt
2
Thus the general solution is
y = c e rt+ c te .t
1 2
We have
rt
y = te
y = e rt+ rte rt
00 rt 2 rt
y = 2re + r te
00 0 rt 2 rt rt rt rt
ay + by + cy = 2are + ar te + be + brte + cte
rt 2 rt
= (2ar + b)e + (ar + br + c)te
rt rt b
= (0)e + (0)te = 0 because in this case r = − 2a
i.e. y = tert is a solution, but only in the case of repeated roots.
!
rt rt ert tert
W(e ,te ) = det rt rt rt
re e + rte
2rt 2rt 2rt
= e + rte − rte
2rt
= e 6= 0
Therefore, e rtand te rtare independent.
Example. Solve y − 6y + 9y = 0.
We have
2
r − 6r + 9 = 0
(r − 3) = 0
r = 3,3
Thus
3t 3t
y = c 1 + c2te 2.5.5 Third possibility
If the discriminant is negative
2
b − 4ac < 0
then the two roots are complex conjugates
r1= α + iβ r2= α − iβ
and, from Euler’s identity,
iθ
e = cosθ + isinθ
we get the general solution
αt
y = e [Acos(βt) + B sin(βt)]
In polar coordinates, we have
(α+iβ)t (α−iβ)t
y = c 1 + c2e
αt iβt αt −iβt
= c 1 e + c2e e
αt
= e (c c1s(βt) + ic si1(βt) + c cos2βt) − ic sin(2t))
αt
= e [(c +1c )c2s(βt) + i(c − c1)sin2βt)]
Since c1and c a2e arbitrary, we could choose them to be complex conjugates, so that c + c is real1and 2
c − c is purely imaginary. Thus, even though the roots of the equation are complex, it is possible to get real
1 2
solutions, of the form
αt
y = e [Acos(βt) + B sin(βt)]
00 0
Example. Solve y + 6y + 13y = 0.
We have
2
r + 6r + 13 = 0
√
−6 ± −16
r = = −3 ± 2i
2
y = e−3t (Acos(2t) + B sin(2t)).
00 2
Example. Show that the general solution for y + α y = 0 for α positive is y = Acos(αt) + B sin(αt).
The characteristic equation is
r + α = 0
r = −α 2
r = ±iα
y = c e iαt+ c e −iαt
1 2
= c cos(αt) + ic sin(αt) + c cos(αt) − c isin(αt)
1 1 2 2
= Acos(αt) + B sin(αt)
A = c + c
1 2
B = (c − c )i
1 2
00 0 0
Example. Solve the initial value problem y + y − 2y = 0 with initial conditions y(0) = 1, y (0) = 1. We have
m + m − 2 = 0
(m + 2)(m − 1) = 0
m = −2, 1
−2t t
y = c1e + c 2
y(0) = c1+ c =21
0 −2t t
y = −2c e 1 + c2e
0
y (0) = −2c +1c = 2
−2c 1 (1 − c )1= 1
c1= 0
c = 1
2
y = e t
Exercise. Find the solution to
y + y = 0.
2.6 Nonhomogeneous equations with constant coeﬃcients
2.6.1 Form
ay + by + cy = f(t)
where a, b and c are constants and f(t) is a given function of t.
2.6.2 Solutions
Solutions are of the form
y(t) = yh(t) + yp(t)
where y hs the general solution of the homogeneous equation obtained by setting f(t) to zero and y is some p
particular solution.
We already discussed how to ﬁnd y . How do we ﬁnd some y ? We discussptwo methods: the method of
h
undetermined coeﬃcients which is easy if it works, and the method of variation of parameters which is more
cumbersome but always works, at least formally.
2.6.3 Method of undetermined coeﬃcients
The idea is to guess the form of the solution with some unknown coeﬃcients which then have to be found.
Example. Find a particular solution to
y + y = t .
In this case, f(t) is a polynomial in t of degree 2, so we guess that a particular solution has such a form.
Let
2
y = At + Bt + C
and then we get
0
y =2At + B
00
y = 2A
Subtituting into the equation gives
2 2
2A + At + Bt + C = t Equating coeﬃcients of powers of t on both sides gives
2A + C = 0
B = 0
A = 1
which has solutions A = 1, B = 0, and C = −2.
Then a particular solution is
yp= t − 2.
Exercise. Show that the solution to
y + y = t 2
is
2
y = C1cost + C 2int + t − 2
Example. Solve
y + y + y = cost.
First we need a particular solution.
We guess a particular solution of the form
yP = Acost + B sint
because derivatives of sin and cos are sin and cos, so combinations lead to cost.
yp= Acost + B sint
0
yp= −Asint + B cost
00
yp= −Acost − B sint
00 0
yp+ y p y =p−Acost − B sint − Asint + B cost + Acost + B sint
= (−A + B + A)cost + (−B − A + B)sint
= B cost − Asint = cost
) B = 1, A = 0
yp= (0)cost + (1)sint
yp= sint
We also need the homogeneous solution.
The characteristic equation is
2
0 = r + r + 1
√ √
−1 ± 1 − 4 1 3i
r = = − ±
2 √ 2! 2 √ !!
−t/2 3 3
yh= e c1cos t + c2sin t
2 2
Hence the solution is
√ ! √ !!
−t/2 3 3
y = e c1cos 2 t + c2sin 2 t + sint
Example. Solve
y + 4y = 7e −3xcos5x First let’s ﬁnd the homogeneous solution.
2
The characteristic equation is m + 4 = 0 so m = ±2i. Thus
2ix −2ix
yh= c 1 + c2e
= Acos2x + B sin2x.
Next we look for a particular solution.
We’ll guess a particular solution of the form
−3x
yp= e (P cos5x + Qsin5x).
Then we have
y = − 3e −3x(P cos5x + Qsin5x) + e −3x(−5P sin5x + 5Qcos5x)
p
y = 9e −3x(P cos5x + Qsin5x) − 3e −3x(−5P sin5x + 5Qcos5x)
p
− 3e−3x(−5P sin5x + 5Qcos5x) + e −3x(−25P cos5x − 25Qsin5x)
= e−3x(−16P cos5x − 16Qsin5x) + e −3x (30P sin5x − 30Qcos5x)
Substituting, we have
00 −3x −3x −3x
yp + 4yp= e (−16P cos5x − 16Qsin5x) + e (30P sin5x − 30Qcos5x) + 4[e (P cos5x + Qsin5x)]
−3x −3x
= e (−12P cos5x − 12Qsin5x) + e (30P sin5x − 30Qcos5x)
−3x −3x
= e [(−12P − 30Q)cos5x + (30P − 12Q)sin5x] = 7e cos5x.
It follows that
−12P − 30Q = 7
30P − 12Q = 0
Thus
5
Q = 2 P
5
−12P − 30 2P = 7
7
P = − 87
Q = 35
174
Thus the solution is
y = yh+ yp
= Acos2x + B sin2x − 7 e−3xcos5x + 35 e−3x sin5x
87 174
The method of undetermined parameters can thus be summarised as follows:
Term in r(x) Choice for yp
γx γx
ke Ce
kx (n = 0,1,...) K n + K n−1xn−1 + ··· + K1x + K 0
k cosωx and/or k sinωx K cosωx + M sinωx
keαxcosωx and/or ke αx sinωx eαx (K cosωx + M sinωx) 2.6.4 A complication
The situation becomes more complicated if f(t) contains one of the fundamental solutions of the homogeneous
equation. For example, consider
00
y + y = cost
Since f(t) contains a cos function it would be reasonable to guess
y = Acost + B sint
p
However, substituting this into the original equation gives
0 = cost
We extend the procedure and use a guess of the form
yp= Atcost + Btsint
Example. Complete this problem.
First we ﬁnd the particular solution.
yp= Acost − Atsint + B sint + Btcost
= (A + Bt)cost + (B − At)sint
00
y p B cost − (A + Bt)sint − Asint + (B − At)cost
= (2B − At)cost − (2A + Bt)sint
00
yp+ y =p(2B − At)cost − (2A + Bt)sint + Atcost + Btsint
= 2B cost − 2Asint = cost
Thus B = 1 and A = 0, so the particular solution is
2
1
yp= tsint
2
Next, we ﬁnd the homogeneous solution.
The characteristic equation for the homogeneous solution is
r + 1 = 0
r = ±i
so the homogeneous solution is
yh= c 1ost + c s2nt.
Thus, the solution is
1
y = c1cost + c 2int + tsint.
2
00
Example. Solve y + 4y = 3sin(2t).
00
y + 4y = 3sin(2t)
2
m + 4 = 0
m = ±2i
y = c c1s(2t) + c s2n(2t)
h If we try the obvious particular solution, it won’t work:
y = Acos(2t) + B sin(2t)
p
y = −2Asin(2t) + 2B cos(2t)
p
y = −4Acos(2t) − 4B sin(2t)
p
00
y p 4y = p4Acos(2t) − 4B sin(2t) + 4Acos(2t) + 4B sin(2t)
→ 0 = 3sin(2t)
This doesn’t work, because the particular solution we tried had the same form as the homogeneous solution.
Thus, let’s try the same thing, only with a factor of t:
yp= Atcos(2t) + Btsin(2t)
y = Acos(2t) − 2Atsin(2t) + B sin(2t) + 2Btcos(2t)
p
00
yp= −2Asin(2t) − 2Asin(2t) − 4Atcos(2t) + 2B cos(2t) + 2B cos(2t) − 4Btsin(2t)
00
yp+ 4y =p−4Asin(2t) − 4Atcos(2t) + 4B cos(2t) − 4Btsin(2t) + 4Atcos(2t) + 4Btsin(2t)
= −4Asin(2t) + 4B cos(2t)
= 3sin(2t)
3
A = − , B = 0
4
3
y = − tcos(2t)
p 4
3
y = c cos(2t) + c sin(2t) − tcos(2t)
1 2 4
Exercise. Consider
00 −t
y − y = cost + e
Try to ﬁnd a particular solution of the form
−t −t
yp= Acost + B sint + Ce + Dte
Why do we need the last term?
We can guess particular solutions when we know what sort of functions diﬀerentiate into the nonhomoge-
neous part (often diﬀerentiate multiple times). Speciﬁcally polyno

More
Less
Related notes for MAT2384