Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Solving First Order Differential Equations: An Introduction, Slides of Differential Equations

An introduction to solving first order differential equations, focusing on separable equations and homogeneous linear equations. It includes definitions, examples, and exercises.

Typology: Slides

2021/2022

Uploaded on 09/27/2022

albertein
albertein 🇺🇸

4.8

(4)

240 documents

1 / 26

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
17
Differential Equations
Many physical phenomena can be modeled using the language of calculus. For example,
observational evidence suggests that the temperature of a cup of tea (or some other liquid)
in a room of constant temperature will cool over time at a rate proportional to the difference
between the room temperature and the temperature of the tea.
In symbols, if tis the time, Mis the room temperature, and f(t) is the temperature
of the tea at time tthen f(t) = k(Mf(t)) where k > 0 is a constant which will depend
on the kind of tea (or more generally the kind of liquid) but not on the room temperature
or the temperature of the tea. This is Newton’s law of cooling and the equation that
we just wrote down is an example of a differential equation. Ideally we would like to
solve this equation, namely, find the function f(t) that describes the temperature over
time, though this often turns out to be impossible, in which case various approximation
techniques must be used. The use and solution of differential equations is an important
field of mathematics; here we see how to solve some simple but useful types of differential
equation.
Informally, a differential equation is an equation in which one or more of the derivatives
of some function appear. Typically, a scientific theory will produce a differential equation
(or a system of differential equations) that describes or governs some physical process, but
the theory will not produce the desired function or functions directly.
Recall from section 6.2 that when the variable is time the derivative of a function y(t)
is sometimes written as ˙yinstead of y; this is quite common in the study of differential
equations.
455
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a

Partial preview of the text

Download Solving First Order Differential Equations: An Introduction and more Slides Differential Equations in PDF only on Docsity!

Differential Equations

Many physical phenomena can be modeled using the language of calculus. For example, observational evidence suggests that the temperature of a cup of tea (or some other liquid) in a room of constant temperature will cool over time at a rate proportional to the difference between the room temperature and the temperature of the tea. In symbols, if t is the time, M is the room temperature, and f (t) is the temperature of the tea at time t then f ′(t) = k(M − f (t)) where k > 0 is a constant which will depend on the kind of tea (or more generally the kind of liquid) but not on the room temperature or the temperature of the tea. This is Newton’s law of cooling and the equation that we just wrote down is an example of a differential equation. Ideally we would like to solve this equation, namely, find the function f (t) that describes the temperature over time, though this often turns out to be impossible, in which case various approximation techniques must be used. The use and solution of differential equations is an important field of mathematics; here we see how to solve some simple but useful types of differential equation. Informally, a differential equation is an equation in which one or more of the derivatives of some function appear. Typically, a scientific theory will produce a differential equation (or a system of differential equations) that describes or governs some physical process, but the theory will not produce the desired function or functions directly. Recall from section 6.2 that when the variable is time the derivative of a function y(t) is sometimes written as ˙y instead of y′; this is quite common in the study of differential equations.

456 Chapter 17 Differential Equations

17.1 First Order Differential Equations

We start by considering equations in which only the first derivative of the function appears.

DEFINITION 17.1.1 A first order differential equation is an equation of the form F (t, y, y˙) = 0. A solution of a first order differential equation is a function f (t) that makes F (t, f (t), f ′(t)) = 0 for every value of t.

Here, F is a function of three variables which we label t, y, and ˙y. It is understood that ˙y will explicitly appear in the equation although t and y need not. The term “first order” means that the first derivative of y appears, but no higher order derivatives do.

EXAMPLE 17.1.2 The equation from Newton’s law of cooling, ˙y = k(M − y), is a first order differential equation; F (t, y, y˙) = k(M − y) − y˙.

EXAMPLE 17.1.3 y˙ = t^2 +1 is a first order differential equation; F (t, y, y˙) = ˙y −t^2 −1. All solutions to this equation are of the form t^3 /3 + t + C.

DEFINITION 17.1.4 A first order initial value problem is a system of equations of the form F (t, y, y˙) = 0, y(t 0 ) = y 0. Here t 0 is a fixed time and y 0 is a number. A solution of an initial value problem is a solution f (t) of the differential equation that also satisfies the initial condition f (t 0 ) = y 0.

EXAMPLE 17.1.5 The initial value problem ˙y = t^2 + 1, y(1) = 4 has solution f (t) = t^3 /3 + t + 8/3.

