SMA 335 • UNIT 3 • Mathematics
First Order Exact Equations And Integrating Factors
Topics covered: Total differential, Integrating Factor, Some important differentials and their integrating factors
Syllabus Study Notes (Core Overview)
Free Overview Preview1. Foundational Concepts, Definitions, and Axioms
1.1 The shape of the problem
A first order equation written as
$$
\frac{dy}{dx}=f(x,y)
$$
is solved by finding a function $y$ of $x$. The topic of this note begins with a change of bookkeeping: instead of solving for the slope, the equation is written as a balance between two coefficients attached to the two infinitesimal increments of the plane. That is, the equation is written in the differential form
$$
M(x,y)\,dx+N(x,y)\,dy=0 ,
$$
where $M$ and $N$ are known functions of two variables. The word form is used because the left-hand side is not a derivative and not a function; it is a formal sum of two terms, one carrying $dx$ and one carrying $dy$. Solving the equation means finding a relation between $x$ and $y$ that makes that sum vanish along the curve.
The two notations describe the same objects. Dividing the differential form by $dx$ gives $M+N\frac{dy}{dx}=0$, which is the slope form with $f=-M/N$ on the set where $N\neq 0$. The advantage of the differential form is that it treats the two variables on an equal footing, and that symmetry is exactly what the technique of this note exploits.
1.2 Functions of two variables and partial derivatives
A function $F$ of two variables assigns a single number $F(x,y)$ to each ordered pair $(x,y)$ in some region of the plane. The region on which $F$ is defined and differentiable is called its domain.
> Definition (Partial derivative). The partial derivative of $F$ with respect to $x$ at the point $(x,y)$ is the ordinary derivative of the one-variable function obtained by freezing $y$ at its given value:
$$
\frac{\partial F}{\partial x}(x,y)=\lim_{h\to 0}\frac{F(x+h,y)-F(x,y)}{h} .
$$
The partial derivative with respect to $y$ is defined in the same way, freezing $x$ instead:
$$
\frac{\partial F}{\partial y}(x,y)=\lim_{k\to 0}\frac{F(x,y+k)-F(x,y)}{k} .
$$
The short notation $F_{x}$ stands for $\frac{\partial F}{\partial x}$ and $F_{y}$ for $\frac{\partial F}{\partial y}$. Both notations appear in every page that follows, and they always mean the same thing. When a coefficient such as $M$ is being differentiated, the same shorthand is used: $M_{y}$ means $\frac{\partial M}{\partial y}$ and $N_{x}$ means $\frac{\partial N}{\partial x}$.
Repeated partial differentiation produces the four second partial derivatives $F_{xx}$, $F_{xy}$, $F_{yx}$ and $F_{yy}$. The two mixed derivatives $F_{xy}$ and $F_{yx}$ are the ones that matter here, because the whole theory of exact equations is built on the fact that they agree.
1.3 The total differential
If $x$ changes by a small amount $h$ and $y$ changes by a small amount $k$ simultaneously, the change in $F$ is, to first order in the two increments,
$$
F(x+h,y+k)-F(x,y)\approx F_{x}(x,y)h+F_{y}(x,y)k .
$$
That first order approximation is the reason for the following definition.
> Definition (Total differential). Let $F$ be differentiable on a domain $D$. The total differential of $F$ at $(x,y)$ is the expression
$$
dF=\frac{\partial F}{\partial x}\,dx+\frac{\partial F}{\partial y}\,dy .
$$
The total differential is a linear function of the two increments $dx$ and $dy$; its coefficients are the two partial derivatives evaluated at the point. It changes from point to point because the coefficients change from point to point.
Two computations fix the idea. Take $F(x,y)=x^{2}y$. Then $F_{x}=2xy$ and $F_{y}=x^{2}$, so
$$
d\left(x^{2}y\right)=2xy\,dx+x^{2}\,dy .
$$
Take $G(x,y)=xy$, whose partial derivatives are $G_{x}=y$ and $G_{y}=x$, so
$$
d\left(xy\right)=y\,dx+x\,dy .
$$
The second identity is used a dozen times later in the note. Notice how it reads backwards: the combination $y\,dx+x\,dy$ is not merely an expression, it is the total differential of a specific function, namely the product $xy$. Recognising such combinations is the central skill of the topic.
1.4 Exact differentials
> Definition (Exact differential). The expression $M\,dx+N\,dy$ is an exact differential on a domain $D$ if there exists a differentiable function $F$ on $D$ such that
$$
\frac{\partial F}{\partial x}=M \qquad \text{and} \qquad \frac{\partial F}{\partial y}=N
$$
at every point of $D$. The function $F$ is called a potential function for the form, or a primitive.
When it exists, the potential is far from unique. If $F$ is a potential then so is $F+C$ for any constant $C$, since constants have zero partial derivatives. Adding a function of $y$ alone to $F$ is not allowed, because that would change $F_{x}$ only if it depended on $x$; adding a function of $x$ alone is not allowed either, for the symmetric reason. This flexibility is examined carefully in Section 3.
> Definition (Exact differential equation). The equation $M(x,y)\,dx+N(x,y)\,dy=0$ is exact on a domain $D$ if the left-hand side is an exact differential on $D$.
An exact equation therefore carries a hidden structure: there is a function $F$ whose total differential is precisely the left-hand side. Once $F$ is known, the equation reads $dF=0$, and the solution follows at once.
1.5 The geometric meaning: level curves of a height function
The clearest way to hold the whole topic in mind is to think of $F(x,y)$ as the height of a surface above the plane, so that $F(x,y)=C$ is the contour line at height $C$. Moving along a contour, the height does not change, and therefore the total differential vanishes along that curve. In symbols, if $y=y(x)$ traces the contour $F(x,y)=C$, then differentiating the identity $F(x,y(x))=C$ with respect to $x$ by the chain rule gives
$$
F_{x}+F_{y}\frac{dy}{dx}=0 .
$$
With $F_{x}=M$ and $F_{y}=N$ this becomes
$$
M+N\frac{dy}{dx}=0 ,
$$
which is exactly the differential equation. The two statements
$$
M\,dx+N\,dy=0 \qquad \text{and} \qquad F(x,y)=C
$$
are therefore equivalent: every solution curve of the exact equation is a level curve of the potential, and every level curve of the potential is a solution curve. The constant $C$ labels which contour is being followed, and it is the single arbitrary constant that a first order equation is entitled to.
This picture is also the reason the answer is stated implicitly. An exact equation hands over $F(x,y)=C$ directly, without solving for $y$, and in most cases that implicit form is the final answer because isolating $y$ is either impossible or unhelpful.
1.6 Domains and regularity hypotheses
Every statement in this note assumes that the coefficients $M$ and $N$ possess continuous first partial derivatives on a domain $D$ that is a rectangle, or more generally a region with no holes. Continuity of $M_{y}$ and $N_{x}$ is needed so that the mixed second partial derivatives of a potential may be interchanged, and the absence of holes is needed so that a local potential can be extended to a global one.
The topological hypothesis is not a decoration. On the punctured plane, obtained by deleting the origin from the plane, the form
$$
\frac{x\,dy-y\,dx}{x^{2}+y^{2}}
$$
has coefficients whose cross partial derivatives agree everywhere on the punctured plane, yet no single-valued potential exists there; the natural candidate is the angle $\arctan\left(\frac{y}{x}\right)$, which can only be defined continuously on a plane cut along a ray. Section 5 returns to this point, because it is the standard counterexample to the naive reading of the criterion.
1.7 Integrating factors
Most differential forms are not exact. The next idea is to repair a non-exact form by multiplication.
> Definition (Integrating factor). A function $\mu(x,y)$, not identically zero on the domain, is an integrating factor for $M\,dx+N\,dy=0$ if the form
$$
\mu M\,dx+\mu N\,dy
$$
is exact on that domain. Equivalently, $\mu$ is an integrating factor if there exists a function $F$ with
$$
\frac{\partial F}{\partial x}=\mu M \qquad \text{and} \qquad \frac{\partial F}{\partial y}=\mu N .
$$
Multiplying an equation by a function changes the equation, so it may appear that the solution set has been altered. It has not. If $\mu$ is finite and non-zero on a region, then $\mu(M\,dx+N\,dy)=0$ at a point of that region exactly when $M\,dx+N\,dy=0$ at that point, so the two equations have the same solution curves there. The only losses occur at points where $\mu$ is zero or infinite, and those points must be examined separately.
The search for an integrating factor is in general harder than solving the original equation, because the condition on $\mu$ is itself a first order partial differential equation,
$$
\mu_{y}M+\mu M_{y}=\mu_{x}N+\mu N_{x} .
$$
The practical content of this topic is that for two important classes the search can be reduced to a single integration in one variable, and that for a third class the factor can be written down by inspection from the homogeneity of the coefficients. Those three reductions are proved in Section 3 and applied in Section 4.
1.8 A dictionary of the symbols
Before the theorems, the vocabulary of the note is collected in one place. The letter $x$ denotes the first independent variable and $y$ the second; the pair $(x,y)$ is a point of the plane. The function $M(x,y)$ is the coefficient of $dx$ and the function $N(x,y)$ is the coefficient of $dy$. The symbol $F(x,y)$, or occasionally $\Phi(x,y)$, denotes the unknown potential function whose existence is the whole question. The letters $\mu$ and sometimes $\varphi$ denote an integrating factor. A subscript denotes partial differentiation, so $M_{y}$ is the partial derivative of $M$ with respect to $y$, computed by treating $x$ as a constant, and $N_{x}$ is the partial derivative of $N$ with respect to $x$, computed by treating $y$ as a constant. The constant $C$ denotes the arbitrary constant of the solution family.
2. Theorems, Lemmas, and Analytical Properties
2.1 Equality of mixed partial derivatives
> Lemma (Symmetry of second partial derivatives). Let $F$ be defined on an open set containing the point $(x,y)$. If $F_{xy}$ and $F_{yx}$ both exist and are continuous in a neighbourhood of $(x,y)$, then
$$
F_{xy}(x,y)=F_{yx}(x,y) .
$$
The result is often called Clairaut's theorem or Schwarz's theorem. Its content is that, for a sufficiently smooth function, the order in which the two differentiations are performed is irrelevant. Every function met in this course satisfies the hypothesis, since it is built from polynomials, exponentials, logarithms and trigonometric functions composed with smooth expressions.
The lemma is the engine of the necessity half of the exactness criterion. If a potential exists at all, the two cross partial derivatives of the coefficients must agree, because both of them are the same mixed second derivative of the potential written in different orders. There is no way around this: exactness forces the equality.
2.2 The exactness criterion
> Theorem (Necessary and sufficient condition for exactness). Let $M$, $N$, $M_{y}$ and $N_{x}$ be continuous functions of $(x,y)$ on a rectangle $D$. Then
$$
M\,dx+N\,dy=0
$$
is exact on $D$ if and only if
$$
\frac{\partial M}{\partial y}=\frac{\partial N}{\partial x}
$$
at every point of $D$.
The theorem has two halves that are proved by entirely different arguments. Necessity is a differentiation argument and fits in five lines. Sufficiency is a construction: the equality of the cross partials is used to build the potential explicitly, and the construction is what makes the criterion usable rather than merely descriptive.
The hypotheses matter in two ways. Continuity of the four functions guarantees that the mixed derivative lemma applies in the necessity direction and that the fundamental theorem of calculus applies in the sufficiency direction. The rectangular shape of $D$ guarantees that the integrals in the construction stay inside the domain, so that no path has to leave the region.
> Corollary (Solution of an exact equation). If the criterion holds on $D$, there is a potential $F$ on $D$, and the solution of the equation is
$$
F(x,y)=C ,
$$
where $C$ is an arbitrary constant.
The corollary is stated separately because students routinely prove exactness and then stop, as though the label exact were the answer. The label is a licence to integrate, not an answer.
2.3 The consistency lemma behind the two-step method
Suppose the equation is exact and $F$ is a potential. Then
$$
F(x,y)=\int M(x,y)\,dx+\varphi(y) ,
$$
where the integral is taken with respect to $x$ alone, treating $y$ as a constant, and where $\varphi$ is the arbitrary function of $y$ that plays the role of the constant of integration.
> Lemma (The remainder is a function of $y$ alone). If $M_{y}=N_{x}$ on $D$ and $F$ is defined by the integral above, then the quantity
$$
N(x,y)-\frac{\partial}{\partial y}\int M(x,y)\,dx
$$
is independent of $x$.
The lemma is the reason the two-step method terminates. After integrating $M$ with respect to $x$, the partial derivative $F_{y}$ is computed and set equal to $N$. The equation obtained is
$$
\frac{\partial}{\partial y}\int M(x,y)\,dx+\varphi'(y)=N(x,y) ,
$$
and the lemma guarantees that everything except $\varphi'(y)$ cancels, leaving an equation in $y$ alone that can be integrated. If a proposed solution leaves an $x$ in the equation for $\varphi'(y)$, then either the equation was not exact or the integration of $M$ was performed incorrectly. Section 3.3 supplies the proof.
2.4 The two classical tests for an integrating factor of one variable
> Theorem (Integrating factor depending on $x$ alone). Suppose $N\neq 0$ on $D$ and the ratio
$$
\frac{M_{y}-N_{x}}{N}
$$
is a function of $x$ alone, say $f(x)$. Then
$$
\mu(x)=\exp\left(\int f(x)\,dx\right)
$$
is an integrating factor for $M\,dx+N\,dy=0$ on $D$.
> Theorem (Integrating factor depending on $y$ alone). Suppose $M\neq 0$ on $D$ and the ratio
$$
\frac{N_{x}-M_{y}}{M}
$$
is a function of $y$ alone, say $g(y)$. Then
$$
\mu(y)=\exp\left(\int g(y)\,dy\right)
$$
is an integrating factor for $M\,dx+N\,dy=0$ on $D$.
The two theorems are deliberately asymmetric in appearance and completely symmetric in content. In each case the numerator is the cross-partial difference, and the denominator is the coefficient that would be differentiated with respect to the other variable. The first test divides by $N$ and produces a function of $x$; the second divides by $M$ and produces a function of $y$. Both produce a factor obtained by exponentiating one integral.
The tests are sufficient, not necessary. When the first ratio depends on both variables, an integrating factor may still exist; it simply does not depend on $x$ alone. Saying that the test fails is a statement about the shape of the factor, never a statement that no factor exists. This distinction is the source of a great many lost marks.
The hypotheses $N\neq 0$ and $M\neq 0$ are not cosmetic. They are exactly the conditions under which the divisions defining the ratios make sense, and they must be recorded whenever the theorems are applied. On a region where $N$ vanishes the first ratio is undefined and the test cannot be run at all.
2.5 Homogeneous equations and the factor built from $Mx+Ny$
> Definition (Homogeneous function). A function $f(x,y)$ is homogeneous of degree $n$ if
$$
f(tx,ty)=t^{n}f(x,y)
$$
for every $t>0$ and every point of the domain.
> Theorem (Integrating factor for a homogeneous equation). Let $M$ and $N$ be homogeneous of the same degree $n$ and suppose $Mx+Ny$ is not identically zero. Then
$$
\mu=\frac{1}{Mx+Ny}
$$
is an integrating factor for $M\,dx+N\,dy=0$.
The proof uses Euler's theorem on homogeneous functions, which states that a homogeneous function $f$ of degree $n$ satisfies
$$
x f_{x}+y f_{y}=n f .
$$
Applied to $M$ and to $N$, Euler's relation converts the algebra of the exactness test into a cancellation. The verification is carried out in full in Section 3.6, because the two denominators that appear there are the usual place where errors creep in.
The factor produced by this theorem is not usually the simplest one. For the equation with $M=x^{2}-y^{2}$ and $N=2xy$, the theorem gives $\mu=1/\left(x\left(x^{2}+y^{2}\right)\right)$, while the test for a factor depending on $x$ gives $\mu=1/x^{2}$. Both are correct, and both lead to the same solution family. Section 4 exhibits this coincidence explicitly, since it is the most instructive illustration of the non-uniqueness recorded next.
2.6 Integrating factors are never unique
> Lemma (Multiplication of an integrating factor by a function of the potential). If $\mu$ is an integrating factor with potential $F$, and if $H$ is any differentiable function of one variable with $H'(F)\neq 0$, then $\mu H'(F)$ is also an integrating factor, with potential $H(F)$.
The lemma follows by the chain rule. From $F_{x}=\mu M$ and $F_{y}=\mu N$,
$$
\frac{\partial}{\partial x}H(F)=H'(F)F_{x}=H'(F)\mu M , \qquad \frac{\partial}{\partial y}H(F)=H'(F)F_{y}=H'(F)\mu N ,
$$
so the new form has the potential $H(F)$. Two consequences follow. First, any question that asks for the integrating factor without further specification has infinitely many correct answers, so an answer must be checked by verifying the exactness condition rather than by comparison with a printed key. Second, the solution family is unaffected: the level curves of $H(F)$ are the same curves as the level curves of $F$, merely relabelled.
2.7 The standard differentials and their integrating factors
A short list of exact differentials, memorised, turns a large class of problems into pattern recognition. The table records the differential form, an integrating factor for it, a potential, and the identity that justifies the entry.
| Differential form | Integrating factor | Potential | Identity |
|---|---|---|---|
| $y\,dx+x\,dy$ | $1$ | $xy$ | $d(xy)=y\,dx+x\,dy$ |
| $y\,dx+x\,dy$ | $\frac{1}{xy}$ | $\ln(xy)$ | $d\left(\ln(xy)\right)=\frac{y\,dx+x\,dy}{xy}$ |
| $y\,dx+x\,dy$ | $-\frac{1}{x^{2}y^{2}}$ | $\frac{1}{xy}$ | $d\left(\frac{1}{xy}\right)=-\frac{y\,dx+x\,dy}{x^{2}y^{2}}$ |
| $x\,dy-y\,dx$ | $\frac{1}{x^{2}}$ | $\frac{y}{x}$ | $d\left(\frac{y}{x}\right)=\frac{x\,dy-y\,dx}{x^{2}}$ |
| $y\,dx-x\,dy$ | $\frac{1}{y^{2}}$ | $\frac{x}{y}$ | $d\left(\frac{x}{y}\right)=\frac{y\,dx-x\,dy}{y^{2}}$ |
| $x\,dy-y\,dx$ | $\frac{1}{x^{2}+y^{2}}$ | $\arctan\left(\frac{y}{x}\right)$ | $d\left(\arctan\frac{y}{x}\right)=\frac{x\,dy-y\,dx}{x^{2}+y^{2}}$ |
| $x\,dy-y\,dx$ | $\frac{1}{xy}$ | $\ln\left(\frac{y}{x}\right)$ | $d\left(\ln\frac{y}{x}\right)=\frac{x\,dy-y\,dx}{xy}$ |
| $x\,dx+y\,dy$ | $1$ | $\frac{1}{2}\left(x^{2}+y^{2}\right)$ | $d\left(\frac{x^{2}+y^{2}}{2}\right)=x\,dx+y\,dy$ |
| $x\,dx+y\,dy$ | $\frac{1}{x^{2}+y^{2}}$ | $\frac{1}{2}\ln\left(x^{2}+y^{2}\right)$ | $d\left(\ln\sqrt{x^{2}+y^{2}}\right)=\frac{x\,dx+y\,dy}{x^{2}+y^{2}}$ |
| $x\,dy+y\,dx$ | $1$ | $xy$ | $d(xy)=x\,dy+y\,dx$ |
The table is short enough to memorise and rich enough to solve most textbook problems. Its structure is worth naming. The first three rows concern the same differential $y\,dx+x\,dy$ and differ only in the price paid to make it exact; multiplying by $1$ costs nothing, multiplying by $1/(xy)$ converts the potential from $xy$ to $\ln(xy)$, and multiplying by $-1/(x^{2}y^{2})$ converts it to $1/(xy)$. The next four rows concern $x\,dy-y\,dx$, the antisymmetric companion of the product differential, and each of its four standard factors produces one of the four most useful combinations in the subject: the ratio $y/x$, the reciprocal ratio $x/y$, the polar angle, and the logarithm of the ratio. The last three rows concern the radial differential $x\,dx+y\,dy$.
Two remarks prevent misapplication. First, the entries are statements about the combination as a whole, not about the individual terms, so a form must be rearranged into the listed shape before a factor is read off. Second, each entry must be used with its own validity conditions: the logarithmic potentials require positive arguments, and the arctangent potential requires $x\neq 0$.
Unlock Complete Study Notes & Exam Traps
The full guide includes formal proofs, worked exemplar calculations, high-yield exam traps, and examiner marking schemes. Continue studying this topic in Mentify Prep Studio.
Verified Examination Problems
49 verified questions in catalogQuestion 1 (18 marks)
: **
a) Eliminate the arbitrary constant and obtain the corresponding differential equation
$$
xy = Ae^x + Be^{-2x} + x^2
$$
(4 Marks)
d) Test for the differential equation below for exactness and hence determine the general solution if ((x + \sin y)dx + (y^2 + x \cos y)dy = 0).
(4 Marks)
e) Find the general solution of the equation
$$
y'' + 4y' + 13y = 0
$$
(3 Marks)
f) A radioactive substance disintegrates at a rate proportional to the amount present. If 30\% of a radioactive substance disintegrates in 10 days, how long will it take for 90\% to disintegrate?
(4 Marks)
g) Show that the following pair of functions are linearly independent
$$
\cos^2 x; \cos 2x
$$
**(3 Marks)
Question 4 (45 marks)
b) Solve the differential equation (\dfrac{dy}{dx} = \dfrac{y}{x} + x \sin \dfrac{y}{x}) [5 marks]
c) Obtain the general solution of the Bernoulli equation (x^2 dy + y(x+y)dx = 0) [5 marks]
d) The rate at which the ice melts is proportional to the amount of ice at the instant. Find the amount of ice left after 2 hours if half the quantity melts in 30 minutes. [5 marks]
e) Show that the functions (1, x, x^2) are linearly independent. Hence form the differential equation out of them [5 marks]
f) Show that (\dfrac{1}{y^3}) is the integrating factor of the differential equation ((y^4 + 2y)dx + (xy^3 + 2y^4 - 4x)dy = 0). Hence solve
TWO (20 marks)
- Obtain the general solution of the equation ((2x + y + 1)dx + (4x + 2y - 1)dy = 0). (5 marks)
Access all authentic past questions, interactive AI hint generation, and full marking rubrics in the course studio.
Unlock All Questions in Studio →