NOTES FOR SECOND YEAR DIFFERENCE AND
DIFFERENTIAL EQUATION
PART III: FIRST ORDER ORDINARY DIFFERENTIAL
EQUATIONS
1. Definitions
An ordinary differential equation of order k has the form
dy d2 y dk y
(1) F x, y, , 2 , . . . , k = 0,
dx dx dx
where F is a function of k+2 variables. We will usually write ODE as an abreviation
for ordinary differential equation. A function y(x) is a solution of the ODE (1) in
the interval a < x < b if it satisfies the equation (1) for all x in this interval.
We will usually be interested in solving an initial value problem. For an ODE
of order k, this has the form
dy d2 y dk y
(2) F x, y, , 2 , . . . , k = 0
dx dx dx
dy dk−1 y
y(x0 ) = c0 , (x0 ) = c1 , . . . , (x0 ) = ck−1 .
dx dxk−1
Notice that, for an ODE of order k, one must prescribe k initial conditions.
It is usual to see some examples.
• One can check that y(x) = 12 x2 solves the ODE (y 0 )2 − 2y = 0.
√
• One can also check that the function y(x) = 1 − x2 solves the ODE
!
d y0
p = 1,
dx 1 + (y 0 )2
at least for −1 < x < 1.
• For any real number k 6= 0, the functions y1 (x) = cos(kx) and y2 (x) =
sin(kx) solve the ODE y 00 + k 2 y = 0. The general solution to this ODE is
then
y(x) = a1 y1 (x) + a2 y2 (x) = a1 cos(kx) + a2 sin(kx),
and one can solve an initial value problem for this ODE by choosing a1 and
a2 so as to match the initial conditions.
Date: 2013.
1
, • For any real number k 6= 0 the function y1 (x) = ekx and y2 (x) = e−kx solve
the ODE y 00 − k 2 y = 0. The general solution to this ODE is then
y(x) = a1 y1 (x) + a2 y2 (x) = a1 ekx + a2 e−kx ,
and one can solve an initial value problem for this ODE by choosing a1 and
a2 so as to match the initial conditions.
As we did with difference equations, we can describe an ODE with various terms.
An ODE is autonomous if the independent variable x does not appear in the
formula for the function F . An ODE is homogeneous if y ≡ 0 is a solution, i.e.
F (x, 0, . . . , 0) = 0. An ODE is linear if it has the form
dk y
dy
0 = F x, y, , . . . , k
dx dx
dy dk y
= Q(x) + P0 (x)y + P1 (x) + · · · + Pk (x) k ,
dx dy
where Q, P0 , . . . , Pk are functions of x. In this case, we will usually assume that
Pk 6= 0, and rearrange this equation to read
dk y dk−1 y dy
q(x) = k
+ p k−1 k−1
+ · · · + p1 (x) + p0 (x)y(x),
dx dx dx
where Here q = −Q/Pk and pj = Pj /Pk for j = 0, 1, . . . , k − 1. In this form we
call p0 , p1 , . . . , pk−1 the coefficients of the linear ODE, and we say it has constant
coefficients if all of these functions are constants.
For this set of notes we will concentrate on first order ODEs, which (according
to (1)) have the form
F (x, y, y 0 ) = 0.
In an associated initial value problem we prescribe one initial value, namely y(x0 ) =
c0 . According to the descricptions above, a first order ODE is autonomous if it has
the form F (y, y 0 ) = 0 and it is linear if it has the form y 0 = p(x)y + q(x).
2. Separable equations
A separable ODE has the form
dy f (x)
(3) = .
dx g(y)
Notice that we require g(y) 6= 0 in order that (3) makes sense. We can write the
solution of this equation by integrating and using the Fundamental Theorem of
Calculus. Rearange (3) to read
dy
g(y) = f (x)
dx
and integrate both sides of this equation with respect to x to get
Z x1 Z x1 Z y(x1 )
dy
(4) f (x)dx = g(y) dx = g(y)dy.
x0 x0 dx y(x0 )
Here we have used the chain rule to change variables within the integral.
2
DIFFERENTIAL EQUATION
PART III: FIRST ORDER ORDINARY DIFFERENTIAL
EQUATIONS
1. Definitions
An ordinary differential equation of order k has the form
dy d2 y dk y
(1) F x, y, , 2 , . . . , k = 0,
dx dx dx
where F is a function of k+2 variables. We will usually write ODE as an abreviation
for ordinary differential equation. A function y(x) is a solution of the ODE (1) in
the interval a < x < b if it satisfies the equation (1) for all x in this interval.
We will usually be interested in solving an initial value problem. For an ODE
of order k, this has the form
dy d2 y dk y
(2) F x, y, , 2 , . . . , k = 0
dx dx dx
dy dk−1 y
y(x0 ) = c0 , (x0 ) = c1 , . . . , (x0 ) = ck−1 .
dx dxk−1
Notice that, for an ODE of order k, one must prescribe k initial conditions.
It is usual to see some examples.
• One can check that y(x) = 12 x2 solves the ODE (y 0 )2 − 2y = 0.
√
• One can also check that the function y(x) = 1 − x2 solves the ODE
!
d y0
p = 1,
dx 1 + (y 0 )2
at least for −1 < x < 1.
• For any real number k 6= 0, the functions y1 (x) = cos(kx) and y2 (x) =
sin(kx) solve the ODE y 00 + k 2 y = 0. The general solution to this ODE is
then
y(x) = a1 y1 (x) + a2 y2 (x) = a1 cos(kx) + a2 sin(kx),
and one can solve an initial value problem for this ODE by choosing a1 and
a2 so as to match the initial conditions.
Date: 2013.
1
, • For any real number k 6= 0 the function y1 (x) = ekx and y2 (x) = e−kx solve
the ODE y 00 − k 2 y = 0. The general solution to this ODE is then
y(x) = a1 y1 (x) + a2 y2 (x) = a1 ekx + a2 e−kx ,
and one can solve an initial value problem for this ODE by choosing a1 and
a2 so as to match the initial conditions.
As we did with difference equations, we can describe an ODE with various terms.
An ODE is autonomous if the independent variable x does not appear in the
formula for the function F . An ODE is homogeneous if y ≡ 0 is a solution, i.e.
F (x, 0, . . . , 0) = 0. An ODE is linear if it has the form
dk y
dy
0 = F x, y, , . . . , k
dx dx
dy dk y
= Q(x) + P0 (x)y + P1 (x) + · · · + Pk (x) k ,
dx dy
where Q, P0 , . . . , Pk are functions of x. In this case, we will usually assume that
Pk 6= 0, and rearrange this equation to read
dk y dk−1 y dy
q(x) = k
+ p k−1 k−1
+ · · · + p1 (x) + p0 (x)y(x),
dx dx dx
where Here q = −Q/Pk and pj = Pj /Pk for j = 0, 1, . . . , k − 1. In this form we
call p0 , p1 , . . . , pk−1 the coefficients of the linear ODE, and we say it has constant
coefficients if all of these functions are constants.
For this set of notes we will concentrate on first order ODEs, which (according
to (1)) have the form
F (x, y, y 0 ) = 0.
In an associated initial value problem we prescribe one initial value, namely y(x0 ) =
c0 . According to the descricptions above, a first order ODE is autonomous if it has
the form F (y, y 0 ) = 0 and it is linear if it has the form y 0 = p(x)y + q(x).
2. Separable equations
A separable ODE has the form
dy f (x)
(3) = .
dx g(y)
Notice that we require g(y) 6= 0 in order that (3) makes sense. We can write the
solution of this equation by integrating and using the Fundamental Theorem of
Calculus. Rearange (3) to read
dy
g(y) = f (x)
dx
and integrate both sides of this equation with respect to x to get
Z x1 Z x1 Z y(x1 )
dy
(4) f (x)dx = g(y) dx = g(y)dy.
x0 x0 dx y(x0 )
Here we have used the chain rule to change variables within the integral.
2