The general first order equation is rather too general, that is, we can’t describe methods that will work on them all, or even a large portion of them. We can make progress with specific kinds of first order differential equations. For example, much can be said about equations of the form ˙y = φ(t, y) where φ is a function of the two variables t and y. Under reasonable conditions on φ, such an equation has a solution and the corresponding initial value problem has a unique solution. However, in general, these equations can be very difficult or impossible to solve explicitly.

EXAMPLE 17.1.6 Consider this specific example of an initial value problem for New- ton’s law of cooling: y˙ = 2(25 − y), y(0) = 40. We first note that if y(t 0 ) = 25, the right hand side of the differential equation is zero, and so the constant function y(t) = 25 is a solution to the differential equation. It is not a solution to the initial value problem, since y(0) 6 = 40. (The physical interpretation of this constant solution is that if a liquid is at the same temperature as its surroundings, then the liquid will stay at that temperature.)

458 Chapter 17 Differential Equations

EXAMPLE 17.1.7 Solve the differential equation y˙ = 2t(25 − y). This is almost identical to the previous example. As before, y(t) = 25 is a solution. If y 6 = 25, ∫ (^1) 25 − y

dy =

2 t dt

(−1) ln | 25 − y| = t^2 + C 0 ln | 25 − y| = −t^2 − C 0 = −t^2 + C | 25 − y| = e−t

(^2) +C = e−t

2 eC y − 25 = ± eC^ e−t

2

y = 25 ± eC^ e−t^2 = 25 + Ae−t^2.

As before, all solutions are represented by y = 25 + Ae−t^2 , allowing A to be zero.

DEFINITION 17.1.8 A first order differential equation is separable if it can be written in the form ˙y = f (t)g(y).

As in the examples, we can attempt to solve a separable equation by converting to the form (^) ∫ 1 g(y) dy^ =

f (t) dt.

This technique is called separation of variables. The simplest (in principle) sort of separable equation is one in which g(y) = 1, in which case we attempt to solve ∫ 1 dy =

f (t) dt.

We can do this if we can find an anti-derivative of f (t). Also as we have seen so far, a differential equation typically has an infinite number of solutions. Ideally, but certainly not always, a corresponding initial value problem will have just one solution. A solution in which there are no unknown constants remaining is called a particular solution. The general approach to separable equations is this: Suppose we wish to solve ˙y = f (t)g(y) where f and g are continuous functions. If g(a) = 0 for some a then y(t) = a is a constant solution of the equation, since in this case ˙y = 0 = f (t)g(a). For example, y˙ = y^2 − 1 has constant solutions y(t) = 1 and y(t) = −1. To find the nonconstant solutions, we note that the function 1/g(y) is continuous where g 6 = 0, so 1/g has an antiderivative G. Let F be an antiderivative of f. Now we write

G(y) =

g(y) dy^ =

f (t) dt = F (t) + C,

so G(y) = F (t) + C. Now we solve this equation for y.

17.1 First Order Differential Equations 459

Of course, there are a few places this ideal description could go wrong: we need to be able to find the antiderivatives G and F , and we need to solve the final equation for y. The upshot is that the solutions to the original differential equation are the constant solutions, if any, and all functions y that satisfy G(y) = F (t) + C.

EXAMPLE 17.1.9 Consider the differential equation ˙y = ky. When k > 0, this de- scribes certain simple cases of population growth: it says that the change in the population y is proportional to the population. The underlying assumption is that each organism in the current population reproduces at a fixed rate, so the larger the population the more new organisms are produced. While this is too simple to model most real populations, it is useful in some cases over a limited time. When k < 0, the differential equation describes a quantity that decreases in proportion to the current value; this can be used to model radioactive decay. The constant solution is y(t) = 0; of course this will not be the solution to any interesting initial value problem. For the non-constant solutions, we proceed much as before: (^) ∫ 1 y

dy =

k dt

ln |y| = kt + C |y| = ekteC y = ± eC^ ekt y = Aekt.

Again, if we allow A = 0 this includes the constant solution, and we can simply say that y = Aekt^ is the general solution. With an initial value we can easily solve for A to get the solution of the initial value problem. In particular, if the initial value is given for time t = 0, y(0) = y 0 , then A = y 0 and the solution is y = y 0 ekt.

