You are on page 1of 24

Day 5

MATH24-1 (Differential Equations)

Ch 2.1 Linear Equations; Method of Integrating


Factors (Page 31-42)
Elementary Differential Equations and Boundary Value Problems, 10th edition, by
William E. Boyce and Richard C. DiPrima, ©2013 by John Wiley & Sons, Inc.
• A linear first order ODE has the general form
dy
 f (t , y )
dt

where f is linear in y. Examples include equations with


constant coefficients, such as those in Chapter 1,
y  ay  b

or equations with variable coefficients:


dy
 p (t ) y  g (t )
dt
Constant Coefficient Case

• For a first order linear equation with constant coefficients,


dy
 ay  b,
dt
recall that we can use methods of calculus to solve:
dy / dt
 a
y b/ a
dy
 y  b / a   a dt
ln y  b / a  a t  C
y  b / a  keat , k  eC
Variable Coefficient Case:
Method of Integrating Factors
• We next consider linear first order ODEs with variable
coefficients:
dy
 p (t ) y  g (t )
dt
• The method of integrating factors involves multiplying this
equation by a function (t), chosen so that the resulting
equation is easily integrated.
Example 2: Integrating Factor (1 of 2)

• Consider the following equation:


dy 1
 2 y  12 et / 3
dt
• Multiplying both sides by (t), we obtain
dy 1 1
 (t )   (t ) y   (t )et / 3
dt 2 2

• We will choose (t) so that left side is derivative of known


quantity. Consider the following, and recall product rule:
d
 (t ) y    (t ) dy  d (t ) y
dt dt dt
• Choose (t) so that
1

 (t )   (t )   (t )  et / 2
2
Example 2: General Solution (2 of 2)

• With (t) = et/2, we solve the original equation as follows:


dy 1 1
 y  et / 3
dt 2 2
dy 1 t / 2 1
 e y  e 5t / 6
3
et / 2 Sample Solutions : y  et / 3  Ce t / 2
5
dt 2 2

d t/2
 1 yt

e y  e 5t / 6
dt 2
3

3 5t / 6
e y  e C
t/2
2

5
general solution : 1

3
y  et / 3  Cet / 2 1 2 3 4 5 6
t

5
1
Method of Integrating Factors:
Variable Right Side
• In general, for variable right side g(t), the solution can be
found as follows:
dy
 ay  g (t )
dt
dy
 (t )  a (t ) y   (t ) g (t )
dt
at dy
e  ae at y  e at g (t )
dt
d at
dt
 
e y  e at g (t )

e at y   e at g (t )dt
y  e  at  e at g (t )dt  Ce at
Example 3: General Solution (1 of 2)

• We can solve the following equation


dy
 2y  4 t
dt
using the formula derived on the previous slide:
y  e  at  e at g (t )dt  Ce at  e 2t  e 2t (4  t )dt  Ce2t

• Integrating by parts,  e 2t (4  t )dt   4e 2t dt   te2t dt


 1 1 
 2et / 5   te 2t   e  2t dt 
 2 2 
7  2t 1  2t
  e  te
4 2

• Thus  7 1  7 1
y  e 2t   e  2t  te2t   Ce2t    t  Ce2t
 4 2  4 2
dy
 2y  4 t
dt
Example 3: Graphs of Solutions (2 of 2)

• The graph shows the direction field along with several integral
curves. If we set C = 0, the exponential term drops out and you
should notice how the solution in that case, through the point
(0, −7/4), separates the solutions into those that grow
exponentially in the positive direction from those that grow
exponentially in the negative direction.
yt

7 1
y    t  Ce2t 0
0.5 1.0 1.5 2.0
t

4 2
1

4
Method of Integrating Factors for
General First Order Linear Equation
• Next, we consider the general first order linear equation
dy
 p (t ) y  g (t )
dt
• Multiplying both sides by (t), we obtain
dy
 (t )  p(t )  (t ) y   (t ) g (t )
dt

• Next, we want (t) such that '(t) = p(t)(t), from which it


will follow that
d
 (t ) y    (t ) dy  p(t )  (t ) y
dt dt
Integrating Factor for
General First Order Linear Equation
• Thus we want to choose (t) such that '(t) = p(t)(t).
• Assuming (t) > 0, it follows that
d (t )
  (t )   p(t )dt  ln  (t )   p(t )dt  k
• Choosing k = 0, we then have
 (t )  e  p (t ) dt ,
and note (t) > 0 as desired.
Solution for
General First Order Linear Equation
• Thus we have the following:
dy
 p (t ) y  g (t )
dt
dy
 (t )  p(t )  (t ) y   (t ) g (t ), where  (t )  e  p (t ) dt
dt
• Then
d
 (t ) y    (t ) g (t )
dt
 (t ) y    (t ) g (t )dt  c

y
  (t ) g (t )dt  c
, where  (t )  e  p (t ) dt
 (t )
Example 4: General Solution (1 of 2)

• To solve the initial value problem


ty  2 y  4t 2 , y1  2,
first put into standard form:
2
y  y  4t , for t  0
t
• Then
2
 e ln t   t 2
 (t )  e 
