You are on page 1of 18

MAS 201 Spring 2024 (CD)

Differential Equations and Applications

§2.3

Gyo Taek Jin

March 6, 2024

1 / 18
Chapter 2
First-Order Differential Equations
§2.1 Solution Curves Without a Solution
§2.2 Separable Equations
§2.3 Linear Equations
§2.4 Exact Equations
§2.5 Solutions by Substitutions
..
.

2 / 18
Definition (Linear Equation)
A first-order differential equation of the form
dy
a1 (x ) + a0 (x )y = g(x ) (1)
dx
is said to be a linear equation in the dependent variable y .
When g(x ) = 0 the equation (1) is said to be homogeneous;
otherwise, it is nonhomogeneous.
By dividing both sides of (1) by a1 (x ), we obtain a more useful
form, the standard form, of a linear equation
dy
+ P(x )y = f (x ). (2)
dx
We seek a solution of (2) on an interval I for which P(x ) and f (x )
are continuous.

3 / 18
The Property of Linear Equation in Standard Form
dy
+ P(x )y = f (x ). (2)
dx
This linear equation in standard form has the associated
homogeneous equation
dy
+ P(x )y = 0. (3)
dx
The linear differential equation (2) has the property that its
solution is the sum y = yc + yp where yc is a solution of the
associated homogeneous equation (3) and yp is a particular
solution of the nonhomogeneous equation (2).
d d d
   
(yc + yp ) + P(x )(yc + yp ) = yc + P(x )yc + yp + P(x )yp
dx dx dx
= 0 + f (x )
= f (x )
4 / 18
The Homogeneous Differential Equation
The homogeneous equation
dy
+ P(x )y = 0 (3)
dx
is separable. Dividing by y , we have
dy dy
Z Z
= −P(x ) dx ⇒ =− P(x ) dx
y y
Z
⇒ ln |y | = − P(x ) dx + c1
R R R
⇒ y = ±e − P(x )dx +c1
= ±e c1 e − P(x )dx
= c e− P(x )dx

For convenience, let us write


R
yc = c e − P(x )dx
.
R
Then, y1 = e − P(x )dx
and yc = c y1 (x ).
5 / 18
The Nonhomogeneous Differential Equation
Now we find a particular solution of the nonhomogeneous equation
(2), using the procedure known as variation of parameters.
R
Suppose yp = u(x )y1 (x ) = u(x )e − P(x )dx is a solution of (2).
Then
dyp dy1 du
+ P(x )yp = f (x ) ⇒ u + y1 + P(x )uy1 = f (x )
dx  dx dx
dy1 du du

⇒u + P(x )y1 + y1 = f (x ) ⇒ y1 = f (x )
dx dx dx
f (x ) f (x )
Z Z R
⇒ du = dx ⇒ u = dx = e P(x )dx f (x )dx
y1 (x ) y1 (x )
R Z R
⇒ yp = u y1 = e − P(x )dx
e P(x )dx
f (x )dx

We have the solution


R R Z R
y = yc + yp = c e − P(x )dx
+ e− P(x )dx
e P(x )dx
f (x )dx (4)

6 / 18
Method of Solution
R
P(x )dx
The function e used above is called integrating factor.
Guidelines for Solving a Linear First-Order Equation
1. Put a linear equation of form (1) into standard form
R (2) and
then determine P(x ) and the integrating factor e P(x )dx .
2. Multiply (2) by the integrating factor. The left side of the
resulting equation is automatically the derivative of the
integrating factor times y . Write
d h R P(x )dx
i R
P(x )dx
e y =e f (x )
dx
and then integrate both sides of this equation.
d h R P(x )dx
i h R
P(x )dx
i R
P(x )dx dy
e y = e P(x ) y + e
dx dx
dy
R   R
P(x )dx P(x )dx
=e + P(x )y =e f (x )
dx
7 / 18
Example (1) (Solving a Linear Differential Equation)
dy
Solve − 3y = 6.
dx
Solution
dy
This problem can be solved by separation of variables y +2 = 3dx .
Alternatively, we solve itR as a linear DE using
the integrating factor e −3dx = e −3x .
 