Exercises 17.1.

  1. Which of the following equations are separable? a. y˙ = sin(ty) b. y˙ = etey c. y y˙ = t d. y˙ = (t^3 − t) arcsin(y) e. y˙ = t^2 ln y + 4t^3 ln y
  2. Solve ˙y = 1/(1 + t^2 ). ⇒
  3. Solve the initial value problem ˙y = tn^ with y(0) = 1 and n ≥ 0. ⇒
  4. Solve ˙y = ln t. ⇒

17.2 First Order Homogeneous Linear Equations 461

EXAMPLE 17.2.2 The equation ˙y = 2t(25 − y) can be written ˙y + 2ty = 50t. This is linear, but not homogeneous. The equation y˙ = ky, or y˙ − ky = 0 is linear and homogeneous, with a particularly simple p(t) = −k.

Because first order homogeneous linear equations are separable, we can solve them in the usual way: y˙ = −p(t)y ∫ (^1) y dy^ =

−p(t) dt

ln |y| = P (t) + C y = ± eP^ (t)+C y = AeP^ (t),

where P (t) is an anti-derivative of −p(t). As in previous examples, if we allow A = 0 we get the constant solution y = 0.

EXAMPLE 17.2.3 Solve the initial value problems y˙ + y cos t = 0, y(0) = 1/2 and y(2) = 1/2. We start with

P (t) =

− cos t dt = − sin t,

so the general solution to the differential equation is

y = Ae−^ sin^ t.

To compute A we substitute: 1 2 =^ Ae

− sin 0 (^) = A,

so the solutions is

y =^12 e−^ sin^ t.

For the second problem, 1 2 =^ Ae

− sin 2

A =^12 esin 2

so the solution is

y =^12 esin 2e−^ sin^ t.

462 Chapter 17 Differential Equations

EXAMPLE 17.2.4 Solve the initial value problem t y˙ + 3y = 0, y(1) = 2, assuming t > 0. We write the equation in standard form: y˙ + 3y/t = 0. Then

P (t) =

− (^3) t dt = −3 ln t

and y = Ae−3 ln^ t^ = At−^3.

Substituting to find A: 2 = A(1)−^3 = A, so the solution is y = 2t−^3.

Exercises 17.2.

Find the general solution of each equation in 1–4.

  1. y˙ + 5y = 0 ⇒
  2. y˙ − 2 y = 0 ⇒
  3. y˙ + (^) 1 +y t 2 = 0 ⇒
  4. y˙ + t^2 y = 0 ⇒ In 5–14, solve the initial value problem.
  5. y˙ + y = 0, y(0) = 4 ⇒
  6. y˙ − 3 y = 0, y(1) = − 2 ⇒
  7. y˙ + y sin t = 0, y(π) = 1 ⇒
  8. y˙ + yet^ = 0, y(0) = e ⇒
  9. y˙ + y

√ 1 + t^4 = 0, y(0) = 0 ⇒

  1. y˙ + y cos(et) = 0, y(0) = 0 ⇒
  2. t y˙ − 2 y = 0, y(1) = 4 ⇒
  3. t^2 y˙ + y = 0, y(1) = −2, t > 0 ⇒
  4. t^3 y˙ = 2y, y(1) = 1, t > 0 ⇒
  5. t^3 y˙ = 2y, y(1) = 0, t > 0 ⇒
  6. A function y(t) is a solution of ˙y + ky = 0. Suppose that y(0) = 100 and y(2) = 4. Find k and find y(t). ⇒
  7. A function y(t) is a solution of ˙y + tk^ y = 0. Suppose that y(0) = 1 and y(1) = e−^13. Find k and find y(t). ⇒
  8. A bacterial culture grows at a rate proportional to its population. If the population is one million at t = 0 and 1.5 million at t = 1 hour, find the population as a function of time. ⇒
  9. A radioactive element decays with a half-life of 6 years. If a block of the element has mass 10 kilograms at t = 0, find the amount of the element at time t. ⇒

464 Chapter 17 Differential Equations

condition at t = 1, we may assume t > 0. We start by solving the homogeneous equation as usual; call the solution g:

g = Ae−

(3/t) dt (^) = Ae−3 ln t (^) = At− (^3).

Then as in the discussion, h(t) = t−^3 and v′(t) = t^2 /t−^3 = t^5 , so v(t) = t^6 /6. We know that every solution to the equation looks like

v(t)t−^3 + At−^3 = t

6 6

t−^3 + At−^3 = t