p ( t ) dt  dt
e e
2 ln t 2
t

and hence
  (t ) g (t )dt  C  (4t )dt  C  4t dt  C   t
2
t 1 C
y   3 2

 (t ) t2 t2 t2
ty  2 y  4t 2 , y1  2,

Example 4: Particular Solution (2 of 2)

• Using the initial condition y(1) = 2 and general solution

C
y  t  2 , y (1)  1  C  2  C  1
2
it follows that t
• The graphs below show solution curves for the differential equation, including a
particular solution whose graph contains the initial point (1, 2). Notice that when C
= 0, we get the parabolic solution (shown)
and that solution separates the solutions into
those that are asymptotic 1
to the positive versus y  t 2

negative y-axis. t2
t y
5

y  t2 3

2 (1,2)
1

t
2 1 1
C 2

1 yt  2
2

2
t
Example 5: A Solution in Integral Form (1 of 2)

• To solve the initial value problem


2 y  ty  2, y0  1,
first put into standard form:
t
y  y 1
2
• Then 
t t2
 (t )  e 
p ( t ) dt dt
e 2
e 4

and hence
 t e s 2 / 4 ds  C   e t 2 / 4  t e s 2 / 4 ds   Cet 2 / 4
 0  0
t 2 / 4
ye
 
2 y  ty  2, y0  1,

Example 5: A Solution in Integral Form (2 of 2)

• Notice that this solution must be left in the form of an


integral, since there is no closed form for the integral.
 t e s 2 / 4 ds   Cet 2 / 4
 0
t 2 / 4
ye

• Using software such as Mathematica or Maple, we can
approximate the solution for the given initial conditions as
well as for other initial y t

3
conditions. 2

• Several solution curves 1

are shown. 1 2 3 4 5 6
t

1
 t e s 2 / 4 ds   Cet 2 / 4
 0
y  e t
2
/4

2 

3
Solution for
General First Order Linear Equation
For an equation linear in y:

y′ + p(t)y = g(t)

μ(t) = e∫p(t)dt

‫ 𝑡𝑑 𝑡 𝑔 𝑡 𝜇 ׬‬+ 𝐶
𝑦=
𝜇 𝑡
Solution for
General First Order Linear Equation
Other forms

Linear in y: dy + yp(x)dx = g(x)


General Solution: μ(x)y = ∫μ(x)g(x)dx where μ(x) = e∫p(x)dx

Linear in x: dx + xp(y)dy = s(y)


General Solution: μ(y)x = ∫μ(y)s(y)dy where μ(y) = e∫p(y)dy
Examples
In each of the Problems 13 through 20, find the solution of
the given initial value problem.

16/40) y′ + (2/t)y = (cos t)/t2, y(π) = 0, t > 0

18/40) ty′ + 2y = sin t, y(π/2) = 1, t > 0

20/40) ty′ + (t + 1)y = t, y(ln 2) = 1, t > 0


Examples
4) dy = (x − 2y cot 2x)dx
Ans: 4y sin 2x = −2x cos 2x + sin 2x + c

5) 2y(y2 − x)dy = dx
2
Ans: 𝑥 = 𝑦2 −1+ 𝑐𝑒 −𝑦

6) e−y sec2 y dy = dx + xdy


Ans: xey = tan y + c

𝑑𝐼
7) 𝐿 + 𝑅𝐼 = 𝐸; where L, R, and E are constants, when t =
𝑑𝑡
0, I = 0
Examples
Bernoulli Equations. Sometimes it is possible to solve a
nonlinear equation by making a change of the dependent
variable that converts it into a linear equation. The most
important such equation has the form
y′ + p(t)y = q(t)yn,
and is called a Bernoulli equation after Jakob Bernoulli.
Problems 27 through 31 deal with equations of this type.
27/77)
(a) Solve Bernoulli’s equation when n = 0; when n = 1.
(b) Show that if n ≠ 0, 1, then the substitution v = y1−n reduces
Bernoulli’s equation to a linear equation. This method of
solution was found by Leibniz in 1696.
Solution for Bernoulli Equation

y′ + p(t)y = q(t)yn

μ(t) = e(1−n)∫p(t)dt

1 − 𝑛 ‫ 𝑡𝑑 𝑡 𝑞 𝑡 𝜇 ׬‬+ 𝐶
𝑦1−𝑛 =
𝜇 𝑡
Examples
In each of Problems 28 through 31, the given equation is a
Bernoulli equation. In each case solve it by using the
substitution mentioned in Problem 27(b).

28/78) t2y′ + 2ty − y3 = 0, t > 0

31/78) dy/dt = (Γ cos t + T)y − y3, where Γ and T are


constants. This equation also occurs in the study of the
stability of fluid flow.
Examples
Bernoulli Equations

1) xdy − [y + xy3(1 + ln x)]dx = 0


𝑥2 4 2
Ans: = − 𝑥 3 − 𝑥 3 ln 𝑥 + 𝑐
𝑦2 9 3

2)
15/89) xy′ − y = xkyn, where n ≠ 1 and k + n ≠ 1
Ans: (k + n − 1)y1−n = (1 − n)xk + cx1−n

You might also like