d −3x y ) = 6e −3x ⇒ e −3x y = 6e −3x dx = 6 − 13 e −3x + c
R
dx (e

⇒ y = e (−2e −3x + c)
3x

⇒ y = −2 + ce 3x , −∞ < x < ∞.

The differential equation can be written as


dy /dx = 3(y + 2), an autonomous equation
with critical point y = −2.
This critical point is a repeller.

8 / 18
General Solution
In the standard form of a linear DE
dy
+ P(x )y = f (x ), (2)
dx
suppose that P(x ) and f (x ) are continuous in an interval I.
Then both F (x , y ) = −P(x )y + f (x ) and ∂F /∂y = −P(x ) are
continuous on any rectangle R ⊂ I × (−∞, ∞).
The solution
R R Z R
− P(x )dx − P(x )dx P(x )dx
y =ce +e e f (x )dx (5)

on the interval I is called the general solution. If x0 ∈ I, then for


any number y0 , an initial condition y (x0 ) = y0 determines a unique
value of c in (4). Thus, for this IVP, the interval of existence and
uniqueness of solution mentioned in Theorem (1.2.1) is the whole
interval I.
9 / 18
Example (2) (General Solution)
dy
Solve x − 4y = x 6 e x .
dx
Solution
Dividing by x , we obtain the standard form
dy 4
− y = x 5ex (10)
dx x
The functions P(x ) = −4/x and f (x ) = x 5 e x are continuous on
the interval (0, ∞). The integrating factor is
R
−4/x dx
e = e −4 ln x = (e ln x )−4 = x −4

Multiplying both sides of (10) by the integrating factor, we have

dy d h −4 i
x −4 − 4x −5 y = xe x ⇒ x y = xe x
dx dx
⇒ x −4 y = xe x − e x + c ⇒ y = x 5 e x − x 4 e x + cx 4 , 0 < x < ∞

10 / 18
Singular Points

In the first-order linear equation


dy
a1 (x ) + a0 (x )y = g(x ), (1)
dx
values of x for which a1 (x ) = 0 are called singular points.

dy
The equation x − 4y = x 6 e x of Example (2) has a singular
dx
point x = 0. The one-parameter family of solutions

y = x 5 e x − x 4 e x + cx 4

is continuous in (−∞, ∞) but it cannot be considered as the


general solution in (−∞, ∞). It is because the singular point
x = 0 causes a problem. See Problem 50 of Exercises 2.3.

11 / 18
Example (3) (General Solution)
dy
Find the general solution of (x 2 − 9) + xy = 0.
dx
Solution
We write the equation in standard form
dy x
+ 2 y =0
dx x −9

The function P(x ) = x /(x 2 − 9) is continuous on (−∞, −3), on


(−3, 3), and on (3, ∞). We compute the integrating factor
R x 1
R 2x dx
dx 1 2 −9|
e x 2 −9 =e 2 x 2 −9 = e 2 ln |x
(√
2 1/2 x2 − 9 x > 3 or x < −3
= |x − 9| = √
9 − x2 −3 < x < 3

On the first and third interval, we find the general solution


d p 2 p p
[ x − 9y ] = 0 ⇒ x 2 − 9y = c ⇒ y = c/ x 2 − 9
dx 12 / 18
Example (4) (An Initial-Value Problem)
dy
Solve the initial-value problem + y = x , y (0) = 4.
dx
Solution
This linear DE is in standard
R form with P(x ) = 1 and f (x ) = x .
The integrating factor is e dx = e x .
We find the general solution
d x
[e y ] = xe x
dx
⇒ e x y = xe x − e x + c
⇒ y = x − 1 + ce −x

By the initial condition,


we have 4 = −1 + c, i.e., c = 5.
The solution is

y = x − 1 + 5e −x , −∞ < x < ∞.

13 / 18
Discontinuous Coefficients
We may have a piecewise defined function as a coefficient.
Example (5) (An Initial-Value Problem) (
dy 1, 0 ≤ x ≤ 1
Solve + y = f (x ), y (0) = 0 where f (x ) = .
dx 0, x > 1.

Solution R
dx
For 0 ≤ x ≤ 1, the integrating factor is e = e x . We have
dy d x
+y =1 ⇒ [e y ] = e x ⇒ e x y = e x + c1 ⇒ y = 1 + c1 e −x
dx dx
By the initial condition, we have 0 = 1 + c1 , i.e., c1 = −1.
For x > 1, the integrating factor is again e x . We have
dy d x
+y =0 ⇒ [e y ] = 0 ⇒ e x y = c2 ⇒ y = c2 e −x
dx dx
For continuity at x = 1, we have 1 − e −1 = c2 e −1 , i.e., c2 = e − 1.
14 / 18
Solution (Continued)
The solution is
(
1 − e −x , 0≤x ≤1
y=
(e − 1)e −x , x > 1.

15 / 18
Funtions Defined by Integrals
AntiderivativesR of some functions are not elementary.
2
For example, e x dx and sin x 2 dx are nonelementary integrals.
R

Here we introduce two functions which are defined by


nonelementary integrals.
I The error function
Z x
2 2
erf(x ) = √ e −t dt
π 0

I The complementary error function


Z ∞
2 2
erfc(x ) = √ e −t dt
π x

The two functions are related by the identity


erf(x ) + erfc(x ) = 1

16 / 18
The Error Function
Example (6) (The Error Function)
dy
Solve the initial-value problem − 2xy = 2, y (0) = 1.
dx
Solution
This is a first-order linear DE in standard form.
R
−2xdx 2
Its integrating factor is e = e −x .
d −x 2 2
[e y ] = 2e −x
dx
2
Z x 2
⇒ e −x y = 2 e −t dt + c
Z x0
x2 2 2
⇒ y = 2e e −t dt + ce x ⇒ 1 = c
0

The solution is
2
Z x
2 2 2 √
y = 2e x e −t dt+e x or y = e x [1+ π erf(x )]
0
17 / 18
Remarks

I The differential equation


dy 1
=
dx x + y2
is not linear in y but linear in x :
dx
− x = y2
dy

I We will use the terms input and output occasionally.


The function f (x ) in the equation dy /dx + P(x )y = f (x ) is
called an input or driving function.
A solution of the differential equation for a given input is
called an output or response.

18 / 18

You might also like