3 6

  • At−^3.

Finally we substitute to find A:

1 2 =

(1)^3

6 +^ A(1)

− 3 =^1

6 +^ A

A =^12 − 16 =^13.

The solution is then

y = t

3 6 +

3 t

Here is an alternate method for finding a particular solution to the differential equation, using an integrating factor. In the differential equation ˙y + p(t)y = f (t), we note that if we multiply through by a function I(t) to get I(t) ˙y + I(t)p(t)y = I(t)f (t), the left hand side looks like it could be a derivative computed by the product rule:

d dt (I(t)y) =^ I(t) ˙y^ +^ I

′(t)y.

Now if we could choose I(t) so that I′(t) = I(t)p(t), this would be exactly the left hand side of the differential equation. But this is just a first order homogeneous linear equation, and

we know a solution is I(t) = eQ(t), where Q(t) =

p dt; note that Q(t) = −P (t), where

P (t) appears in the variation of parameters method and P ′(t) = −p. Now the modified differential equation is

e−P^ (t)^ y˙ + e−P^ (t)p(t)y = e−P^ (t)f (t) d dt (e

−P (t)y) = e−P (t)f (t).

17.3 First Order Linear Equations 465

Integrating both sides gives

e−P^ (t)y =

e−P^ (t)f (t) dt

y = eP^ (t)

e−P^ (t)f (t) dt.

If you look carefully, you will see that this is exactly the same solution we found by variation of parameters, because e−P^ (t)f (t) = f (t)/h(t). Some people find it easier to remember how to use the integrating factor method than variation of parameters. Since ultimately they require the same calculation, you should use whichever of the two you find easier to recall. Using this method, the solution of the previous example would look just a bit different: Starting with ˙y +3y/t = t^2 , we recall that

the integrating factor is e

3 /t (^) = e3 ln t (^) = t (^3). Then we multiply through by the integrating

factor and solve: t^3 y˙ + t^33 y/t = t^3 t^2 t^3 y˙ + t^23 y = t^5 d dt (t

(^3) y) = t 5

t^3 y = t^6 / 6 y = t^3 / 6.

This is the same answer, of course, and the problem is then finished just as before.

Exercises 17.3.

In problems 1–10, find the general solution of the equation.

  1. y˙ + 4y = 8 ⇒
  2. y˙ − 2 y = 6 ⇒
  3. y˙ + ty = 5t ⇒
  4. y˙ + ety = − 2 et^ ⇒
  5. y˙ − y = t^2 ⇒
  6. 2 ˙y + y = t ⇒
  7. t y˙ − 2 y = 1/t, t > 0 ⇒
  8. t y˙ + y =

√ t, t > 0 ⇒

  1. y˙ cos t + y sin t = 1, −π/ 2 < t < π/ 2 ⇒
  2. y˙ + y sec t = tan t, −π/ 2 < t < π/ 2 ⇒

17.4 Approximation 467

upper bound on how far off the approximation might be, that is, how far yn is from f (tn). Suffice it to say that the bound is not particularly good and that there are other more complicated approximation techniques that do better.

EXAMPLE 17.4.3 Let us compute an approximation to the solution for ˙y = t − y^2 , y(0) = 0, when t = 1. We will use ∆t = 0.2, which is easy to do even by hand, though we should not expect the resulting approximation to be very good. We get

(t 1 , y 1 ) = (0 + 0. 2 , 0 + (0 − 02 )0.2) = (0. 2 , 0) (t 2 , y 2 ) = (0.2 + 0. 2 , 0 + (0. 2 − 02 )0.2) = (0. 4 , 0 .04) (t 3 , y 3 ) = (0. 6 , 0 .04 + (0. 4 − 0. 042 )0.2) = (0. 6 , 0 .11968) (t 4 , y 4 ) = (0. 8 , 0 .11968 + (0. 6 − 0. 119682 )0.2) = (0. 8 , 0 .23681533952) (t 5 , y 5 ) = (1. 0 , 0 .23681533952 + (0. 6 − 0. 236815339522 )0.2) = (1. 0 , 0 .385599038513605)

So y(1) ≈ 0 .3856. As it turns out, this is not accurate to even one decimal place. Fig- ure 17.4.1 shows these points connected by line segments (the lower curve) compared to a solution obtained by a much better approximation technique. Note that the shape is approximately correct even though the end points are quite far apart.

0 1 t

y

..........................................................................................................................................................................................

