Skip to main content
ORDINARY DIFFERENTIAL EQUATIONS
Part 1: Definitions and Terminologies, First Order ODEs
Josophat Makawa Chifundo (JMC)
BSc. Mathematics (University of Malawi)
JMC | Mathematics and Academic Resources
Website: jmcacademics.netlify.app
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 1 / 84
Preface
This series covers the fundamentals of Ordinary Differential Equations, following the
MAT312 syllabus at the University of Malawi.
Disclaimer: These slides are an independent study aid, not an official University of
Malawi publication. They have not been reviewed or endorsed by UNIMA. Please use
them alongside, not in place of, the materials recommended by your lecturer.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 2 / 84
Contents
1 Definitions and Terminologies
What is a Differential Equation?
Ordinary and Partial Differential Equations
Order, Degree and Linearity
Solution of a Differential Equation
2 First Order Linear Differential Equations
Separable Equations
Exact Ordinary Differential Equations
Integrating Factors
Homogeneous Equations
Cauchy–Euler Equations
Bernoulli’s Equation
Initial Value Problems
Chapter Review
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 3 / 84
Definitions and Terminologies
Definitions and Terminologies
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 4 / 84
Definitions and Terminologies What is a Differential Equation?
Introduction
• Consider the function below
y = e0.1x2
• From elementary calculus, the derivative of this function is y′
= 0.2xe0.1x2
.
Substituting e0.1x2
with y, we get
dy
dx
= 0.2xy (1)
• Equation 1 above is a differential equation. So if you are given this equation and
asked to find the function used to construct it, you are face to face with a classical
differential equations problem.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 5 / 84
Definitions and Terminologies What is a Differential Equation?
• A differential equation is an equation that involves an unknown function together
with one or more of its derivatives.
• In general, a differential equation involving an unknown function y = y(x) can be
written as
F
¡
x, y, y′
, y′′
, ..., y(n)
¢
= 0 (2)
• Differential equations arise naturally whenever we describe how a quantity changes.
For instance:
• Population growth:
dP
dt
= kP
• Newton’s law of cooling:
dT
dt
= −k(T −Ts)
• Motion under gravity:
d2
s
dt2
= −g
• Our goal in this course is to learn how to find the unknown function y that satisfies
such equations.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 6 / 84
Definitions and Terminologies Ordinary and Partial Differential Equations
Classification of Differential Equations
Ordinary Differential Equations (ODEs)
• An ordinary differential equation is a differential equation in which the unknown
function depends on a single independent variable. It therefore contains only
ordinary derivatives.
• For example,
dy
dx
+2y = ex
is an ODE, since y depends only on x.
• Another example is
d2
y
dx2
−3
dy
dx
+2y = 0
• Almost all the equations we will study in this course are ordinary differential
equations.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 7 / 84
Definitions and Terminologies Ordinary and Partial Differential Equations
Partial Differential Equations (PDEs)
• A partial differential equation is a differential equation in which the unknown
function depends on two or more independent variables. It therefore contains
partial derivatives.
• For example, if u = u(x,t), then
∂u
∂t
=
∂2
u
∂x2
is a PDE, known as the heat equation.
• Another well-known example is the wave equation,
∂2
u
∂t2
= c2 ∂2
u
∂x2
• Note: PDEs are generally much harder to solve than ODEs and are studied in more
advanced courses.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 8 / 84
Definitions and Terminologies Order, Degree and Linearity
Order and Degree
• The order of a differential equation is the order of the highest derivative that
appears in the equation.
• The degree is the power to which the highest-order derivative is raised, provided the
equation is a polynomial in its derivatives.
Equation Order Degree
dy
dx
+2y = ex
1 1
d2
y
dx2
−3
dy
dx
+2y = 0 2 1
µ
d2
y
dx2
¶3
+
dy
dx
= x 2 3
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 9 / 84
Definitions and Terminologies Order, Degree and Linearity
Linear and Nonlinear Differential Equations
• An nth order ODE is called linear if it can be written in the form
an(x)
dn
y
dxn
+an−1(x)
dn−1
y
dxn−1
+···+a1(x)
dy
dx
+a0(x)y = g(x) (3)
• Two properties must hold for an ODE to be linear:
1 The dependent variable y and all its derivatives are of the first power only.
2 There are no products of y (or its derivatives) with each other, and no nonlinear
functions of y such as siny, ey
or lny.
• If either condition fails, the equation is nonlinear.
• Example (linear):
dy
dx
+2xy = x2
• Example (nonlinear):
dy
dx
+2xy2
= x2
, y
d2
y
dx2
+
µ
dy
dx
¶2
= 0
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 10 / 84
Definitions and Terminologies Solution of a Differential Equation
Solution of a Differential Equation
• A solution of a differential equation on an interval I is a function φ(x) that, when
substituted for y, satisfies the equation identically for every x in I.
• Solutions may be classified as:
• General solution – contains one or more arbitrary constants and represents an entire
family of solutions.
• Particular solution – obtained from the general solution by assigning specific values to
the constants, usually using initial conditions or boundary conditions.
• Solutions may also be given explicitly, y = φ(x), or implicitly, G(x,y) = 0.
• An initial value problem (IVP) consists of a differential equation together with
condition(s) specified at a single point, e.g. y(x0) = y0.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 11 / 84
Definitions and Terminologies Solution of a Differential Equation
Example (Verify that y = e2x
is a solution of
dy
dx
−2y = 0.)
Solution
• First, differentiate y = e2x
with respect to x:
dy
dx
= 2e2x
• Now substitute both y and
dy
dx
into the left-hand side of the equation:
dy
dx
−2y = 2e2x
−2
¡
e2x
¢
= 0
• Since the left-hand side equals the right-hand side for every value of x, we conclude
that
y = e2x
is indeed a solution of
dy
dx
−2y = 0
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 12 / 84
Definitions and Terminologies Solution of a Differential Equation
Example (Given the general solution y = Ce2x
of
dy
dx
−2y = 0, find the particular
solution satisfying y(0) = 5.)
Solution
• Substitute the initial condition x = 0, y = 5 into the general solution:
5 = Ce2(0)
= C
• Therefore C = 5, and the particular solution is
y = 5e2x
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 13 / 84
First Order Linear Differential Equations
First Order Linear Differential Equations
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 14 / 84
First Order Linear Differential Equations Separable Equations
Separation of Variables
• A first order ODE is separable if it can be written in the form
dy
dx
= g(x)h(y) (4)
• That is, the right-hand side factors into a function of x alone times a function of y
alone.
• Method of solution: Separate the variables and integrate both sides,
dy
h(y)
= g(x)dx =⇒
Z
dy
h(y)
=
Z
g(x)dx
• This yields an implicit (or explicit) general solution involving an arbitrary constant C.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 15 / 84
First Order Linear Differential Equations Separable Equations
Example (Solve
dy
dx
=
x
y
, y ̸= 0.)
Solution
• Separate the variables:
ydy = xdx
• Integrate both sides:
Z
ydy =
Z
xdx =⇒
y2
2
=
x2
2
+C1
• Multiplying through by 2 and relabelling the constant gives the general solution
y2
−x2
= C
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 16 / 84
First Order Linear Differential Equations Separable Equations
Example (Solve
dy
dx
= 1+y2
)
Solution
• Seperate the variables by deviding by 1+y2
and multiply by dx both sides.
dy
1+y2
= dx
• Integrate bothe sides Z
dy
1+y2
=
Z
xdx
• From integrals involving inverse trigonometric functions, we know that
Z
dy
1+y2
= arctany, thus, integrating and simplifying using trigonometric identities
yields
arctany = x+c or y = tan(x+c)
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 17 / 84
First Order Linear Differential Equations Separable Equations
Example (Solve x
dy
dx
= 4y.)
Solution
• Separate the variables:
dy
y
=
4dx
x
• Integrate both sides:
Z
dy
y
= 4
Z
dx
x
=⇒ ln|y|= 4ln|x|+C1
• Exponentiate and relabel the constant:
y = Cx4
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 18 / 84
First Order Linear Differential Equations Separable Equations
Example (Solve
dy
dx
= e3x+2y
.)
Solution
• Split the exponent and separate the variables:
e−2y
dy = e3x
dx
• Integrate both sides:
Z
e−2y
dy =
Z
e3x
dx =⇒ −
1
2
e−2y
=
1
3
e3x
+C1
• Multiply through by −6 and relabel the constant:
3e−2y
+2e3x
= C
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 19 / 84
First Order Linear Differential Equations Separable Equations
Example (Solve x
dy
dx
= x+y.)
Solution
• This equation is not separable as it stands – dividing by x gives y′
= 1+
y
x
, a function
of y/x only.
• Substitute y = ux, so
dy
dx
= u+x
du
dx
:
u+x
du
dx
= 1+u =⇒ x
du
dx
= 1
• This is now separable in u and x:
du =
dx
x
=⇒ u = ln|x|+C
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 20 / 84
First Order Linear Differential Equations Separable Equations
• Replace u with y/x and solve for y:
y = xln|x|+Cx
• Note: Equations of the form y′
= f (y/x) are not separable directly, but the
substitution y = ux always reduces them to a separable equation in u and x.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 21 / 84
First Order Linear Differential Equations Separable Equations
Example (Solve
dy
dx
= (x+y −2)2
.)
Solution
• Here the right-hand side depends on the combination x+y, not on x and y separately.
Let v = x+y −2, so v′
= 1+y′
and y′
= v′
−1:
v′
−1 = v2
=⇒
dv
dx
= v2
+1
• Separate the variables: dv
v2+1
= dx
• Integrate, using the same arctangent integral from earlier:
arctanv = x+C =⇒ v = tan(x+C)
• Replace v with x+y −2 and solve for y:
y = tan(x+C)−x+2
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 22 / 84
First Order Linear Differential Equations Separable Equations
Example (Solve
dP
dt
= P −P2
.)
Solution
• Factor the right-hand side and separate:
dP
P(1−P)
= dt
• Use partial fractions on the left,
1
P(1−P)
=
1
P
+
1
1−P
• Integrate both sides:
Z µ
1
P
+
1
1−P
¶
dP =
Z
dt =⇒ ln|P|−ln|1−P|= t +C
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 23 / 84
First Order Linear Differential Equations Separable Equations
• Combine the logarithms and solve for P:
¯
¯
¯
¯
P
1−P
¯
¯
¯
¯ = Cet
=⇒ P =
Cet
1+Cet
• This is the logistic equation, a standard model for population growth under limited
resources.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 24 / 84
First Order Linear Differential Equations Separable Equations
Example (Solve the IVP
dy
dx
=
y2
−1
x2 −1
, y(2) = 2.)
Solution
• Separate the variables:
dy
y2 −1
=
dx
x2 −1
• Apply partial fractions to both sides,
1
2
ln
¯
¯
¯
¯
y −1
y +1
¯
¯
¯
¯ =
1
2
ln
¯
¯
¯
¯
x−1
x+1
¯
¯
¯
¯+C1
• Simplify to obtain the implicit general solution:
y −1
y +1
= K
x−1
x+1
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 25 / 84
First Order Linear Differential Equations Separable Equations
• Apply the initial condition y(2) = 2:
1
3
= K ·
1
3
=⇒ K = 1
• So
y −1
y +1
=
x−1
x+1
. Cross-multiplying and simplifying,
(y −1)(x+1) = (x−1)(y +1) =⇒ y −x = x−y
gives the explicit solution
y = x
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 26 / 84
First Order Linear Differential Equations Separable Equations
Example (Solve the IVP x2 dy
dx
= y −xy, y(−1) = −1.)
Solution
• Factor the right-hand side and separate:
x2 dy
dx
= y(1−x) =⇒
dy
y
=
µ
1
x2
−
1
x
¶
dx
• Integrate both sides:
ln|y|= −
1
x
−ln|x|+C
• Move ln|x| to the left and exponentiate:
ln|xy|= −
1
x
+C =⇒ xy = Ae−1/x
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 27 / 84
First Order Linear Differential Equations Separable Equations
• Apply the initial condition x = −1, y = −1, so xy = 1:
1 = Ae−1/(−1)
= Ae =⇒ A = e−1
• Substitute back and solve for y:
y =
1
x
e−1−1/x
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 28 / 84
First Order Linear Differential Equations Separable Equations
Population Growth Model
Solving
dP
dt
= kP by Separation of Variables
• This is the simplest population model: the rate of growth is proportional to the
current population P.
• Separate the variables:
dP
P
= kdt
• Integrate both sides:
Z
dP
P
=
Z
kdt =⇒ ln|P|= kt +C1
• Exponentiate, and let P0 = P(0) denote the initial population. This gives
P(t) = P0ekt
• If k > 0, the population grows; if k < 0, it decays.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 29 / 84
First Order Linear Differential Equations Separable Equations
Example (A bacteria culture starts with 500 bacteria. After 3 hours, the population
has grown to 8000. Find the population after 5 hours.)
Solution
• From the model, P(t) = P0ekt
with P0 = 500, so
P(t) = 500ekt
• Use the condition P(3) = 8000 to find k:
500e3k
= 8000 =⇒ e3k
= 16 =⇒ k =
ln16
3
≈ 0.924
• Substitute back:
P(t) = 500e(ln16/3)t
= 500(16)t/3
• Evaluate at t = 5:
P(5) = 500(16)5/3
≈ 500(101.6)
P(5) ≈ 50,790 bacteria
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 30 / 84
First Order Linear Differential Equations Exact Ordinary Differential Equations
Exact Ordinary Differential Equations
• This type of ODE arises from a multivariable function z = f (x,y) whose partial
derivatives fx and fy are continuous throughout some region R of the x-y plane.
• The total differential of f collects the small change in z caused by small changes in
both x and y:
dz =
∂f
∂x
dx+
∂f
∂y
dy.
• If f (x,y) = C (a constant, i.e. a level curve), then z does not change as x and y move
along that curve, so dz = 0:
∂f
∂x
dx+
∂f
∂y
dy = 0. (5)
• Key idea: equation (5) is already a first order ODE in disguise. If we can recognise a
differential equation as coming from some hidden function f (x,y) = C, we can solve
it just by rebuilding f .
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 31 / 84
First Order Linear Differential Equations Exact Ordinary Differential Equations
• Example. Starting from 2x3
+3xy −y2
= C and differentiating term by term (treating y
as a function of x) gives
(6x2
+3y)dx+(3x−2y)dy = 0.
Notice this ODE did not appear at random — it was manufactured from a single
function. Our goal in this section is to reverse this process: given the ODE, recover
the function.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 32 / 84
First Order Linear Differential Equations Exact Ordinary Differential Equations
Definition
• A first order ODE written in differential form
M(x,y)dx+N(x,y)dy = 0 (6)
is called exact on a region R if there exists a function F(x,y) such that
∂F
∂x
= M(x,y) and
∂F
∂y
= N(x,y).
In words: M and N are not arbitrary — they are secretly the two partial derivatives of
one common function F.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 33 / 84
First Order Linear Differential Equations Exact Ordinary Differential Equations
• Test for exactness. Rather than guessing F first, we use a quick check. Equation (6) is
exact on a simply connected region if and only if
∂M
∂y
=
∂N
∂x
.
This works because mixed partial derivatives of a smooth function are equal, i.e.
Fxy = Fyx. So if My ̸= Nx, no such F can exist and the equation is not exact (as written).
• If the equation is exact, the implicit general solution is simply
F(x,y) = C.
We never need to solve for y explicitly — the level curves of F already describe every
solution.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 34 / 84
First Order Linear Differential Equations Exact Ordinary Differential Equations
Method of Solution
• Step 1 (Test): Compute
∂M
∂y
and
∂N
∂x
and confirm they are equal. If not, the equation
is not exact and this method does not directly apply (an integrating factor may be
needed instead).
• Step 2 (Partial antiderivative): Since Fx = M, integrate M with respect to x only,
treating y as a constant:
F(x,y) =
Z
M(x,y)dx+h(y).
The "constant" of integration here must be a function of y alone, h(y), because
anything depending only on y vanishes under ∂/∂x.
• Step 3 (Find h(y)): Differentiate the F obtained above with respect to y, and set it
equal to N(x,y). All x-terms should cancel, leaving an equation purely in y for h′
(y);
integrate that to get h(y).
• Step 4 (Write solution): Substitute h(y) back into F and state the general solution as
F(x,y) = C.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 35 / 84
First Order Linear Differential Equations Exact Ordinary Differential Equations
Note:
Partial differentiation means: differentiate with respect to the named variable while
treating every other variable as a fixed constant. Also, Step 2 could equally be started from
N (integrating with respect to y) if that integral looks easier — both routes lead to the
same F.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 36 / 84
First Order Linear Differential Equations Exact Ordinary Differential Equations
Example (Solve (2xy +3)dx+(x2
−1)dy = 0.)
Solution
• Here M = 2xy +3 and N = x2
−1. Testing for exactness
∂M
∂y
= 2x,
∂N
∂x
= 2x.
Since these agree, the ODE is exact, so a function F with Fx = M and Fy = N exists.
• Integrate M with respect to x, holding y fixed:
F(x,y) =
Z
(2xy +3)dx = x2
y +3x+h(y).
• Differentiate this F with respect to y and compare with N to isolate h′
(y):
∂F
∂y
= x2
+h′
(y) = x2
−1 =⇒ h′
(y) = −1 =⇒ h(y) = −y.
• Substituting h(y) = −y back into F, the general solution is
x2
y +3x−y = C
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 37 / 84
First Order Linear Differential Equations Exact Ordinary Differential Equations
Example (Solve (5x+4y)dx+(4x−8y3
)dy = 0.)
Setting up the test
• Here M = 5x+4y and N = 4x−8y3
.
• Test for exactness:
∂M
∂y
= 4,
∂N
∂x
= 4.
The two partials match, so the equation is exact and a potential function F(x,y)
exists with Fx = M, Fy = N.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 38 / 84
First Order Linear Differential Equations Exact Ordinary Differential Equations
Example ((5x+4y)dx+(4x−8y3
)dy = 0 — continued)
Building F(x,y)
• Integrate M with respect to x, keeping y fixed:
F(x,y) =
Z
(5x+4y)dx =
5x2
2
+4xy +h(y).
• Differentiate this F with respect to y and match it to N:
∂F
∂y
= 4x+h′
(y) = 4x−8y3
=⇒ h′
(y) = −8y3
=⇒ h(y) = −2y4
.
• Substitute h(y) into F and set F = C for the general solution (multiplying through by 2
to clear the fraction):
5x2
+8xy −4y4
= C
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 39 / 84
First Order Linear Differential Equations Exact Ordinary Differential Equations
Example (Solve (2xy2
−3)dx+(2x2
y +4)dy = 0.)
Solution
• Here M = 2xy2
−3 and N = 2x2
y +4.
• Test for exactness:
∂M
∂y
= 4xy,
∂N
∂x
= 4xy.. Equal, so the equation is exact.
• Integrate M with respect to x:
F(x,y) =
Z
(2xy2
−3)dx = x2
y2
−3x+h(y).
• Differentiate with respect to y and compare to N:
∂F
∂y
= 2x2
y +h′
(y) = 2x2
y +4 =⇒ h′
(y) = 4 =⇒ h(y) = 4y.
• The general solution is
x2
y2
−3x+4y = C
•
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 40 / 84
First Order Linear Differential Equations Exact Ordinary Differential Equations
Example (Solve (x3
+y3
)dx+3xy2
dy = 0.)
Solution
• Here M = x3
+y3
and N = 3xy2
.
• Test for exactness:
∂M
∂y
= 3y2
,
∂N
∂x
= 3y2
. Equal, so the equation is exact.
• Integrate M with respect to x, treating y as constant:
F(x,y) =
Z
(x3
+y3
)dx =
x4
4
+xy3
+h(y).
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 41 / 84
First Order Linear Differential Equations Exact Ordinary Differential Equations
Example (Solve (x3
+y3
)dx+3xy2
dy = 0.— continued)
• Differentiate with respect to y and compare to N:
∂F
∂y
= 3xy2
+h′
(y) = 3xy2
=⇒ h′
(y) = 0 =⇒ h(y) = 0.
Here h(y) turns out to be genuinely zero (not just a constant we absorb) — this
happens whenever N already matches ∂F/∂x-generated terms exactly, with nothing
left over.
• Multiplying by 4 to clear the fraction, the general solution is
x4
+4xy3
= C
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 42 / 84
First Order Linear Differential Equations Exact Ordinary Differential Equations
Example (Solve (3x2
y +ey
)dx+(x3
+xey
−2y)dy = 0.)
Testing and building F
• Here M = 3x2
y +ey
and N = x3
+xey
−2y.
• Test for exactness:
∂M
∂y
= 3x2
+ey
,
∂N
∂x
= 3x2
+ey
.
Equal, so the equation is exact.
• Integrate M with respect to x (holding y fixed, so ey
behaves like a constant
multiplying x):
F(x,y) =
Z
(3x2
y +ey
)dx = x3
y +xey
+h(y).
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 43 / 84
First Order Linear Differential Equations Exact Ordinary Differential Equations
Example ((3x2
y +ey
)dx+(x3
+xey
−2y)dy = 0 — continued)
Finishing the solution
• Differentiate F = x3
y +xey
+h(y) with respect to y and compare to N:
∂F
∂y
= x3
+xey
+h′
(y) = x3
+xey
−2y =⇒ h′
(y) = −2y.
• Integrating, h(y) = −y2
.
• Substituting back, the general solution is
x3
y +xey
−y2
= C
• Check: Fx = 3x2
y +ey
= M and Fy = x3
+xey
−2y = N, so the solution is confirmed. This
example shows the method works the same way even when M and N contain
exponential terms — the algebra changes, but the four-step procedure does not.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 44 / 84
First Order Linear Differential Equations Integrating Factors
Integrating Factors
• In the previous section, we solved M dx+N dy = 0 only when it was already exact, i.e.
My = Nx. Most equations we meet are not exact as written.
• The trick: multiply the entire equation by a well-chosen function µ(x,y), called an
integrating factor, so that the new equation
µ(x,y)M(x,y)dx+µ(x,y)N(x,y)dy = 0
is exact, even though the original was not. Multiplying by µ does not change the
solution set, only the form of the equation.
• Finding a general µ(x,y) is hard, but for a linear first order ODE written in standard
form
dy
dx
+P(x)y = Q(x) (7)
there is always a ready-made integrating factor that depends on x only:
µ(x) = e
R
P(x)dx
.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 45 / 84
First Order Linear Differential Equations Integrating Factors
• Why this works: multiplying (7) by µ(x) turns the left-hand side into the derivative of
a single product, via the product rule run in reverse:
d
dx
[µ(x)y] = µ(x)
dy
dx
+µ′
(x)y = µ(x)
dy
dx
+µ(x)P(x)y = µ(x)
µ
dy
dx
+P(x)y
¶
.
So the whole left side collapses to
d
dx
[µ(x)y], and the equation becomes directly
integrable.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 46 / 84
First Order Linear Differential Equations Integrating Factors
Method of Solution
• Step 1 (Standard form): Rewrite the given ODE as
dy
dx
+P(x)y = Q(x), i.e. isolate y′
and
make its coefficient exactly 1. Identify P(x) and Q(x).
• Step 2 (Integrating factor): Compute
µ(x) = e
R
P(x)dx
.
You may drop the constant of integration inside this exponent — any one choice of
antiderivative works.
• Step 3 (Collapse and integrate): Multiply the standard-form equation through by
µ(x); the left side automatically becomes
d
dx
[µ(x)y]. Integrate both sides with
respect to x:
µ(x)y =
Z
µ(x)Q(x)dx+C.
• Step 4 (Solve for y): Divide through by µ(x) to obtain the general solution explicitly,
y = y(x).
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 47 / 84
First Order Linear Differential Equations Integrating Factors
Example (Solve
dy
dx
+2y = e−x
.)
Solution
• The equation is already in standard form with P(x) = 2 and Q(x) = e−x
.
• Compute the integrating factor: µ(x) = e
R
2dx
= e2x
.
• Multiply the equation through by µ(x) = e2x
. By construction, the left side collapses
to a single derivative:
d
dx
[e2x
y] = e2x
·e−x
= ex
.
• Integrate both sides with respect to x:
e2x
y = ex
+C.
• Divide through by e2x
to solve for y:
y = e−x
+Ce−2x
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 48 / 84
First Order Linear Differential Equations Integrating Factors
Example (Solve x
dy
dx
= 2xex
−y +6x2
.)
Getting to standard form
• This is one of the problems from the practice list, and at first glance it does not look
linear in y′
+Py = Q form — all the terms need rearranging first.
• Collect all y-terms on the left. Adding y to both sides:
x
dy
dx
+y = 2xex
+6x2
.
• Divide through by x (valid for x ̸= 0) to make the coefficient of y′
equal to 1:
dy
dx
+
1
x
y = 2ex
+6x.
• Now the equation is in standard form with P(x) =
1
x
and Q(x) = 2ex
+6x.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 49 / 84
First Order Linear Differential Equations Integrating Factors
Example (x
dy
dx
= 2xex
−y +6x2
— continued)
Applying the integrating factor
• Compute µ(x) from P(x) =
1
x
: µ(x) = e
R 1
x
dx
= elnx
= x, (x > 0).
• Multiply the standard-form equation through by µ(x) = x; the left side collapses:
d
dx
[xy] = x
¡
2ex
+6x
¢
= 2xex
+6x2
.
• Integrate both sides with respect to x. The term 2xex
needs integration by parts
(
R
xex
dx = xex
−ex
):
xy = 2
¡
xex
−ex
¢
+2x3
+C.
• Divide through by x to isolate y:
y = 2ex
−
2ex
x
+2x2
+
C
x
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 50 / 84
First Order Linear Differential Equations Integrating Factors
Example (Solve the IVP
dy
dx
−
1
x
y = xcosx, y(π) = 0.)
Solution
• The equation is already in standard form with P(x) = −
1
x
and Q(x) = xcosx.
• Compute the integrating factor:
µ(x) = e
R
− 1
x
dx
= e−lnx
=
1
x
, (x > 0).
• Multiply through by µ(x) =
1
x
; the left side collapses to a single derivative:
d
dx
hy
x
i
=
1
x
·xcosx = cosx.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 51 / 84
First Order Linear Differential Equations Integrating Factors
Example (Solve the IVP
dy
dx
−
1
x
y = xcosx, y(π) = 0 — continued.)
• Integrate both sides:
y
x
= sinx+C =⇒ y = xsinx+Cx.
• Apply the initial condition y(π) = 0:
0 = πsinπ+Cπ = Cπ =⇒ C = 0.
• The particular solution is
y = xsinx
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 52 / 84
First Order Linear Differential Equations Homogeneous Equations
Homogeneous Equations
• A first order ODE
dy
dx
= f (x,y) is called homogeneous if f (x,y) can be written as a
function of
y
x
alone, i.e.
dy
dx
= F
³y
x
´
• Note that most ODEs will require rewriting to come to this form, once there, we will
use the substitution
v =
y
x
=⇒ y = vx =⇒
dy
dx
= v +x
dv
dx
• This transforms the equation into a seperable equation in v and x and eventually
simplifies the solving process
v +x
dv
dx
= F(v)
• Solve for v(x) by separation, then substitute back v =
y
x
.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 53 / 84
First Order Linear Differential Equations Homogeneous Equations
Example (Solve
dy
dx
=
x2
+y2
xy
.)
Solution
• Divide numerator and denominator by x2
to see the equation is homogeneous:
dy
dx
=
1+
¡
y/x
¢2
y/x
• Let y = vx, so
dy
dx
= v +x
dv
dx
. Substituting: v +x
dv
dx
=
1+v2
v
=⇒ x
dv
dx
=
1
v
• Separate variables and integrate and Substituting back v =
y
x
gives
vdv =
dx
x
=⇒
v2
2
= ln|x|+C1
y2
2x2
= ln|x|+C1
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 54 / 84
First Order Linear Differential Equations Homogeneous Equations
Example (Solve the following IVP xy
dy
dx
+4x2
+y2
= 0, y(2) = −7, x > 0.)
Solution
• Firstly, we will divide everything by x2
to get
y
x
dy
dx
+4+
y2
x2
= 0 =⇒
y
x
dy
dx
= −4−
³y
x
´2
• This is indeed a homogenous Differential Equation. Let y = vx which means
dy
dx
= v +x
dv
dx
, if we substitute this back into the equation,
v
·
v +x
dv
dx
¸
= −4−v2
=⇒ v2
+vx
dv
dx
= −4−v2
∴ vx
dv
dx
= −4−2v2
=⇒ vx
dv
dx
= −(4+2v2
)
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 55 / 84
First Order Linear Differential Equations Homogeneous Equations
Example (Solve the following IVP xy
dy
dx
+4x2
+y2
= 0, y(2) = −7,x > 0.- continued)
• From here, we can seperate the variables to integrate
v
4+2v2
dv = −
1
x
dx =⇒
Z
v
4+2v2
dv =
Z
−
1
x
dx
• Solving the integral gives 1
4 ln(4+2v2
) = −lnx+c and after a litlle rewritting we get the
result as
ln
¡
4+2v2
¢1
4
= lnx−1
+c
• Exponentiating both sides gives
¡
4+2v2
¢1
4
= x−1
·ec
=⇒
¡
4+2v2
¢1
4
=
c
x
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 56 / 84
First Order Linear Differential Equations Homogeneous Equations
Example (Solve the following IVP xy
dy
dx
+4x2
+y2
= 0, y(2) = −7,x > 0.- continued)
• Finally, let’s solve for v from
¡
4+2v2
¢1
4
= c
x .
4+2v2
=
c4
x4
=
c
x4
2v2
=
c
x4
−4 =
c −4x4
x4
v2
=
c −4x4
2x4
• Therefore,
y2
x2
=
c −4x4
2x4
=⇒ y2
=
c −4x4
2x2
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 57 / 84
First Order Linear Differential Equations Homogeneous Equations
Example (Solve the following IVP xy
dy
dx
+4x2
+y2
= 0, y(2) = −7,x > 0.- continued)
• At this point, let’s go ahead to find the value of c by pluggin in the initial consition.
(7)2
=
c −4(2)4
2(2)2
=⇒ 49 =
c −4(16)
2(4)
=⇒ c = 456
• If we substitute, we get y2
= 228−2x4
x2 . Taking roots both sides gives
y = ±
s
228−2x4
x2
• However, the initial condition suggests that y is negative, therefore, the solution to
the underlying differential equation is
y = −
s
228−2x4
x2
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 58 / 84
First Order Linear Differential Equations Cauchy–Euler Equations
Cauchy–Euler Equations
• A first order Cauchy–Euler equation has the form
x
dy
dx
+ay = g(x), a constant (8)
• Dividing by x (for x ̸= 0) puts it in the standard linear form
dy
dx
+
a
x
y =
g(x)
x
so it can be solved using the integrating factor method with P(x) =
a
x
:
µ(x) = e
R a
x
dx
= xa
, (x > 0).
• Note: Higher order Cauchy–Euler equations, solved using an auxiliary (indicial)
equation, will be studied in Document 2.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 59 / 84
First Order Linear Differential Equations Cauchy–Euler Equations
Structure of the Solution
• When g(x) = 0, equation (8) is called homogeneous. It can also be solved directly by
separating variables:
x
dy
dx
= −ay =⇒
dy
y
= −
a
x
dx =⇒ y = Cx−a
.
This agrees exactly with the integrating factor computation, since µ(x)y = C there
gives xa
y = C, i.e. y = Cx−a
.
• When g(x) ̸= 0, the same integrating factor µ(x) = xa
still collapses the left side to a
single derivative, so the general solution is found in exactly the same three moves
used for any linear equation: multiply by µ(x), integrate, divide by µ(x).
• Domain note: the derivation above assumes x > 0 (so that lnx is defined). For x < 0,
replace x by |x| throughout; the equation is typically solved separately on (0,∞) and
(−∞,0), since it is undefined at x = 0.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 60 / 84
First Order Linear Differential Equations Cauchy–Euler Equations
Example (Solve x
dy
dx
+3y = 0, x > 0.)
Solution (warm-up: the homogeneous case)
• Divide by x:
dy
dx
+
3
x
y = 0, so P(x) =
3
x
and µ(x) = e
R 3
x
dx
= x3
.
• Multiplying through by µ(x) = x3
collapses the left side, and the right side is simply 0:
d
dx
£
x3
y
¤
= 0
• Integrating both sides gives x3
y = C directly (no further integration needed since the
right side is zero).
• The general solution is
y =
C
x3
which matches the direct separation-of-variables shortcut from the previous slide.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 61 / 84
First Order Linear Differential Equations Cauchy–Euler Equations
Example (Solve x
dy
dx
+2y = x3
, x > 0.)
Solution
• Divide by x:
dy
dx
+
2
x
y = x2
• Here P(x) =
2
x
, so the integrating factor is µ(x) = e
R 2
x
dx
= e2lnx
= x2
. Multiplying
through by µ(x) = x2
:
d
dx
£
x2
y
¤
= x4
• Integrating both sides gives x2
y =
x5
5
+C
• The general solution is
y =
x3
5
+
C
x2
2 3 3
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 62 / 84
First Order Linear Differential Equations Cauchy–Euler Equations
Example (Solve x
dy
dx
−y = x2
lnx, x > 0.)
Solution (a harder right-hand side: integration by parts)
• Divide by x:
dy
dx
−
1
x
y = xlnx
• Here P(x) = −
1
x
, so µ(x) = e
R
− 1
x
dx
= e−lnx
=
1
x
. Multiplying through:
d
dx
hy
x
i
=
1
x
·xlnx = lnx
• Integrating the right side by parts (u = lnx, dv = dx):
y
x
= xlnx−x+C
• Multiplying through by x gives the general solution
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 63 / 84
First Order Linear Differential Equations Cauchy–Euler Equations
Example (Solve the IVP x
dy
dx
−2y = x3
cosx, y(π) = 0, x > 0.)
Solution (hardest: trigonometric right-hand side, combined with an IVP)
• Divide by x:
dy
dx
−
2
x
y = x2
cosx
• Here P(x) = −
2
x
, so µ(x) = e
R
− 2
x
dx
= e−2lnx
= x−2
. Multiplying through:
d
dx
£
x−2
y
¤
= x−2
·x2
cosx = cosx
• Integrating both sides:
x−2
y = sinx+C =⇒ y = x2
sinx+Cx2
= x2
(sinx+C)
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 64 / 84
First Order Linear Differential Equations Cauchy–Euler Equations
Example (x
dy
dx
−2y = x3
cosx, y(π) = 0 — continued)
• Apply the initial condition y(π) = 0 to y = x2
(sinx+C):
0 = π2
(sinπ+C) = π2
·C =⇒ C = 0
• The particular solution is
y = x2
sinx
• Check: y′
= 2xsinx+x2
cosx, so xy′
−2y = 2x2
sinx+x3
cosx−2x2
sinx = x3
cosx, as
required.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 65 / 84
First Order Linear Differential Equations Bernoulli’s Equation
Bernoulli’s Equation
• A Bernoulli equation has the form
dy
dx
+P(x)y = Q(x)yn
, n ̸= 0,1 (9)
• Method of solution: Use the substitution
v = y1−n
=⇒
dv
dx
= (1−n)y−n dy
dx
• Dividing (9) by yn
and substituting transforms it into a linear equation in v:
dv
dx
+(1−n)P(x)v = (1−n)Q(x)
• Solve this linear equation using an integrating factor, then substitute back v = y1−n
.
• Note: When n = 0 or n = 1, the equation is already linear, so the substitution is
unnecessary.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 66 / 84
First Order Linear Differential Equations Bernoulli’s Equation
Why This Matters: the Logistic Equation
• The case n = 2 is especially common in applications. The logistic growth model for a
population y(t) with growth rate r and carrying capacity K,
dy
dt
= ry −
r
K
y2
,
is a Bernoulli equation with P = −r, Q = −
r
K
, n = 2. Solving it (Example 1, next slide, is
a simplified version) produces the S-shaped logistic curve used throughout
population biology, epidemiology and economics.
• This is a good reason to master the method carefully: the same substitution v = y1−n
underlies models well beyond textbook drill problems.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 67 / 84
First Order Linear Differential Equations Bernoulli’s Equation
Example (Solve
dy
dx
+y = y2
.)
Solution (warm-up: constant coefficients, the logistic pattern)
• Here n = 2, so let v = y−1
, giving
dv
dx
= −y−2 dy
dx
.
• Divide by y2
: y−2 dy
dx
+y−1
= 1
• Substituting v = y−1
,
dv
dx
= −y−2 dy
dx
:
−
dv
dx
+v = 1 =⇒
dv
dx
−v = −1
• This is linear with P = −1, so µ(x) = e−x
. Then
d
dx
£
e−x
v
¤
= −e−x
, giving e−x
v = e−x
+C,
i.e. v = 1+Cex
.
• Substituting back v = y−1
gives
y =
1
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 68 / 84
First Order Linear Differential Equations Bernoulli’s Equation
Example (Solve
dy
dx
+y = xy2
.)
Solution
• Here n = 2, so let v = y1−2
= y−1
, giving
dv
dx
= −y−2 dy
dx
.
• Divide the equation by y2
:
y−2 dy
dx
+y−1
= x
• Substitute v = y−1
and
dv
dx
= −y−2 dy
dx
:
−
dv
dx
+v = x =⇒
dv
dx
−v = −x
• This is linear with P = −1, so µ(x) = e−x
. Solving,
d
dx
£
e−x
v
¤
= −xe−x
=⇒ e−x
v = (x+1)e−x
+C
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 69 / 84
First Order Linear Differential Equations Bernoulli’s Equation
Example (Solve
dy
dx
−
1
x
y = x2p
y, x > 0.)
Solution (a fractional power: n =
1
2
)
• Here n =
1
2
, so let v = y1− 1
2 = y
1
2 , giving
dv
dx
=
1
2
y− 1
2
dy
dx
.
• Divide the equation by y1/2
:
y− 1
2
dy
dx
−
1
x
y
1
2 = x2
• Substituting y−1/2 dy
dx
= 2
dv
dx
and y1/2
= v:
2
dv
dx
−
v
x
= x2
=⇒
dv
dx
−
1
2x
v =
x2
2
• This is linear with P = −
1
2x
, so µ(x) = e−
R 1
2x
dx
= x− 1
2 . Then
d h 1
i x2 1 1 3
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 70 / 84
First Order Linear Differential Equations Bernoulli’s Equation
Example (Solve the IVP
dy
dx
+
1
x
y = xy−1
, y(1) = 2, x > 0.)
Solution (hardest: negative n, combined with an IVP)
• Here n = −1, so let v = y1−(−1)
= y2
, giving
dv
dx
= 2y
dy
dx
.
• Multiply the equation by y (equivalently, divide by yn
= y−1
):
y
dy
dx
+
1
x
y2
= x
• Substituting y
dy
dx
=
1
2
dv
dx
and y2
= v:
1
2
dv
dx
+
v
x
= x =⇒
dv
dx
+
2
x
v = 2x
• This is linear with P =
2
x
, so µ(x) = x2
. Then
d
dx
£
x2
v
¤
= 2x3
, giving x2
v =
1
2
x4
+C, i.e.
x2
C
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 71 / 84
First Order Linear Differential Equations Bernoulli’s Equation
Example (
dy
dx
+
1
x
y = xy−1
, y(1) = 2 — continued)
• Substituting back v = y2
:
y2
=
x2
2
+
C
x2
• Apply y(1) = 2: 4 =
1
2
+C =⇒ C =
7
2
• Since y(1) = 2 > 0, we keep the positive square root, giving the particular solution
y =
s
x2
2
+
7
2x2
=
s
x4
+7
2x2
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 72 / 84
First Order Linear Differential Equations Initial Value Problems
Initial Value Problems
• Recall that an initial value problem (IVP) consists of a differential equation together
with a condition specified at a single point:
dy
dx
= f (x,y), y(x0) = y0
• Method: find the general solution using any applicable technique from this
document (separable, exact, integrating factor, homogeneous, Cauchy–Euler, or
Bernoulli), then substitute x = x0, y = y0 and solve for the arbitrary constant C. The
result is the particular solution, the one curve out of the whole family that passes
through (x0,y0).
• Note: A full discussion of existence and uniqueness of solutions to IVPs, in the more
general (possibly nonlinear, higher order) setting, is given in Document 2.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 73 / 84
First Order Linear Differential Equations Initial Value Problems
Existence and Uniqueness (Linear Case)
• For the linear first order IVP
dy
dx
+P(x)y = Q(x), y(x0) = y0,
the following simple theorem already guarantees a well-behaved answer, before any
general nonlinear theory is needed:
• Theorem. If P(x) and Q(x) are both continuous on an open interval I containing x0,
then the IVP has exactly one solution y(x), and that solution exists on the entire
interval I.
• Why it matters in practice: the interval of validity is determined before solving, just
by looking at where P and Q are continuous. For example, if P(x) =
a
x
(as in a
Cauchy–Euler equation), continuity fails at x = 0; an initial condition with x0 > 0
guarantees a unique solution only on (0,∞), not across x = 0.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 74 / 84
First Order Linear Differential Equations Initial Value Problems
Example (Solve the IVP
dy
dx
=
y
x
, y(1) = 5, x > 0.)
Solution (warm-up: separable)
• Separate variables:
dy
y
=
dx
x
• Integrate both sides: ln|y|= ln|x|+C1 =⇒ y = Ax, where A = eC1 .
• Apply y(1) = 5: 5 = A·1 =⇒ A = 5
• The particular solution is
y = 5x
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 75 / 84
First Order Linear Differential Equations Initial Value Problems
Example (Solve the IVP
dy
dx
+2xy = x, y(0) = 3.)
Solution (linear, via integrating factor)
• Here P(x) = 2x, so the integrating factor is
µ(x) = e
R
2xdx
= ex2
• Multiplying through by µ(x):
d
dx
h
ex2
y
i
= xex2
• Integrating both sides:
ex2
y =
1
2
ex2
+C
• So the general solution is y =
1
2
+Ce−x2
. Apply y(0) = 3:
3 =
1
2
+C =⇒ C =
5
2
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 76 / 84
First Order Linear Differential Equations Initial Value Problems
Example (Solve the IVP x
dy
dx
−3y = x4
, y(1) = 2, x > 0.)
Solution (a Cauchy–Euler IVP)
• Divide by x:
dy
dx
−
3
x
y = x3
, so P(x) = −
3
x
and µ(x) = e
R
− 3
x
dx
= x−3
.
• Multiplying through:
d
dx
£
x−3
y
¤
= x−3
·x3
= 1
• Integrating: x−3
y = x+C =⇒ y = x4
+Cx3
• Apply y(1) = 2: 2 = 1+C =⇒ C = 1
• The particular solution is
y = x4
+x3
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 77 / 84
First Order Linear Differential Equations Initial Value Problems
Example (Solve the IVP
dy
dx
+
1
x
y = xy3
, y(1) = 1, x > 0.)
Solution (hardest: a Bernoulli IVP
, tying the methods together)
• Here n = 3, so let v = y1−3
= y−2
, giving
dv
dx
= −2y−3 dy
dx
.
• Divide by y3
: y−3 dy
dx
+
1
x
y−2
= x
• Substituting v = y−2
,
dv
dx
= −2y−3 dy
dx
:
−
1
2
dv
dx
+
v
x
= x =⇒
dv
dx
−
2
x
v = −2x
• This is linear with P = −
2
x
, so µ(x) = x−2
. Then
d
dx
£
x−2
v
¤
= −2x·x−2
= −
2
x
, giving
x−2
v = −2lnx+C, i.e. v = x2
(C −2lnx).
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 78 / 84
First Order Linear Differential Equations Initial Value Problems
Example (
dy
dx
+
1
x
y = xy3
, y(1) = 1 — continued)
• Substituting back v = y−2
:
y−2
= x2
(C −2lnx)
• Apply y(1) = 1: 1 = 12
(C −0) =⇒ C = 1
• So y−2
= x2
(1−2lnx). Since y(1) = 1 > 0, the particular solution is
y =
1
x
p
1−2lnx
• Check: at x = 1, y =
1
1·
p
1−0
= 1, matching the initial condition.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 79 / 84
First Order Linear Differential Equations Chapter Review
Review Exercises
Classify each differential equation as separable, exact, linear, homogeneous, or Bernoulli.
Some equations may be more than one kind. Do not solve.
1
dy
dx
=
x−y
x
2
dy
dx
=
1
y −x
3 (x+1)
dy
dx
= −y +10
4
dy
dx
=
1
x(x−y)
5
dy
dx
=
y2
+y
x2 +x
6
dy
dx
= 5y +y2
7 ydx = (y −xy2
)dy
8 x
dy
dx
= yex/y
−x
9 xyy′
+y2
= 2x
10 2xyy′
+y2
= 2x2
11 ydx+xdy = 0
12
µ
x2
+
2y
x
¶
dx = (3−lnx2
)dy
13
dy
dx
=
x
y
+
y
x
+1
14
y
x2
dy
dx
+e2x2
+y2
= 0
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 80 / 84
First Order Linear Differential Equations Chapter Review
Review Exercises
In Problems 15–22 solve the given differential equation.
15 (y2
+1)dx = y sec2
xdy
16 y(lnx−lny)dx = (xlnx−xlny −y)dy
17 (6x+1)y2 dy
dx
+3x2
+2y3
= 0
18
dx
dy
= −
4y2
+6xy
3y2 +2x
19 t
dQ
dt
+Q = t4
lnt
20 (2x+y +1)y′
= 1
21 (x2
+4)dy = (2x−8xy)dx
22 (2r2
cosθsinθ +r cosθ)dθ +(4r +sinθ −2r cos2
θ)dr = 0
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 81 / 84
First Order Linear Differential Equations Chapter Review
Review Exercises
In Problems 23 and 24 solve the given initial-value problem and give the largest interval I
on which the solution is defined.
23 sinx
dy
dx
+(cosx)y = 0, y(7π/6) = −2
24
dy
dt
+2(t +1)y2
= 0, y(0) = −
1
8
Detailed solutions for this exercise and others available on my website. Click
https: // jmcacademics. netlify. app/ tutorials to learn more
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 82 / 84
First Order Linear Differential Equations Chapter Review
References
[1] Kreyszig E., Kreyszig H. &Norminton E. J. (2011). Advanced Engineering
Mathematics 10th Edition. John Willey & Sons, Inc.
[2] Zill D. G. (2011). A First Course in Differential Equations with Modeling Applications,
Tenth Edition. Cengage Learning.
[3] Dawkins P. (2026). Differential Equations. Lamar University.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 83 / 84
First Order Linear Differential Equations Chapter Review
Closing Remarks
This is the end of Document 1 of the Ordinary Differential Equations notes series. In the
next document (Document 2), we will look at Second and Higher Order Linear
Differential Equations: number of solutions, existence and uniqueness theorems, linear
equations with constant coefficients, the Euler equation, the Wronskian theorem, linear
independence of solutions, variation of parameters, and power series solutions.
Be notified that you can access additional documents (compiled by me) by simply
navigating to my page directly through
https://www.slideshare.net/JosophatMakawa/presentations or visiting my
website through https://jmcacademics.netlify.app/library
Contact +265999978828 or +265899990636 for assistance.
Josophat Makawa Chifundo (JMC) ORDINARY DIFFERENTIAL EQUATIONS August 14, 2026 84 / 84