......................................................

...................................................

.......................................

.....................................

.....................................

................................

................................

...............................

.........................

....................................................................................................................................

............................................................

................................................

.........................................

......................................

....................................

..................................

.................................

................................

...............................

...............................

................

................... .....^ ................................

........................................................

Figure 17.4.1 Approximating a solution to ˙y = t − y^2 , y(0) = 0.

If you need to do Euler’s method by hand, it is useful to construct a table to keep track of the work, as shown in figure 17.4.2. Each row holds the computation for a single step: the starting point (ti, yi); the stepsize ∆t; the computed slope φ(ti, yi); the change in y, ∆y = φ(ti, yi)∆t; and the new point, (ti+1, yi+1) = (ti + ∆t, yi + ∆y). The starting point in each row is the newly computed point from the end of the previous row. It is easy to write a short function in Sage to do Euler’s method; see this Sage work- sheet.

468 Chapter 17 Differential Equations

(t, y) ∆t φ(t, y) ∆y = φ(t, y)∆t (t + ∆t, y + ∆y) (0, 0) 0. 2 0 0 (0. 2 , 0) (0. 2 , 0) 0. 2 0. 2 0. 04 (0. 4 , 0 .04) (0. 4 , 0 .04) 0. 2 0. 3984 0. 07968 (0. 6 , 0 .11968) (0. 6 , 0 .11968) 0. 2 0. 58... 0. 117... (0. 8 , 0. 236.. .) (0. 8 , 0. 236.. .) 0. 2 0. 743... 0. 148... (1. 0 , 0. 385.. .)

Figure 17.4.2 Computing with Euler’s Method.

Euler’s method is related to another technique that can help in understanding a dif- ferential equation in a qualitative way. Euler’s method is based on the ability to compute the slope of a solution curve at any point in the plane, simply by computing φ(t, y). If we compute φ(t, y) at many points, say in a grid, and plot a small line segment with that slope at the point, we can get an idea of how solution curves must look. Such a plot is called a slope field. A slope field for φ = t − y^2 is shown in figure 17.4.3; compare this to figure 17.4.1. With a little practice, one can sketch reasonably accurate solution curves based on the slope field, in essence doing Euler’s method visually.

Figure 17.4.3 A slope field for ˙y = t − y^2.

Even when a differential equation can be solved explicitly, the slope field can help in understanding what the solutions look like with various initial conditions. Recall the logistic equation from exercise 13 in section 17.1, ˙y = ky(M − y): y is a population at time t, M is a measure of how large a population the environment can support, and k measures the reproduction rate of the population. Figure 17.4.4 shows a slope field for this equation

470 Chapter 17 Differential Equations

If such a function is a solution then

r^2 ert^ − rert^ − 2 ert^ = 0 ert(r^2 − r − 2) = 0 (r^2 − r − 2) = 0 (r − 2)(r + 1) = 0,

so r is 2 or −1. Not only are f = e^2 t^ and g = e−t^ solutions, but notice that y = Af + Bg is also, for any constants A and B:

(Af + Bg)′′^ − (Af + Bg)′^ − 2(Af + Bg) = Af ′′^ + Bg′′^ − Af ′^ − Bg′^ − 2 Af − 2 Bg = A(f ′′^ − f ′^ − 2 f ) + B(g′′^ − g′^ − 2 g) = A(0) + B(0) = 0.

Can we find A and B so that this is a solution to the initial value problem? Let’s substitute:

5 = y(0) = Af (0) + Bg(0) = Ae^0 + Be^0 = A + B

and 0 = ˙y(0) = Af ′(0) + Bg′(0) = A 2 e^0 + B(−1)e^0 = 2A − B.

So we need to find A and B that make both 5 = A + B and 0 = 2A − B true. This is a simple set of simultaneous equations: solve B = 2A, substitute to get 5 = A + 2A = 3A. Then A = 5/3 and B = 10/3, and the desired solution is (5/3)e^2 t^ + (10/3)e−t. You now see why the initial condition in this case included both y(0) and y˙(0): we needed two equations in the two unknowns A and B

You should of course wonder whether there might be other solutions; the answer is no. We will not prove this, but here is the theorem that tells us what we need to know:

THEOREM 17.5.2 Given the differential equation ay¨ + b y˙ + cy = 0, a 6 = 0, consider the quadratic polynomial ax^2 + bx + c, called the characteristic polynomial. Using the quadratic formula, this polynomial always has one or two roots, call them r and s. The general solution of the differential equation is:

(a) y = Aert^ + Best, if the roots r and s are real numbers and r 6 = s. (b) y = Aert^ + Btert, if r = s is real. (c) y = A cos(βt)eαt^ + B sin(βt)eαt, if the roots r and s are complex numbers α + βi and α − βi.

17.5 Second Order Homogeneous Equations 471

EXAMPLE 17.5.3 Suppose a mass m is hung on a spring with spring constant k. If the spring is compressed or stretched and then released, the mass will oscillate up and down. Because of friction, the oscillation will be damped: eventually the motion will cease. The damping will depend on the amount of friction; for example, if the system is suspended in oil the motion will cease sooner than if the system is in air. Using some simple physics, it is not hard to see that the position of the mass is described by this differential equation: my¨ + b y˙ + ky = 0. Using m = 1, b = 4, and k = 5 we find the motion of the mass. The characteristic polynomial is x^2 + 4x + 5 with roots (− 4 ±

16 − 20)/2 = − 2 ± i. Thus the general solution is y = A cos(t)e−^2 t^ + B sin(t)e−^2 t. Suppose we know that y(0) = 1 and ˙y(0) = 2. Then as before we form two simultaneous equations: from y(0) = 1 we get 1 = A cos(0)e^0 + B sin(0)e^0 = A. For the second we compute

y˙ = − 2 Ae−^2 t^ cos(t) + Ae−^2 t(− sin(t)) − 2 Be−^2 t^ sin(t) + Be−^2 t^ cos(t),

and then

2 = − 2 Ae^0 cos(0) − Ae^0 sin(0) − 2 Be^0 sin(0) + Be^0 cos(0) = − 2 A + B.

So we get A = 1, B = 4, and y = cos(t)e−^2 t^ + 4 sin(t)e−^2 t. Here is a useful trick that makes this easier to understand: We have y = (cos t + 4 sin t)e−^2 t. The expression cos t + 4 sin t is a bit reminiscent of the trigonometric formula cos(α − β) = cos(α) cos(β) + sin(α) sin(β) with α = t. Let’s rewrite it a bit as

√ 17

√^1

cos t + √^4 17

sin t

Note that (1/

17)^2 + (4/

17)^2 = 1, which means that there is an angle β with cos β = 1 /

17 and sin β = 4/

17 (of course, β may not be a “nice” angle). Then

cos t + 4 sin t =

17 (cos t cos β + sin β sin t) =

17 cos(t − β).

Thus, the solution may also be written y =

17 e−^2 t^ cos(t − β). This is a cosine curve that has been shifted β to the right; the

17 e−^2 t^ has the effect of diminishing the amplitude of the cosine as t increases; see figure 17.5.1. The oscillation is damped very quickly, so in the first graph it is not clear that this is an oscillation. The second graph shows a restricted range for t.

Other physical systems that oscillate can also be described by such differential equa- tions. Some electric circuits, for example, generate oscillating current.

EXAMPLE 17.5.4 Find the solution to the intial value problem ¨y − 4 ˙y + 4y = 0, y(0) = −3, ˙y(0) = 1. The characteristic polynomial is x^2 − 4 x + 4 = (x − 2)^2 , so there

17.6 Second Order Linear Equations 473

  1. Solve the initial value problem ¨y + 4 ˙y + 13y = 0, y(0) = 1, ˙y(0) = 1. Put your answer in the form developed at the end of example 17.5.3. ⇒
  2. Solve the initial value problem ¨y − 8 ˙y + 25y = 0, y(0) = 3, ˙y(0) = 0. Put your answer in the form developed at the end of example 17.5.3. ⇒
  3. A mass-spring system m¨y + b y˙ + ky has k = 29, b = 4, and m = 1. At time t = 0 the position is y(0) = 2 and the velocity is ˙y(0) = 1. Find y(t). ⇒
  4. A mass-spring system m¨y + b y˙ + ky has k = 24, b = 12, and m = 3. At time t = 0 the position is y(0) = 0 and the velocity is ˙y(0) = −1. Find y(t). ⇒
  5. Consider the differential equation a¨y + b y˙ = 0, with a and b both non-zero. Find the general solution by the method of this section. Now let g = y˙; the equation may be written as a g˙ + bg = 0, a first order linear homogeneous equation. Solve this for g, then use the relationship g = ˙y to find y.
  6. Suppose that y(t) is a solution to a¨y + b y˙ + cy = 0, y(t 0 ) = 0, ˙y(t 0 ) = 0. Show that y(t) = 0.

17.6 Se ond Order Linear Equations

Now we consider second order equations of the form ay¨ + b y˙ + cy = f (t), with a, b, and c constant. Of course, if a = 0 this is really a first order equation, so we assume a 6 = 0. Also, much as in exercise 20 of section 17.5, if c = 0 we can solve the related first order equation a h˙ + bh = f (t), and then solve h = ˙y for y. So we will only examine examples in which c 6 = 0. Suppose that y 1 (t) and y 2 (t) are solutions to ay¨ + b y˙ + cy = f (t), and consider the function h = y 1 − y 2. We substitute this function into the left hand side of the differential equation and simplify:

a(y 1 − y 2 )′′^ + b(y 1 − y 2 )′^ + c(y 1 − y 2 ) = ay 1 ′′ + by 1 ′ + cy 1 − (ay 2 ′′ + by 2 ′ + cy 2 ) = f (t) − f (t) = 0.

So h is a solution to the homogeneous equation ay¨ + b y˙ + cy = 0. Since we know how to find all such h, then with just one particular solution y 2 we can express all possible solutions y 1 , namely, y 1 = h + y 2 , where now h is the general solution to the homogeneous equation. Of course, this is exactly how we approached the first order linear equation. To make use of this observation we need a method to find a single solution y 2. This turns out to be somewhat more difficult than the first order case, but if f (t) is of a certain simple form, we can find a solution using the method of undetermined coefficients, sometimes more whimsically called the method of judicious guessing.

EXAMPLE 17.6.1 Solve the differential equation ¨y − y˙ − 6 y = 18t^2 + 5. The general solution of the homogeneous equation is Ae^3 t^ + Be−^2 t. We guess that a solution to the non-homogeneous equation might look like f (t) itself, namely, a quadratic y = at^2 + bt + c.

474 Chapter 17 Differential Equations

Substituting this guess into the differential equation we get

y¨ − y˙ − 6 y = 2a − (2at + b) − 6(at^2 + bt + c) = − 6 at^2 + (− 2 a − 6 b)t + (2a − b − 6 c).

We want this to equal 18t^2 + 5, so we need

− 6 a = 18 − 2 a − 6 b = 0 2 a − b − 6 c = 5

This is a system of three equations in three unknowns and is not hard to solve: a = −3, b = 1, c = −2. Thus the general solution to the differential equation is Ae^3 t^ + Be−^2 t^ − 3 t^2 + t − 2.

So the “judicious guess” is a function with the same form as f (t) but with undetermined (or better, yet to be determined) coefficients. This works whenever f (t) is a polynomial.

EXAMPLE 17.6.2 Consider the initial value problem my¨ + ky = −mg, y(0) = 2, y˙(0) = 50. The left hand side represents a mass-spring system with no damping, i.e., b = 0. Unlike the homogeneous case, we now consider the force due to gravity, −mg, assuming the spring is vertical at the surface of the earth, so that g = 980. To be specific, let us take m = 1 and k = 100. The general solution to the homogeneous equation is A cos(10t) + B sin(10t). For the solution to the non-homogeneous equation we guess simply a constant y = a, since −mg = −980 is a constant. Then ¨y + 100y = 100a so a = − 980 /100 = − 9 .8. The desired general solution is then A cos(10t) + B sin(10t) − 9 .8. Substituting the initial conditions we get

2 = A − 9. 8 50 = 10B

so A = 11.8 and B = 5 and the solution is 11.8 cos(10t) + 5 sin(10t) − 9 .8.

More generally, this method can be used when a function similar to f (t) has derivatives that are also similar to f (t); in the examples so far, since f (t) was a polynomial, so were its derivatives. The method will work if f (t) has the form p(t)eαt^ cos(βt) + q(t)eαt^ sin(βt), where p(t) and q(t) are polynomials; when α = β = 0 this is simply p(t), a polynomial. In the most general form it is not simple to describe the appropriate judicious guess; we content ourselves with some examples to illustrate the process.

EXAMPLE 17.6.3 Find the general solution to ¨y + 7 ˙y + 10y = e^3 t. The characteristic equation is r^2 + 7r + 10 = (r + 5)(r + 2), so the solution to the homogeneous equation is