Chapters 1-2 Lecture Notes

Download as pdf or txt
Download as pdf or txt
You are on page 1of 62

Math 3350

1 Chapter 1
Notes Proofread by Yunting Gao and corrections made on 03/02/2021

1.1 Material for Section 1.1

An Ordinary Differential Equation (ODE) is a relation between an independent variable x


dj y
and and a dependent variable y (i.e., y = y(x) depends on x) and its derivatives y (j) = j
dx
for j = 1, · · · , n. So it is an equation that can be written in the form

F (x, y, y (1) , · · · , y (n) ) = 0, (1)

For example, in this chapter we will learn to solve equations like the following:
x−y
y 0 − x cos(x2 ) = 0, y 0 − sin(x + y) = 0, y 0 − 2xy − x = 0, and y 0 = .
x+y
There are other types of differential equations most notably partial differential equations
(PDEs). It is easy to distinguish an ODE from a PDE. An ODE always has a single indepen-
dent variable while a PDE always has more that one independent variable and the equation
involves partial derivatives. For example consider a PDE with independent variables x and
y and dependent variable z so that z depends on x and y, i.e., z = z(x, y). Then a general
second order PDE would be an equation of the form

∂z ∂z ∂ 2 z ∂ 2 z ∂ 2 z
 
F x, y, z, , , , , = 0.
∂x ∂y ∂x2 ∂y 2 ∂x∂y

We study differential equations because many practical physical systems are govern (or
described by) either ordinary or partial differential equations. Solving ODEs for explicit
solutions can be very difficult or even impossible. But in this class we will focus on the
solution of simple problems in order to give students some idea of what is involved in the
more general case. The main tools needed by the students is a background in college algebra
and calculus (differentiation and integration).

1
The goal in “solving” an equation is to find all functions y(x) satisfying the equation (1).
Unfortunately this objective is beyond our reach other than some very special cases. In this
class we will study a few of these special cases.

Notation and Terminology: The following discussion may seem a bit over the top. The
main purpose is to introduce the standard notation and terminology used in talking about
ODEs. DO NOT BE OVERWHELMED they are just words. Also read the book
where more examples are also given. The main words to understand are written in italics
and underlined.

1. Chapter 1 is mostly concerned with notation and terminology. We will need this
material so I will cover it fairly carefully. You need to learn these definitions and
terminology.

2. The order of the highest order derivative, n in (1), is called the order of the equation.

3. If we can solve for the highest order derivative term, then we say the equation can be
put in normal form:
y (n) = f (x, y, y (1) , · · · , y (n−1) ).

0
In chapter 2 we will consider only first order equations y = f (x, y).

4. An ODE is said to be Linear if it can be written in the form

dn y dn−1 y d1 y
an (x) + a n−1 (x) + · · · + a 1 (x) + a0 (x)y(x) = g(x). (2)
dxn dxn−1 dx1

In Chapters 3, 4 and 5 we will consider mostly linear equations. They are by far the
easiest - but still not easy. Similarly a linear PDE in two independent variables is

∂ 2z ∂ 2z ∂ 2z ∂z ∂z
a2,0 (x, y) 2
+ a 0,2 (x, y) 2
+ a 1,1 (x, y) + a1,0 (x, y) + a0,1 (x, y) + a0,0 z = 0.
∂x ∂y ∂x∂y ∂x ∂y

Notice the equation has independent variables x and y and dependent variable z.

(a) A linear equation is said to be homogeneous if g(x) = 0. If g(x) 6= 0 then the

2
equation is called non-homogeneous.

(b) A solution y(x) may only exist on a certain domain called the interval of existence.
The interval of existence may be open, e.g., (a, b), closed, e.g., [a, b] or it may be
open on one end and closed on the other, e.g., (a, b]. It is possible that this interval
is the whole real line.

(c) Here are some examples

· (1 + x)y 00 − cos(x2 )y 0 + ex y = cos(x) (second order, linear, ode)


· (1 + y 2 )y 000 − x sin(y + y 0 ) = 0 (third order, nonlinear, ode)
· y 0 − 2xy − y 2 = 0 (first order, nonlinear, ode)
x−y
· (y 0 )2 = (first order, nonlinear, ode)
x+y
· x3 y 000 − x2 y 00 + 2xy 0 − y = 0 (third order, linear, ode)
· zxx + zyy = 0 (second order, linear, pde)

5. Sometimes it is possible that y ≡ 0 is a solution. In this case we call this a trivial solution.

6. If we have a solution given in the form y = y(x) then we say that y(x) is an explicit solution.
But very often it is either difficult or possibly impossible to obtain an explicit solution
even if we know that it exists. In this case we may still be able to find a so-called
implicit solution. We define an implicit solution as follows:
A relation G(x, y) = 0 is called an implicit solution of the ODE (1) if by
repeated implicit differentiation of G(x, y) = 0 with respect to x and algebraic
simplification we can arrive at (1).
In the first order case we will say that G(x, y) = 0 is an implicit solution of y 0 = F (x, y)
if when we differentiate G(x, y) = 0 implicitly with respect to x and solve for y 0 we
obtain y 0 = F (x, y). Here is an example. We claim an implicit solution of y 0 = −x/y
is G(x, y) = x2 + y 2 − 1 = 0. Notice in this case we cannot solve the equation

G(x, y) = 0 for a single function y = f (x) since we arrive at y = ± 1 − x2 which
is not a function since it takes on two different y values for one x value. But if we
differentiate x2 + y 2 − 1 = 0 with respect to x we arrive at 2x + 2yy 0 = 0 which, when
we solve for y 0 , gives y 0 = −x/y so G(x, y) = x2 + y 2 − 1 = 0 does represent an implicit
solution.

3
7. Generally speaking an nth order ODE has an n-parameter family of solutions. That
is to say that the solution depends on n arbitrary constants (constants of integra-
tion). Thus we would write an implicit solution as G(x, y, c1 , c2 , · · · , cn ) = 0 where
c1 , c2 , · · · , cn are arbitrary parameters. If we can find an implicit or explicit solution
containing n arbitrary parameters then we call the solution the general solution. Here
is an example. Consider the differential equation y 00 = 0. we have not yet introduced
methods to solve a Differential Equation (DE) but from calculus we know that if we
integrate both sides with respect to x we get y 0 = C1 where C1 is an arbitrary constant.
Then we can integrate both sides again with respect to x and we arrive at y = C1 x+C2
where C2 is another arbitrary constant. We claim that the y = C1 x + C2 is a general
solution of y 00 = 0.

For example, a general explicit solution of y (3) = 0 is y = c1 + c2 x + c3 x2 .

Examples from Section 1.1

1. Given a set of equations and a set of solutions find the best answer (most complete
answer) matching the equation with the solution.

A. y = e3x

1. y 00 + y = 0 B. y = sin(x)

2. y 0 + 3y = 0 C. y = e−3x

3. y 0 − 3y = 0 D. y = e3x , y = e−3x

4. y 00 − 9y = 0 E. y = cos(x)

F. y = sin(x) and y = cos(x)


We need to match the best answer on the right with the equation on the left. You do
this by trial and error. For example, if we differentiate y = e3x we get y 0 = 3e3x = 3y
or y 0 − 3y = 0 which is exactly equation 4. You can do this a bit more systematically
as follows (notice for parts with more than one function you need to consider taking
two derivatives and for sines and cosines you must also differentiate twice)

A. y = e3x ⇒ y 0 = 3e3x = 3y or y 0 − 3y = 0.

4
B. y = sin(x) ⇒ y 0 = cos(x) ⇒ y 00 = − sin(x) = −y ⇒ y 00 + y = 0 which is equation
is equation 1. But see answer D below.

C. y = e−3x ⇒ y 0 = −3e−3x = −3y or y 0 + 3y = 0 which is exactly equation 3.

D. y = e3x , y = e−3x In this case we have (as above) y = e3x satisfies y 0 − 3y = 0 and
similarly y = e−3x satisfies y 0 + 3y = 0 but if we differentiate both of these twice
we see they both satisfy y 00 − 9y = 0 which is equation 5.

E. y = cos(x) ⇒ y 0 = − sin(x) ⇒ y 00 = − cos(x) = −y ⇒ y 00 + y = 0 which is equation


is equation 1. So both B and D satisfy equation 1.

F. y = sin(x) and y = cos(x) The best answer for equation 1 is E since both functions
satisfy the equation.

So we have the best answer

1. E y 00 + y = 0

2. C y 0 + 3y = 0

3. A y 0 − 3y = 0

4. D y 00 − 9y = 0

2. Consider the problem of finding all solutions in the form y = emx of y 00 − 3y 0 + 2y = 0.

Substituting y = emx , y 0 = memx and y 00 = m2 emx into the equation we have

m2 emx − 3memx + 2emx = 0 ⇒ m2 − 3m + 2 = 0.

We can easily solve this quadratic equation to obtain m = 1, m = 2. So we have


solutions y = ex and y = e2x .

3. Consider the problem of finding all solutions in the form y = xm of x2 y 00 + xy 0 − 4y = 0.

Substituting y = xm , y 0 = mxm−1 and y 00 = m(m − 1)xm−2 into the equation we have

x2 m(m − 1)xm−2 + xmxm−1 − 4xm = 0 ⇒ xm (m(m − 1) + m − 4) = 0.

Thus we get m2 − 4 = 0 so that m = −2, 2.

5
1.2 Material for Section 1.2

The Initial Value Problem (IVP) is to find a unique solution of (1) which we rewrite here

F (x, y, y (1) , · · · , y (n) ) = 0

satisfying the n constraints (called initial conditions)

y(x0 ) = y1 , y 0 (x0 ) = y2 , · · · , y (n−1) (x0 ) = yn . (3)

Remark 1.1. In order to solve the IVP we first find a general solution which depends on
n parameters c1 , c2 , · · · , cn . We then apply the n constraints (3) to obtain a system of n
equations in n unknowns to evaluate the constants cj , j = 1, · · · , n and thus to obtain a
unique solution.

Example 1.1. In the example worked above we found two solutions of y 00 − 3y 0 + 2y = 0


given by ex and e2x . We claim that y = c1 ex + c2 e2x is a general solution. This will be done
in Chapter 3 but for now let us assume that it is a general solution.
Let us finish this example by solving the IVP

y 00 − 3y 0 + 2y = 0 with y(0) = 0 and y 0 (0) = 1 .


We have y = c1 ex + c2 e2x and y 0 (x) = c1 ex + 2c2 e2x . Substituting x = 0 into the formulas
for y and y 0 and using the initial conditions y(0) = 0 and y 0 (0) = 1 we have

0 = y(0) = c1 + c2 and 1 = y 0 (0) = c1 + 2c2 .



 c +c =0
1 2
So we have ⇒ c1 = −1 c2 = 1
 c + 2c = 1
1 2
Therefore the unique solution of the IVP is y(x) = e2x − ex .

Example 1.2. By simple integration we see that the general solution to the differential
equation y 0 = 3x2 is y(x) = x3 + c where c is an arbitrary constant of integration. The
unique solution satisfying the initial condition y(2) = −1 is y(x) = x3 − 9.

Two very important questions that arise in studying the solution of an IVP is (1) do

6
solutions exist and (2) are they unique. The answer to this question leads us to the statement
for a first order IVP of The Fundamental Existence and Uniqueness Theorem.
In this section we will consider first order equations and, for the most part, we are
interested in those equations that can be put in the normal form

y 0 = f (x, y) (4)

and the associated IVP


y 0 = f (x, y), y(x0 ) = y0 . (5)

Theorem 1.1 (Fundamental Existence Uniqueness Theorem (FEUT)). Let R be a rect-


angular region R = {(x, y) : a ≤ x ≤ b, c ≤ y ≤ d} that contains the point (x0 , y0 )
in its interior. If f (x, y) and ∂f /∂y are continuous in R, then there exists an interval
I0 = (x0 − h, x0 + h) ⊂ (a, b) for a number h > 0, and a unique function y = ϕ(x) defined
on I0 that solves the IVP (5) on I0 .

d
R
y = ϕ(x)
(x0 , y0 )

y0

c
a x0
b
I0
As an example let us consider the IVP y 0 = −y 2 , y(0) = 1. Here f (x, y) = −y 2 ,
fy (x, y) = −2y are both continuous functions everywhere in R2 = {(x, y) : x, y ∈ R}.
Therefore Theorem 1.1 implies that the IVP has a unique solution. Indeed, the general
solution to the ODE is y = (c + x)−1 where c is an arbitrary constant. Then the unique
solution to the IVP is y = (1 + x)−1 . Notice that this solution exists for all x > −1. But it
does not exist at x = −1.

7
Theorem 1.2 (Fundamental Existence Uniqueness Theorem First Order Linear). Consider
the first order linear IVP

a1 (x)y 0 (x) + a0 (x)y(x) = g(x), y(x0 ) = y0 , (6)

on an interval I = (a, b) = {x : a < x < b} with x0 ∈ I. If the functions a1 (x), a0 (x) and
g(x) are all continuous on I and a1 (x) 6= 0 on all of I, then (6) has a unique solution that
exists on the whole interval I.

Here is an example

Example 1.3. Consider the first order linear IVP

x+1
(x2 − 9)y 0 + x cos(x)y = with y(1) = 5.
x

x+1
In this case a1 (x) = (x2 − 9), a0 (x) = x cos(x) and g(x) = . The functions a1 and
x
a0 are continuous on the whole real line but g(x) has a discontinuity at x = 0. Also the
leading coefficient a1 (x) = 0 at both x = ±3. The number line is then broken into 4 parts:
−∞ < x < −3, −3 < x < 0, 0 < x < 3 , and 3 < x < ∞. Since the initial point x0 = 1 we
see that the solution is guaranteed to exist on the interval 0 < x < 3.

X X
−3 0 3
x0 = 1

Examples from Section 1.2

1
1. Given the IVP y 0 = −2xy 2 with y(0) = 1 and given the general solution y(x) =
x2 +C
find the unique solution to the IVP.

1 1 1
1 = y(0) = = ⇒ C = 1 ⇒ y(x) = .
02 + C C x2 + 1

2. Given the IVP y 00 + 16y = 0 with y(π/2) = −2 and y 0 (π/2) = 4 and given the general
solution y(x) = C1 cos(4x) + C2 sin(4x) find the unique solution to the IVP. In this

8
case we have y 0 (x) = −4C1 sin(4x) + 4C2 cos(4x) so the pair of equations obtained by
setting x = π/2 are

−2 = C1 cos(4 π/2) + C2 sin(4 π/2) = C1 cos(2π) + C2 sin(2π) = C1

4 = −4C1 sin(4 π/2) + 4C2 cos(4 π/2) = −4C1 sin(2π) + 4C2 cos(2π) = 4C2

Therefore C1 = −2 and C2 = 1 and the solution is y(x) = −2 cos(4x) + sin(4x)

3. Given the equation y 0 = y 2/3 find all (x0 , y0 ) in the plane for which the FEUT guaran-
tees the existence of a unique solution in a neighborhood of x0 .

Here we have F (x, y) = y 2/3 in the FEUT. Thus we have Fy = (2/3)y −1/3 . Notice that
since F (x, y) only depends on y all values of x0 are okay. Also we see that F (x, y) = y 2/3
is continuous for all y. But Fy = (2/3)y −1/3 does not exist for y = 0 (why?). But it is
continuous for all y > 0 and all y < 0. So the answer is

The IVP has a unique solution in a neighborhood of any (x0 , y0 ) in the plane for which
x0 is arbitrary and y0 > 0 or y0 < 0.

4. Given the equation xy 0 = y find all (x0 , y0 ) in the plane for which the FEUT guarantees
the existence of a unique solution in a neighborhood of x0 .

Here we have F (x, y) = y/x (here we divided both sides by x) in the FEUT. Thus we
have Fy = 1/x. Notice that F (x, y) depends on both x and y all values of y0 are okay
since it is continuous for all y as long as x 6= 0. The same is true of Fy = 1/x which
does not exist for x = 0 (why?). But it is continuous for all x > 0 and all x < 0 for all
y. So the answer is

The IVP has a unique solution in a neighborhood of any (x0 , y0 ) in the plane for which
y0 is arbitrary and x0 > 0 or x0 < 0.

5. Let us reconsider the previous example considered as a first order linear IVP. The
equation can be written as xy 0 − y = 0 which is in the form a1 (x)y 0 + a0 (x)y = 0
(see equation (2)) so the leading coefficient is a1 = x and the other coefficients are
both constants, a0 = −1 and g(x) = 0. Since all the coefficients are continuous

9
everywhere we only need to consider where the leading coefficient can be equal to zero.
a1 (x) = x = 0 when x = 0 so we can only choose x0 > 0 or x0 < 0. Appealing to
Theorem 1.2 we see that:

(a) If x0 > 0 and y0 is arbitrary, a unique solution will exist for all x > 0.

(b) If x0 < 0 and y0 is arbitrary, a unique solution will exist for all x < 0.

We note that the solution of this problem is y = x which actually exists for all x.
Notice that Theorem 1.2 is much stronger than Theorem 1.1.
1
6. Given the linear IVP (x2 − 9)y 0 + y = cos(x) find the interval of existence guaranteed
x
by Theorem 1.2. The coefficients a1 (x) = (x2 − 9) and g(x) = cos(x) are continuous
functions for all real numbers. The function a0 (x) = 1/x is continuous for all x 6= 0.
Finally, the leading coefficient a1 (x) = (x2 − 9) = 0 when x = ±3. So we must exclude
x = 0, −3, 3

X X X
−3 0 3

Using this number line we can give the interval of existence determined by the initial
condition y(x0 ) = y0

(a) y(−5) = 17 solution exists on −∞ < x < −3

(b) y(−1) = 12 solution exists on −3 < x < 0

(c) y(2) = −17 solution exists on 0 < x < 3

(d) y(7) = 22 solution exists on 3 < x < ∞


(x + 1)
7. Given the linear IVP (x2 − 9)y 0 + x cos(x)y = and IC y(1) = 7 find the interval
x
of existence guaranteed by Theorem 1.2. The coefficients a1 (x) = (x2 − 9) and a0 (x) =
x cos(x) are continuous functions for all real numbers. The function a0 (x) = (x + 1)/x
is continuous for all x 6= 0. Finally, the leading coefficient a1 (x) = (x2 − 9) = 0 when
x = ±3. So we must exclude x = 0, −3, 3. So we have the same number line picture
as above. And, if x0 = 1 then the solution exits on the interval 0 < x < 3.

10
2 Chapter 2
Reading assignment: Your need to study Chapter 2, Sections 2.1 through 2.5.

2.1 Autonomous Equations

The first order autonomous equations y 0 = f (y) are particularly interesting and the behavior
of solutions can be described rather nicely even without solving the equation.

Autonomous Equations
In contrast to the general case above for which it can be very difficult to find explicit
solutions, there is a class of problems for which it is possible to obtain a somewhat more
detailed description of the behavior of the solutions without actually finding the solution.
These are the first order autonomous equations y 0 = f (y) (notice the independent variable x
does not appear on the right hand side) which are particularly interesting and the behavior
of solutions can be described rather nicely even without solving the equation.
In particular, it is possible to visualize the qualitative properties of the solution using
the so called Phase Line which consists of a one dimensional plot of the critical points (also
called the equilibria points or nodes) together with arrows depicting whether a solution is
increasing or decreasing.
We begin our analysis by looking for solutions of the equation that are very simple.
Namely we look for what are called equilibrium solutions which are solutions that don’t
depend on the independent variable, in other words they are constants. If a solution is a
constant then it is of the form y(x) ≡ y0 where y0 is a real number. But then we see that
y 0 (x) = 0 for all x so the left side of the equation is zero, which in turn means the right
hand side must be zero. In other words we need f (y0 ) = 0. These real numbers are the
equilibrium points (also called fixed point, critical points or nodes).
Qualitative information about the equilibrium points of the differential equation y 0 = f (y)
can be obtained from special diagrams called phase diagrams.
A phase line diagram for the autonomous equation y 0 = f (y) is a line segment with labels
for all the nodes, i.e., one for each root of f (y) = 0, i.e. each equilibrium.

11
We can classify the possible behavior of a solution that begins in between two nodes
according to a simple classification of the three types of nodes: Asymptotically Stable (AS),
Unstable (US) or Semi-Stable (SS).

1. An equilibrium y0 is called Asymptotically Stable if solutions that begin near y0 at


x = 0 approach y0 as x → ∞. Such an equilibrium is also called a sink because it
x→∞
attracts nearby solutions, i.e., if y(0) is close to y1 , then |y(x) − y0 | −−−→ 0. In other
words y(x) moves toward y1 .

2. An equilibrium y0 is called Unstable if solutions that begin near y0 at x = 0 move away


from y0 as x → ∞. Such an equilibrium y0 is said to repel nearby solutions and it is
called a source, i.e., if y(0) is close to y0 , then |y(x) − y0 | increases as x → ∞. In other
words y(x) moves away from y0 .

3. An equilibrium y0 which is neither a sink or a source is called a Semi-Stable node. In


this case solutions that begin near y0 on one side (either greater than or less than y0 )
will approach y0 on one side but move away on the other side.

Classification of Nodes
In order to determine where a node is AS, US or SS we only need to determine the sign
of f (y) for y near the node.

1. AS: In this case we must have f (y) > 0 for y < y0 and f (y) < 0 for y > y0 . Here
f (y) > 0 indicates that y 0 (x) = f (y(x)) > 0 which means that y(x) is increasing (or
moving to the right on the number line). And, y 0 (x) = f (y(x)) < 0 means that y(x) is
decreasing (or moving to the left on the number line).

2. US: In this case we must have f (y) < 0 for y < y1 and f (y) > 0 for y > y1 .

3. SS: In this case there are two possibilities: we could have f (y) < 0 for y < y2 and
f (y) < 0 for y > y2 . Or we could have, f (y) > 0 for y < y2 and f (y) > 0 for y > y2 .
In other words the sign of f (y) is the same on both sides of y2 .

The following figure gives the important distinctions using arrows indicating whether the
solution y is increasing > or decreasing <.

12
Suppose for example that y 0 = f (y) and f (y) = 0 has four nodes y1 < y2 < y3 < y4 and
suppose when we plot these values on a phase line and sketch f (y) we arrive at the following
diagram

Notice that y1 is AS, y2 is US, y3 is SS and y4 is AS. We usually give the answer as a
pair as
(y1 , AS), (y2 , U S), (y3 , SS), (y4 , AS).

Example 2.1. Let us consider an example given by

y 0 = y(y + 1)(y − 2)2 (y + 3)3 (y − 4).

So we have f (y) = y(y+1)(y−2)2 (y+3)3 (y−4) which has critical points y = −3, −1, 0, 2, 4
and we want to classify each of the nodes. So we draw a phase line on which we plot all
these critical points and indicate, using a simple sketch with + and − signs of where f (y) is
positive and negative.

Finally then we have (−3, AS), (−1, U S), (0, AS), (2, SS), (4, U S).

Some Examples of Autonomous Equations


In these examples we consider an autonomous equation in the form y 0 = f (y) where y
is a function of the independent variable x (Note that the independent variable could be
anything, for example it could be t). So the equation could read x0 = f (x). In our examples
we will stick with the examples as they are in the book and use y = y(x).

1. Given the equation y 0 = y 2 − 3y we have f (y) = y 2 − 3y = 0 implies that y = 0, 3

13
AS US
+ + + - - - - - - + + + +

0 3

So we see that y = 0 is an Asymptotically Stable node (sink) and y = 3 is an Unstable


node (source).

2. Given the equation y 0 = y 2 − y 3 we have f (y) = y 2 − y 3 = y 2 (1 − y) = 0 implies that


y = 0, 1

So we see that y = 0 is a Semi-Stable node and y = 1 is an Asymptotically Stable node


(sink).

2.2 Separable Equations

A very important class of problem (autonomous and nonautonomous) are ones that can be
“separated.” These are problems that can be written in the form

dy
= f (y)g(x).
dx

In this case we can rewrite the problem in the form

1 dy
= g(x)
f (y) dx

or
1 dy
= g(x).
f (y) dx
Integrating both sides we arrive at
Z Z
1 dy
dx = g(x) dx + C
f (y) dx

14
or Z Z
1
dy = g(x) dx + C
f (y)
and we say the problem is solved “up to quadrature.” So to solve the problem we must
evaluate the indefinite integrals.
This shows already how hard solving differential equations are since it is easy to write
down functions that cannot be integrated exactly in terms of elementary functions. For
example,
2
y 0 = e−x

has solution which can be expressed as


Z x
2
y(x) = e−s ds + C
0

but it is well known that this integral cannot be expressed “in closed form.”
In spite of this example, the simplest class of separable first order equations are ones in
the form y 0 = f (x) which can be written in the separated form dy = f (x) dx. Therefore by
R
the Fundamental Theorem of Calculus y = f (x) dx + C.
You will be required to make substitutions many times when doing integrals. Suppose,
R
for example, you want to integrate e3x dx then you need to use the substitution

u = 3x => du = 3dx

and the integral becomes


Z
1/3 eu du = 1/3eu + C = 1/3e3x + C.

R R
More generally let us replace e3x dx by ekx dx and use the same type substitution

u = kx => du = kdx

15
so the integral becomes
Z
1/k eu du = 1/keu + C = 1/kekx + C.

R
Remark 2.1. Suppose in general you need to integrate f (kx)dx and you know an an-
tiderivative for f (x) is F (x), i.e., F 0 (x) = f (x), then using the substitution u = kx would
give Z
f (kx)dx = 1/kF (kx) + C.

We will use this idea maybe even a hundred times this semester so I would learn it. Just
remember this simple fact and you won’t have to make all these trivial substitutions.

Example 2.2. Consider the differential equation y 0 = (x + 1) cos(x2 + 2x). We separate the
equation and integrate to find the solution.

dy = (x + 1) cos(x2 + 2x)dx

so that Z Z
dy = (x + 1) cos(x2 + 2x)dx + C.

By the power rule the integral of dy is y so we have


Z
y= (x + 1) cos(x2 + 2x)dx + C.

To carry out the integral on the right we need to use a simple substitution u = x2 + 2x
which implies du = 2(x + 1)dx and we have
Z Z
2 1 1
y= (x + 1) cos(x + 2x)dx + C = cos(u) du + C = sin(x2 + 2x) + C.
2 2

Example 2.3. Consider the differential equation y 0 = −2xy 2 . We separate the dependent
and independent variables and integrate to find the solution.

dy
= −2xy 2
dx

16
y −2 dy = −2x dx
Z Z
−2
y dy = −2 x dx + c

− y −1 = −x2 + c
1
y=
x2 −c

1
But since c is an arbitrary constant we can just as easily write y = .
x2 +c
Example 2.4. The equation y 0 = y − y 2 is separable and we find

dy
= dx
y − y2

On the left we expand in partial fractions and integrate.


Z   Z
1 1
− dy = dx + c
y y−1
ln |y| − ln |y − 1| = x + c

This is an implicit solution for y(x). We can solve for y(x) to obtain an explicit solution as
follows.

y y y
ln =x+c ⇒ = ex+c ⇒ = ±ex+c
y−1 y−1 y−1
y
= c1 ex (Here we have substituted c1 for ±ec .)
y−1
c1 ex
y= (which is the same as)
c1 ex − 1
1
y= −x
(divided top and bottom by c1 and ex .)
(1/c1 )e − 1
1
y= (finally we set C = 1/c1 .)
1 − Ce−x

An important point here is that a general solution is not unique because of the arbitrary
constant that can take on many different forms.

Here are a list of some separable equations with partial details.


Supplemental Separable Equations

17
1 − x2
1. y 0 = ⇒ y 2 dy = (1 − x2 )dx ⇒ y = (3x − x3 + k)1/3
y2
dy 3
2. y 0 = 3yx2 ⇒ = 3x2 dx ⇒ y = kex
y
1 − y2 2y dx
3. xy 0 = ⇒ =− ⇒ y = ±(1 + kx−1 )1/2
2y y2−1 x
cos2 (y)x xdx
4. y 0 = ⇒ sec2 (y)dy = ⇒ y = tan−1 (ln(1 + x2 )1/2 + k)
1 + x2 1 + x2
dy
5. y 0 = 4x3 (1 − y), y(0) = 3 ⇒ = 4x3 dx ⇒
1−y
−4
− ln(|1 − y|) = x4 + C ⇒ |1 − y| = eC ex now k = eC > 0 and y(0) = 3
−4 −4
⇒ y − 1 = kex , and finally y = 2ex +1
p
6. y 0 = 2 y + 1 cos(x), y(π) = 0 ⇒ 1/2(y + 1)−1/2 dy = cos(x)dx ⇒
(y + 1)1/2 = sin(x) + C ⇒ y = (sin(x) + k)2 − 1, and y = sin2 (x) + 2 sin(x)
3x2 + 4x + 2
7. y 0 = , y(0) = −1 ⇒ (2y + 1)dy = (3x2 + 4x + 2)dx
2y + 1
⇒ y 2 + y = x3 + 2x2 + 2x + C, y 2 + y = x3 + 2x2 + 2x

8. y 0 = 2x sin2 (y), y(0) = π/4 ⇒ csc2 (y)dy = 2xdx ⇒ − cot(y) = x2 + C,


so that y = cot−1 (1 − x2 )

p √ 3 dy dx
9. 1 − y 2 dx = 1 − x2 dy, y(0) = ⇒ p =√ ⇒
2 1 − y2 1 − x2
sin−1 (y) = sin−1 (x) + C ⇒ y = sin(sin−1 (x) + C) ⇒ y = sin(sin−1 (x) − π/3)
dx dx
10. = 4(x2 + 1), x(π/4) = 1 ⇒ = 4dt ⇒ tan−1 (x) = 4t + C
dt (x2 + 1)
⇒ x = tan(4t + C) ⇒ x = tan(4t − 3π/4)
dy (1 − x) dx
11. x2 y 0 = y−xy, y(−1) = −1 ⇒ = ⇒ ln(|y|) = (−x−1 −ln(|x|))+C ⇒
y x2
−1 −1 −1
−1 e−x eC e−x eC e−x k
|y| = e−x −ln(|x|)+C = and y(−1) = −1 ⇒ −y = or y =
|x| −x x
1 −(x−1 +1)
ke e
(where k = eC ) and applying y(−1) = −1 ⇒ −1 = ⇒ y=
−1 x

18
2.3 First Order Linear Equations

The first order, linear, non-homogeneous differential equation has the form

dy
+ p(x)y = f (x). (7)
dx

This equation is not (in general) separable. To solve Equation (7), we multiply both sides
by an integrating factor.
The integrating factor for this first order linear equation is

R
p(x) dx
µ(x) = ce .

So to solve the equation (7) we multiply by the integrating factor and integrate. Notice

that µ satisfies = p(x)µ so multiplying the equation by µ we have
dx

dy
µ + p(x)µy = µf (x)
dx

or
dy dµ
µ + y = µf (x).
dx dx
But by the product rule the left hand side is the exact derivative [µy]0 so we have

[µy]0 = µf (x)

and integrating both sides gives


Z
µy = µ(x)f (x) dx + C,

or finally Z
1 C
y= µ(x)f (x) dx + .
µ µ
Remark 2.2. First Order, Linear Homogeneous Differential Equations. We have

19
just shown that the first order, linear, homogeneous differential equation,

dy
+ p(x)y = 0,
dx

has the general solution


R
y = Ce− p(x) dx
. (8)
C
The solution obtained above is exactly . In other words the solution of the non-homogeneous
µ
problem always contains the solution of the homogeneous problem.
A very big point here is that the general solution of a non-homogeneous first order
linear problem is the sum of two terms, i.e., the general solution is y = yp + yc where yp
is called a particular solution and it satisfies y 0 + p(x)y = f (x), and the general solution
of the homogeneous problem, yc , that satisfies y 0 + p(x)y = 0. In the book yc is called the
complementary solution.

Let us show that yp satisfies the non-homogeneous problem, where

R
Z R

− p(x) dx p(x) dx
yp (x) = e e f (x) dx .

We have by the product rule and the chain rule

R
Z R
 R  R 
yp0 (x) = −pe − p(x) dx
e p(x) dx
f (x) dx + e− p(x) dx
e p(x) dx
f (x)

= −p(x)yp (x) + f (x),

and therefore
yp (x)0 + p(x)yp (x) = f (x).

Example 2.5. Find the general solution of

1
y 0 + y = 4x2 .
x

20
First we find the integrating factor.
Z 
1
µ(x) = exp dx = eln x = x
x

We multiply by the integrating factor

dy
(xy) = 4x3
dx

and integrate
xy = x4 + C

Dividing by the integrating factor we have

C
y = x3 + .
x

The particular and complementary solutions are

C
y p = x3 and yc = .
x

Note that the general solution to the differential equation must contain an arbitrary constant.

3x2 dx 3
R
Example 2.6. Solve the IVP y 0 + 3x2 y = 6x2 , y(0) = 1 ⇒ µ = e = ex . Thus we
have
h i0
x3 3
e y = 6x2 ex

which implies Z
x3 3 3
e y=6 x2 ex dx + C = 2ex + C.

3 3
So we have ex y = 2ex + C and we can apply the IC y(0) = 1 to find C. Namely,

1=2+C ⇒ C = −1

Therefore
3
y = 2 − e−x .

21
Example 2.7. Solve the IVP xy 0 − y = x2 sin(x) with y(π) = 0. First we must write the
1 R
equation as y 0 − y = x sin(x) from which we find µ = e− dx/x = e− ln(x) = x−1 . So we find
x
 −1 0
x y = sin(x)

which implies Z
−1
x y= sin(x) dx + C = − cos(x) + C

and applying the IC y(π) = 0 we have

0=1+C ⇒ C = −1

so the unique solution is


y = −x(cos(x) + 1).

Remark 2.3 (Integration by Parts Formula). The next problem requires the use of integra-
tion by parts. You can do integration by parts any way you know how but I will show the
way I do it which is the way I will do it in class. First let me derive the integration by parts
formula from the product rule

[f (x)g(x)]0 = f 0 (x)g(x) + f (x)g 0 (x) ⇒ f 0 (x)g(x) = [f (x)g(x)]0 − f (x)g 0 (x)

Next
Z we integrate both sides and use the fundamental theorem of calculus (which gives
[f (x)g(x)]0 dx = f (x)g(x)) to obtain the integration by parts formula for indefinite inte-
grals Z Z
0
f (x)g(x) dx = f (x)g(x) − f (x)g 0 (x) dx (9)

For a definite integral the above formula becomes


Z b Z b
0 b
f (x)g(x) dx = f (x)g(x) − a
f (x)g 0 (x) dx.
a a

The way you use it is to write one of the given functions as a derivative and then apply
the above formula. Here are some examples:

22
Z
1. Evaluate x ln(x) dx

0
x2
Z Z 
x ln(x) dx = ln(x) dx
2
x2
Z 2
x 1
= ln(x) − dx
2 2 x
x2
Z
1
= ln(x) − xdx
2 2
x2 1
= ln(x) − x2 + C
2 4

Z
2. Evaluate xex dx

Z Z
x
xe dx = x (ex )0 dx
Z
= xe − ex dx
x

= xex − ex + C

Z
3. Evaluate x cos(x) dx

Z Z
x cos(x) dx = x (sin(x))0 dx
Z
= x sin(x) − sin(x) dx

= x sin(x) + cos(x) + C

Example 2.8. (x + 1)y 0 + y = ln(x) with y(1) = 1. The equation must be written as
1 ln(x) R
y0 + y= from which we find µ = e dx/(x+1) = eln(x+1) = (x + 1). So we have
(x + 1) (x + 1)

[(x + 1)y]0 = ln(x)

23
which implies (notice to integrate ln(x) we need integration by parts)
Z Z Z  
0 1
ln(x) dx = (x) ln(x) dx = x ln(x) − x dx = x ln(x) − x.
x

So we have Z
(x + 1)y = ln(x) dx + C = (x ln(x) − x) + C.

At this point we evaluate the constant C using y(1) = 1

(1 + 1) × 1 = (0 − 1) + C ⇒ C = 3.

and therefore
(x ln(x) − x + 3)
y= .
(x + 1)
In the next three examples we consider problems with a right hand side defined in pieces.

0, 1≤x<2

0 1
Example 2.9. y − y = with y(1) = 1. We need to solve two separate
x 2x, x ≥ 2

problems in a certain order. First we solve y 0 + (1/x)y = 0 with y(1) = 1 on the interval
R
1 ≤ x < 2. For this problem the integrating factor is µ = e− dx/x
= x−1 so we have
[x−1 y]0 = 0 which, after integration, implies x−1 y = C. The initial condition gives 1 = C so
C = 1. This gives y = x for all 1 ≤ x < 2. Now the continuity of the solution then requires
that
y(2) = lim y(x) = lim x = 2.
x→2 x→2

1
So we now solve y 0 − y = 2x with y(2) = 2. Again we have the same integrating factor
x
µ = x−1 so we get [x−1 y]0 = 2 so that (on integrating) x−1 y = 2x + C so that 1 = 4 + C and
C = −3. Finally we have x−1 y = 2x − 3 so the explicit solution is y = 2x2 − 3x.

2, 0 ≤ x < 3

0
Example 2.10. y + 2y = with y(0) = 0. We need to solve two separate
0, x ≥ 3

problems in a certain order. First we solve y 0 + 2y = 2 with y(0) = 0 on the interval


0 ≤ x < 3. For this problem the integrating factor is µ = e2x so we have [e2x y]0 = 2e2x
which, after integration, implies e2x y = e2x + C. The initial condition gives 0 = 1 + C so

24
C = −1. This gives y = 1 − e−2x for all 0 ≤ x < 3. Now the continuity of the solution then
requires that
y(3) = lim y(x) = 1 − e−6 .

x→3

This now becomes the initial condition for the second problem:

y 0 + 2y = 0 with y(3) = 1 − e−6



for x ≥ 3.

Solving this problem we get (notice we have the same integrating factor) [e2x y]0 = 0 so
e2x y = C and the initial condition implies C = e6 1 − e−6 = e6 − 1 . Finally then we get
 

y = e6 − 1 e−2x

for x ≥ 3.

Combining these solutions together into a single expression for y(x) we have

1 − e−2x ,

0≤x<3
y(x) =
(e6 − 1) e−2x , x ≥ 3


2x, 0 ≤ x < 1

Example 2.11. y 0 + 2xy = with y(0) = 2. We need to solve two separate
0, x≥1

problems in a certain order. First we solve y 0 + 2xy = 2x with y(0) = 2 on the interval
2 2 2
0 ≤ x < 1. For this problem the integrating factor is µ = ex so we have [ex y]0 = 2xex
2 2
which, after integration, implies ex y = ex + C. The initial condition gives 2 = 1 + C so
2
C = 1. This gives y = 1 + e−x for all 0 ≤ x < 1. Now the continuity of the solution then
requires that
y(1) = lim y(x) = 1 + e−1 .

x→1

Then we need to solve

y 0 + 2xy = 0 with y(1) = 1 + e−1 for x ≥ 1.

2
Solving this problem we get (notice we have the same integrating factor) [ex y]0 = 0 so

25
2
ex y = C and the initial condition implies C = e1 1 + e−1 = (e + 1). Finally then we get


2
y = (e + 1) e−x for x ≥ 1.

Once again combining these solutions together into a single expression for y(x) we have

1 + e−x2 ,

0≤x<1
y(x) =
(e + 1) e−x2 , x ≥ 1

2.4 Exact Equations

Any first order homogeneous ordinary differential equation can be written (in infinitely
many ways) in differential form,

M (x, y) dx + N (x, y) dy = 0.

We know from Calculus III that if F (x, y) is a function satisfying

dF = M dx + N dy = 0,

then this equation is called exact and an (implicit) general solution of the differential equation
is
F (x, y) = c,

where c is an arbitrary constant. Since the differential of a function, F (x, y), is

∂F ∂F
dF ≡ dx + dy,
∂x ∂y

M and N are the partial derivatives of F :

∂F ∂F
M (x, y) = , N (x, y) = .
∂x ∂y

26
A necessary and sufficient condition for exactness. Consider the ODE written in
differential form,
M dx + N dy = 0.

A necessary and sufficient condition for exactness is

∂M ∂N
= .
∂y ∂x

What this means is that if the equation is exact then we are guaranteed there exists a
function F (x, y) so that
∂F ∂F
M= and N = (10)
∂x ∂y
and therefore a general solution to the problem can be written as F (x, y) = 0.
More importantly (10) provides a method for finding F (x, y). Namely, integrating the
first equation of we see that
Z
F (x, y) = M (ξ, y) dξ + f (y),

for some f (y).


If we differentiate this equation with respect to y and use the the second equation in (10)

∂F
= N (x, y)
∂y

we arrive at an equation
Z
∂F
My (x, y) dx + f 0 (y) = = N (x, y).
∂y

It can be shown that, after simplifying, we will arrive at an equation only in y for which
we can find f (y) by integration.
Let us consider a simple example

Example 2.12.
xdx + ydy = 0.

27
Here M (x, y) = x and N (x, y) = y so

∂M ∂N
=0=
∂y ∂x

so the equation is exact and we know there exists a function F (x, y) so that Fx = M = x
and Fy = N = y.
Integrating Fx = M with respect to x we have

x2
Z
F (x, y) = x dx = + h(y).
2

Differentiating with respect to y and using Fy = N we have

y = N = Fy = h0 (y) ⇒ h0 (y) = y.

Now, integrating we obtain


y2
h(y) =
2
and we find
x2 y 2
F (x, y) = + .
2 2
The implicit general solution is
x2 y 2
+ =c
2 2
which, by renaming the constant c can be written as

x2 + y 2 = c.

Example 2.13.
(2x − 1)dx + (3y + 7)dy = 0.

Here M (x, y) = (2x − 1) and N (x, y) = (3y + 7) so

∂M ∂N
=0=
∂y ∂x

28
so the equation is exact and we know there exists a function F (x, y) so that Fx = M = 2x−1
and Fy = N = 3y + 7.
Integrating Fx = M = (2x − 1) with respect to x we have
Z
F (x, y) = (2x − 1) dx = x2 − x + h(y).

Differentiating with respect to y and using Fy = N we have

(3y + 7) = N = Fy = h0 (y) ⇒ h0 (y) = 3y + 7.

Now, integrating we obtain


3y 2
h(y) = + 7y
2
and we find
2 3y 2
F (x, y) = x − x + + 7y.
2
The implicit general solution is

3y 2
x2 − x + + 7y = c.
2

Example 2.14.
(2xy 2 − 3)dx + (2x2 y + 4)dy = 0.

Here M = (2xy 2 − 3) and N = (2x2 y + 4) so

∂M ∂N
= 4xy =
∂y ∂x

so the equation is exact and we know there exists a function F (x, y) so that Fx = M =
(2xy 2 − 3) and Fy = N = (2x2 y + 4).
Integrating Fx = M = (2xy 2 − 3) with respect to x we have
Z
F (x, y) = (2xy 2 − 3) dx = x2 y 2 − 3x + h(y).

29
Differentiating with respect to y and using Fy = N we have

(2x2 y + 4) = N = Fy = 2x2 y + h0 (y) ⇒ h0 (y) = 4.

Now, integrating we obtain


h(y) = 4y

and we find
F (x, y) = x2 y 2 − 3x + 4y.

The implicit general solution is


x2 y 2 − 3x + 4y = c.

Example 2.15.
(x2 − y 2 )dx + (y 2 + 2xy)dy = 0.

Here M = (x2 − y 2 ) and N = (y 2 + 2xy) so

∂M ∂N
= −2y 6= 2y =
∂y ∂x

so the equation is not exact.

Example 2.16.

(2x − y 3 + y 2 sin(x))dx − (3xy 2 + 2y cos(x))dy = 0.

Here M = (2x − y 3 + y 2 sin(x)) and N = −(3xy 2 + 2y cos(x)) so

∂M ∂N
= −3y 2 + 2y sin(x) =
∂y ∂x

so the equation is exact and we know there exists a function F (x, y) so that Fx = M =
(2x − y 3 + y 2 sin(x)) and Fy = N = −(3xy 2 + 2y cos(x)).

30
Integrating Fx = M = (2x − y 3 + y 2 sin(x)) with respect to x we have
Z
F (x, y) = (2x − y 3 + y 2 sin(x)) dx = x2 − xy 3 − y 2 cos(x) + h(y).

Differentiating with respect to y and using Fy = N we have

−(3xy 2 + 2y cos(x)) = N = Fy = −3xy 2 − 2y cos(x) + h0 (y) ⇒ h0 (y) = 0.

Now, integrating we obtain


h(y) = 0

and we find
F (x, y) = x2 − xy 3 − y 2 cos(x).

The implicit general solution is

x2 − xy 3 − y 2 cos(x) = c.

Example 2.17.
(y ln(y) − e−xy )dx + (y −1 + x ln(y))dy = 0.

Here M = (y ln(y) − e−xy ) and N = (y −1 + x ln(y)) so

∂M ∂N
= ln(y) + 1 + xe−xy 6= ln(y) =
∂y ∂x

so the equation is not exact.

Example 2.18.
(2xex − y + 6x2 )dx − xdy = 0.

Here M = (2xex − y + 6x2 ) and N = −x so

∂M ∂N
= −1 =
∂y ∂x

so the equation is exact and we know there exists a function F (x, y) so that Fx = M =

31
(2xex − y + 6x2 ) and Fy = N = −x.
Integrating Fy = N = −x with respect to y we have
Z
F (x, y) = (−x) dy = −xy + h(x).

Differentiating with respect to x and using Fx = (2xex − y + 6x2 ) we have

(2xex − y + 6x2 ) = M = Fx = −y + h0 (x) ⇒ h0 (x) = (2xex + 6x2 ).

Now, integrating we obtain Z


h(x) = (2xex + 6x2 ) dx

The first integral on the right requires integration by parts


Z Z Z
x x 0 x
xe dx = x (e ) dx = xe − ex dx = xex − ex

So we have
h(x) = 2xex − 2ex + 2x3

and we find
F (x, y) = −xy + 2xex − 2ex + 2x3 .

The implicit general solution is

−xy + 2xex − 2ex + 2x3 = c.

Example 2.19.

(tan(x) − sin(x) sin(y))dx + (cos(x) cos(y))dy = 0.

Here M = (tan(x) − sin(x) sin(y)) and N = (cos(x) cos(y)) so

∂M ∂N
= − sin(x) cos(y) =
∂y ∂x

32
so the equation is exact and we know there exists a function F (x, y) so that Fx = M =
(tan(x) − sin(x) sin(y)) and Fy = N = (cos(x) cos(y)).
Integrating Fy = N = (cos(x) cos(y)) with respect to y we have
Z
F (x, y) = (cos(x) cos(y)) dy = cos(x) sin(y) + h(x).

Differentiating with respect to x and using Fx = − sin(x) sin(y) we have

(tan(x) − sin(x) sin(y)) = M = Fx = − sin(x) cos(y) + h0 (x) ⇒ h0 (x) = tan(x).

Now, integrating we obtain Z


h(x) = tan(x) dx

The first integral on the right requires a special substitution. Writing tan(x) = sin(x)/ cos(x)
we set u = cos(x) which implies du = − sin(x) dx and the integral becomes
Z Z
du
tan(x) dx = − = − ln(|u|) = − ln(| cos(x)|)
u

So we have
h(x) = − ln(| cos(x)|)

and we find
F (x, y) = cos(x) sin(y) − ln(| cos(x)|).

The implicit general solution is

cos(x) sin(y) − ln(| cos(x)|) = c.

Integrating Factors

Consider a differential equation written in differential form

M
f dx + N
e dy = 0.

33
When this equation is not exact it can sometimes be made exact using an integrating factor.
fy 6= N
The idea is this, it may be that M ex but we can look for a function µ to multiply times

the equation so that the resulting equation

µM
f dx + µN
e dy = 0

is exact, i.e., Defining M = µM


f and N = µN
e we obtain an exact equation M dx + N dy = 0.

The problem of finding such an integrating factor can be very difficult and we will only
investigate two possible scenarios. We may look for an integrating factor that is a function
of x alone, i.e., µ = µ(x). To test the new equation for exactness we would seek µ(x) so that

f)y − (µ(x)N
(µ(x)M e )x = µ(x)M ex − µ0 (x)N
fy − µ(x)N e =0

This can be rewritten as !


fy − N
M ex
µ0 (x) − µ(x) = 0.
N
e

Assuming that !
fy − N
M ex
≡ f (x)
N
e

is a function of x alone then denoting it by f (x) we obtain a first order linear equation

µ0 (x) − f (x)µ(x) = 0,

with solution Z 
µ(x) = C exp f (x) dx .

We are not looking for the most general solution so to simplify things we take C = 1. Thus
we obtain the following
! Z 
fy − N
M ex
If f (x) = ⇒ µ(x) = exp f (x) dx (11)
N
e

In a similar way we could ask if there is an integrating factor as a function of y alone.

34
To test the new equation for exactness we would seek µ(y) so that

(µ(y)M e )x = µ0 (y)M
f)y − (µ(y)N fy − µ(y)N
f + µ(y)M ex = 0

This can be rewritten as !


fy − N
M ex
0
µ (y) + µ(y) = 0.
Mf

Assuming that !
fy − N
M ex
Mf

is a function of y alone and then denoting it by g(y) we obtain a first order linear equation

µ0 (y) + g(y)µ(y) = 0,

with solution  Z 
µ(y) = C exp − g(y) dy .

Thus we obtain the following


!  Z 
fy − N
M ex
If g(y) = ⇒ µ(y) = exp − g(y) dy (12)
Mf

Remark 2.4. Here we make an important point. It is well known that


Z
dx
= ln(|x|) + C. (13)
x

But there are times when it is best to simply write


Z
dx
= ln(x) + C. (14)
x

In particular, when you don’t know whether x is positive or negative, for example, when
you are not solving an initial value problem, it is often permissible to exclude the absolute
value sign. In the following it will happen very often that it is not possible to determine a
value for x, in which case we will always use (14).

35
Example 2.20. Consider y dx − x dy = 0. We have M e = −x and
f = y and N

fy − N
M ex = 1 + 1 = 2.

If we divide by N
e we obtain a function of x alone

fy − N
M ex 2
f (x) = = .
N
e −x

We obtain
R R
−2dx/x
µ(x) = e f (x) dx
=e = e−2 ln(x) = x−2 .

Multiplying the equation through by µ(x) we have

yx−2 dx − x−1 dy = 0

so M = yx−2 and N = −x−1 and this equation is exact since

My = x−2 = Nx .

If we divide by M
f we obtain a function of y alone

fy − N
M ex 2
g(y) = = .
Mf y

We obtain
R R
µ(y) = e− g(y) dy
=e −2dy/y
= e−2 ln(y) = y −2 .

Multiplying the equation through by µ we have

y −1 dx − xy −2 dy = 0

so M = y −1 and N = −xy −2 and this equation is exact since

My = −y −2 = Nx .

36
Example 2.21. Consider (2y 2 + 3x) dx + 2xy dy = 0. We have M
f = (2y 2 + 3x) and N
e = 2xy

and
fy − N
M ex = 4y − 2y = 2y.

If we divide by N
e we obtain a function of x alone

fy − N
M ex 4y − 2y 2y 1
f (x) = = = = .
N
e 2xy 2xy x

We obtain
R R
f (x) dx dx/x
µ=e =e = eln(x) = x.

Multiplying the equation through by µ we have

(2xy 2 + 3x2 ) dx + 2x2 y dy = 0

so M = (2xy 2 + 3x2 ) and N = 2x2 y and this equation is exact since

My = 4xy = Nx .

Example 2.22. Consider (2x + yx−1 ) dx + (xy − 1) dy = 0. We have M


f = (2x + yx−1 ) and
e = (xy − 1) and
N
ex = x−1 − y.
fy − N
M

If we divide by N
e we obtain a function of x alone

fy − N
M ex x−1 − y 1 xy − 1 1
f (x) = = =− =− .
N
e xy − 1 x xy − 1 x

We obtain
R R
µ=e f (x) dx
= e− dx/x
= e− ln(x) = x−1 .

Multiplying the equation through by µ we have

(2 + yx−2 ) dx + (y − x−1 ) dy = 0

37
so M = (2 + yx−2 ) and N = (y − x−1 ) and this equation is exact since

My = x−2 = Nx .

Example 2.23. Consider (y 2 + 2xy) dx − x2 dy = 0. We have M


f = (y 2 + 2xy) and N
e = −x2

and
fy − N
M ex = (2y + 2x) − (−2x) = 2y + 4x.

If we divide by M
f we obtain a function of y alone

fy − N
M ex 2y + 4x 2 (y + 2x) 2
g(y) = = 2 = = .
Mf (y + 2xy) y (y + 2x) y

We obtain
R R
µ = e− g(y) dy
= e−2 dy/y
= e−2 ln(y) = y −2 .

Multiplying the equation through by µ we have

(1 + 2xy −1 ) dx − (x2 y −2 ) dy = 0

so M = (1 + 2xy −1 ) and N = −(x2 y −2 ) and this equation is exact since

My = −2xy −2 = Nx .

Example 2.24. Consider (xy) dx + (2x2 + 3y 2 − 20) dy = 0. We have M


f = (xy) and
e = (2x2 + 3y 2 − 20) and
N
fy − N
M ex = (x) − (4x) = −3x.

If we divide by M
f we obtain a function of y alone

fy − N
M ex −3x −3
g(y) = = = .
Mf (xy) y

We obtain
R R
µ = e− g(y) dy
= e3 dy/y
= e3 ln(y) = y 3 .

38
Multiplying the equation through by µ we have

(xy 4 ) dx + (2x2 y 3 + 3y 5 − 20y 3 ) dy = 0

so M = (xy 4 ) and N = (2x2 y 3 + 3y 5 − 20y 3 ) and this equation is exact since

My = 4xy 3 = Nx .

Example 2.25. Consider (x + y) sin(y) dx + (x sin(y) + cos(y)) dy = 0. We have M


f =

(x + y) sin(y) and N
e = (x sin(y) + cos(y)) and

fy − N
M ex = (sin(y) + (x + y) cos(y)) − sin(y) = (x + y) cos(y).

If we divide by M
f we obtain a function of y alone

fy − N
M ex (x + y) cos(y) cos(y)
g(y) = = = .
Mf (x + y) sin(y) sin(y)

We obtain

R R R 1
µ = e− g(y) dy
= e− cos(y)/ sin(y) dy
= e− du/u
= e− ln(u) = u−1 = .
sin(y)

Multiplying the equation through by µ we have

(x + y) dx + (x + cot(y)) dy = 0

so M = (x + y) and N = (x + cot(y)) and this equation is exact since

My = 1 = Nx .

Example 2.26. Solve the IVP (3ex y + 4) dx + ex dy = 0 with y(0) = 0. First let us find a
general solution.

39
f = (3ex y + 4) and N
We have M e = ex and

ex = 3ex − ex = 2ex .
fy − N
M

If we divide by N
e we obtain a function of x alone

fy − N
M ex 2ex
f (x) = = x = 2.
N
e e

We obtain
R R
f (x) dx 2dx
µ=e =e = e2x .

Multiplying the equation through by µ we have

(3e3x y + 4e2x ) dx + e3x dy = 0

so M = (3e3x y + 4e2x ) and N = e3x and this equation is exact since

My = 3e3x = Nx .

So now we need to find the general solution of the exact equation (3e3x y + 4e2x ) dx +
e3x dy = 0 Fx = (3e3x y + 4e2x ) and Fy = e3x Integrating Fy with respect to y gives
Z Z
F = Fy dy = e3x dy = ye3x + h(x).

Differentiating this with respect to x and using Fx = (3e3x y + 4e2x ) we have

(3e3x y + 4e2x ) = Fx = 3ye3x + h0 (x)

so Z
0 2x
h (x) = 4e , ⇒ h(x) = 4e2x dx = 2e2x .

Therefore a general solution is


ye3x + 2e2x = C.

40
We now apply the initial condition y(0) = 0 to obtain C = 2 and we have ye3x + 2e2x = 2
which is an implicit solution. Finally then we can obtain an explicit solution by solving for
y
y = 2e−x − 2e−3x .

Example 2.27. Find an integrating factor in the form µ = xn y m for the equation

(2y 2 − 6xy) dx + (3xy − 4x2 ) dy = 0 (15)

f = (2y 2 − 6xy), N
So we have M e = (3xy − 4x2 ) and we seek an integrating factor µ = xn y m .

This means we need


(xn y m M
f)y = (xn y m N
e )x

or
∂[xn y m (2y 2 − 6xy)] ∂[xn y m (3xy − 4x2 )]
=
∂y ∂x
Simplifying this a bit by collecting the x and y terms we obtain

∂(2xn y m+2 − 6xn+1 y m+1 ) ∂(3xn+1 y m+1 − 4xn+2 y m )


=
∂y ∂x

or
2(m + 2)xn y m+1 − 6(m + 1)xn+1 y m = 3(n + 1)xn y m+1 − 4(n + 2)xn+1 y m .

Now on each side we have powers of the form xn y m+1 and xn+1 y m and the corresponding
coefficients of these terms on each side must be the same so that implies

2(m + 2) = 3(n + 1) and − 6(m + 1) = −4(n + 2)

or
3n − 2m = 1
2n − 3m = −1

To solve this system system of equations you could multiply the first equation by −2/3 and

41
add it to the second equation (so that the n’s cancel) to get

3n − 2m = 1
−5/3m = −5/3

From the second equation we get m = 1 and then the first equation becomes 3n − 2 = 1
which implies n = 1 so we obtain an integrating factor µ = xy.
Let us check to make sure it works. Multiplying the differential equation (15) by µ we
get
(2xy 3 − 6x2 y 2 ) dx + (3x2 y 2 − 4x3 y) dy = 0.

So M = (2xy 3 − 6x2 y 2 ) and N = (3x2 y 2 − 4x3 y) and we have

My = (6xy 2 − 12x2 y) and Nx = (6xy 2 − 12x2 y)

and, since My = Nx , the equation is exact.

2.5 Substitutions

2.5.1 Homogeneous Equations

Consider a first order equation


dy
= f (x, y).
dx
We say that this equation is Homogeneous if the right hand side can be written in the form

dy
= F (y/x). (16)
dx

If this is possible then we can reduce the equation to a separable equation using the change
of dependent variable
u = y/x.

42
Note that u = y/x implies y = xu which, in turn, implies

dy du
=u+x .
dx dx

Therefore the equation (16) can be written as

du
u+x = F (u)
dx

which is separable. Namely, we can write

du dx
=
F (u) − u x

and we obtain an implicit solution by integration


Z Z
du dx
= + C.
F (u) − u x

Example 2.28. Consider the problem

dy y2
x = + y, y(1) = 1.
dx x

Dividing by x we obtain
dy  y 2  y 
= + .
dx x x
Proceeding as above, we set u = y/x implies y = xu which, in turn, implies

dy du
=u+x .
dx dx

Thus the equation becomes


du
u+x = u2 + u.
dx
Now we simplify by subtracting the u on both sides and separate the variables to obtain

du dx
2
= .
u x

43
Integrating both sides we have
1
− = ln |x| + C.
u
So we get
−1
u=
ln |x| + C
or
y −1
=
x ln |x| + C
From the IC we have
−1 −1
1= = ⇒ C = −1.,
ln |1| + C C
which gives
y −1
=
x ln |x| − 1
and finally
x
y=
1 − ln |x|
Example 2.29. Consider the problem (x − y) dx + x dy = 0, y(1) = 1. The equation can
be written as
dy y−x y
= = − 1.
dx x x
Set u = y/x implies y = xu which implies

dy du
=u+x .
dx dx

Thus the equation becomes


du
u+x = u − 1.
dx
Now we simplify by subtracting the u on both sides and separate the variables to obtain

dx
du = − .
x

Integrating both sides we have


u = − ln |x| + C.

44
So we get
y
= − ln(|x|) + C
x
From the initial conditions we have C = 1 so

y = x(1 − ln(x)).

Example 2.30. Consider the problem

dy y−x
= .
dx y+x

Dividing the top and bottom by x we have

dy (y/x) − 1
= .
dx (y/x) + 1

Set u = y/x implies y = xu which implies

dy du
=u+x .
dx dx

Thus the equation becomes


du u−1
u+x = .
dx u+1
Now we subtract the u from both sides

du u−1 (u − 1) − u(u + 1) −(u2 + 1)


x = −u= = .
dx u+1 u+1 u+1

Separate variables to get


(u + 1)du dx
= − .
u2 + 1 x
Integrating both sides we have
Z Z
u du du
+ = − ln |x| + C.
u2 + 1 u2+1

For the first integral use the substitution w = u2 + 1 which implies dw = 2udu and the

45
integral becomes
Z Z
u du 1 dw 1 1
= = ln(|w|) = ln(u2 + 1) = ln((y/x)2 + 1)1/2
u2 + 1 2 w 2 2

and Z
du
= tan−1 (u) = tan−1 (y/x).
u2+1
Combining these results we have

ln((y/x)2 + 1)1/2 + tan−1 (y/x) = − ln |x| + C.

Example 2.31. Consider the similar problem

dy y+x
= .
dx y−x

Dividing the top and bottom by x we have

dy (y/x) + 1
= .
dx (y/x) − 1

Set u = y/x implies y = xu which implies

dy du
=u+x .
dx dx

Thus the equation becomes


du u+1
u+x = .
dx u−1
Now we subtract the u from both sides

du u+1 (u + 1) − u(u − 1) −(u2 − 2u − 1)


x = −u= = .
dx u−1 u−1 u−1

Separate variables to get


(u − 1)du dx
2
=− .
u − 2u − 1 x

46
Integrating both sides we have

(u − 1) du
Z
= − ln |x| + C.
u2 − 2u − 1

For the integral on the left use the substitution w = u2 −2u−1 which implies dw = 2(u−1)du
and the integral becomes

(u − 1) du
Z Z
1 dw 1 1
2
= = ln(|w|) = ln(u2 − 2u − 1) = ln((y/x)2 − 2(y/x) − 1)1/2
u − 2u − 1 2 w 2 2

Combining these results we have

ln((y/x)2 − 2(y/x) − 1)1/2 = − ln |x| + C.

Example 2.32. Consider the IVP

dy x + yey/x
= , y(1) = 0.
dx xey/x

Dividing the top and bottom by x we have

dy 1 + (y/x)ey/x
= .
dx ey/x

Set u = y/x implies y = xu which implies

dy du
=u+x .
dx dx

Thus the equation becomes

du 1 + ueu
u+x = u
= e−u + u.
dx e

Now we subtract the u from both sides

du
x = e−u .
dx

47
Separate variables to get
dx
eu du = .
x
Integrating both sides we have
eu = ln(|x|) + C.

Applying the IC we get


1=0+C ⇒ C = 1.

Combining these results we have

ey/x = ln(|x|) + 1.

Take logarithm of both sides to get

y
= ln(ln(|x|) + 1)
x

and finally
y = x ln(ln(|x|) + 1).

Example 2.33. Consider the IVP

dy y 2 − x2
= , y(1) = 1.
dx 2xy

Dividing the bottom into the top


  
dy 1 y x
= − .
dx 2 x y

Set u = y/x implies y = xu which implies

dy du
=u+x .
dx dx

Thus the equation becomes  


du 1 1
u+x = u− .
dx 2 u

48
Now we subtract the u from both sides

1 u2 + 1
   
du 1 1
x =− u+ =− .
dx 2 u 2 u

Separate variables to get


2u du dx
2
=− .
u +1 x
Integrating both sides we have
Z
2u du
= − ln(|x|) + C.
u2 + 1

If we set w = u2 + 1 then dw = 2udu and the integral on the left becomes


Z Z
2u du dw
= = ln(|w|)
u2 + 1 w

so we have
ln(u2 + 1) = − ln(|x|) + C

or
ln((y/x)2 + 1) = − ln(|x|) + C

Applying the IC we get

ln(2) = 0 + C ⇒ C = ln(2).

Combining these results we have (notice x = 1 > 0 which implies ln(|x|) = ln(x))

ln((y/x)2 + 1) = − ln(|x|) + ln(2) = ln(2/x).

Exponentiate both sides to get


(y/x)2 + 1 = 2/x

and the multiply by x2 ,


y 2 + x2 = 2x

49
move x2 to the right and take the square root


y= 2x − x2 .

Notice we take the positive square root since (from the IC) y > 0.

2.5.2 Bernoulli equations

A Bernoulli equation is any equation that can be written in the form

y 0 + p(x)y = f (x)y n , n 6= 0, 1. (17)

Note that if n = 0, 1 then the equation is first order linear.


The Bernoulli equation can be reduced to a first order linear equation using the following
substitution:
u = y 1−n .

This relation implies


du dy
= (1 − n)y −n .
dx dx
Multiplying the Bernoulli equation by (1 − n)y −n we see that it can be written as

dy
(1 − n)y −n + (1 − n)p(x)y 1−n = (1 − n)f (x)y n y −n
dx

which simplifies to
u0 + (1 − n)p(x)u = (1 − n)f (x), (18)

which is first order linear and can be solved using the methods discussed in the Section on
first order linear problems.

Example 2.34. Consider the problem

y0 + y = y4.

This is a Bernoulli equation with n = 4 so (1 − n) = −3 and we set u = y −3 . Then we obtain

50
the linear equation
u0 − 3u = −3.

To solve this problem we find the integrating factor

R
µ = e−3 dx
= e−3x .

Multiplying by µ we obtain
0
e−3x u = −3e−3x .

Next we integrate to obtain


Z Z
−3x
0
e u dx = −3e−3x dx

which gives
e−3x u = e−3x + C

or
u(x) = 1 + Ce3x .

Finally, converting back to y we have

y(x)−3 = 1 + Ce3x .

Example 2.35. Consider the problem

xy 0 + y = y −2 with y(1) = 2.

First we note the equation is not in the correct form and we must divide by x to get

1
y 0 + y = x−1 y −2 .
x

This is a Bernoulli equation with n = −2 so (1 − n) = 3 and we set u = y 3 . Then we obtain

51
the linear equation
3 3
u0 + u = .
x x
To solve this problem we find the integrating factor

R
µ = e3 dx/x
= e3 ln(x) = x3 .

Multiplying by µ we obtain
0
x3 u = 3x2 .

Next we integrate to obtain


Z Z
3
3x2 dx = x3 + C

x u dx =

which gives
x3 u = x 3 + C

or
x3 y 3 = x3 + C

Applying the IC we have


8=1+C ⇒ C=7

x3 y 3 = x3 + 7

Dividing by x3 and taking the cube root of both sides gives

y(x) = (1 + 7/x3 )1/3 .

Example 2.36. Consider the problem

1
xy 0 + y = y 2 with y(1) = .
2

52
First we note the equation is not in the correct form and we must divide by x to get

1
y 0 + y = x−1 y 2 .
x

This is a Bernoulli equation with n = 2 so (1 − n) = −1 and we set u = y −1 . Then we obtain


the linear equation
1 1
u0 − u = − .
x x
To solve this problem we find the integrating factor

R
µ = e− dx/x
= e− ln(x) = x−1 .

Multiplying by µ we obtain
0
x−1 u = −x−2 .

Next we integrate to obtain


Z Z
−1
x−2 dx = x−1 + C

x u dx = −

which gives
x−1 u = x−1 + C

or
x−1 y −1 = x−1 + C

Applying the IC we have


2=1+C ⇒ C=1

x−1 y −1 = x−1 + 1

Multiply by x and raising both sides to the (−1) power we have

1
y(x) = .
x+1

53
Example 2.37. Consider the problem

3
y 0 − y = 9x4 y 1/3 with y(1) = 8.
x

This is a Bernoulli equation with n = 1/3 so (1 − n) = 2/3 and we set u = y 2/3 . Then we
obtain the linear equation
2
u0 − u = 6x4 .
x
To solve this problem we find the integrating factor

R
µ = e−2 dx/x
= e−2 ln(x) = x−2 .

Multiplying by µ we obtain
0
x−2 u = 6x2 .

Next we integrate to obtain


Z Z
−2
x2 dx = 2x3 + C

x u dx = 6

which gives
x−2 u = 2x3 + C

or
x−2 y 2/3 = 2x3 + C

Applying the IC we have


4=2+C ⇒ C=2

x−2 y 2/3 = 2x3 + 2

Multiply by x2 and raising both sides to the (3/2) power we have

y(x) = (2x5 + 2x2 )3/2 .

54
Example 2.38. Consider the problem

4
y 0 + y = 16x−4 y −3/4 with y(1) = 1.
x

This is a Bernoulli equation with n = −3/4 so (1 − n) = 7/4 and we set u = y 7/4 . Then we
obtain the linear equation
7
u0 + u = 28x−4 .
x
To solve this problem we find the integrating factor

R
µ = e7 dx/x
= e7 ln(x) = x7 .

Multiplying by µ we obtain
0
x7 u = 28x3 .

Next we integrate to obtain


Z Z
7
x3 dx = 7x3 + C

x u dx = 28

which gives
x7 u = 7x3 + C

or
x7 y 7/4 = 7x3 + C

Applying the IC we have


1=7+C ⇒ C = −6

x7 y 7/4 = 7x3 − 6

Divide by x7 and raising both sides to the (4/7) power we have

4/7
7x3 − 6

y(x) = .
x7

55
Example 2.39. Consider the problem

y 0 + 2xy = 2xy 2 with y(0) = −1.

This is a Bernoulli equation with n = 2 so (1 − n) = −1 and we set u = y −1 . Then we obtain


the linear equation
u0 − 2xu = −2x.

To solve this problem we find the integrating factor

2
R
µ = e−2 xdx
= e−x .

Multiplying by µ we obtain
 2 0 2
e−x u = −2xe−x .

Next we integrate to obtain


Z   Z
−x2 2
e u dx = −2xe−x dx = +C

We integrate the right hand side using a simple substitution w = −x2 which implies dw =
−2x dx Z Z
−x2 2
−2xe dx = ew dw = ew = e−x .

which gives
2 2
e−x u = e−x + C

or
2 2
e−x y −1 = e−x + C

Applying the IC we have

−1 = 1 + C ⇒ C = −2

2 2
e−x y −1 = e−x − 2

56
2
Multiply by ex and raising both sides to the (−1) power we have

2 −1
 
y(x) = 1 − 2ex .

2.5.3 RHS in the form f (ax + by + c)

If for the equation y 0 = f (x, y) right hand side can be written as function of a linear relation
in x and y, i.e., it has the form f (ax + by + c) then a simple substitution transforms the
problem into a separable problem. Namely, if we set v = ax + by + c then v 0 = a + bf (v)
which is separable.

Example 2.40. Consider the problem

y 0 = e−(x+y) − 1, with y(0) = 0.

We set v = x + y which implies v 0 = 1 + y 0 = 1 + (e−v − 1) = e−v . The equation v 0 = e−v is


separable and separating the variables we have

dv
ev =1 ⇒ ev dv = dx ⇒ ev = x + C ⇒ ex+y = x + C.
dx

Thus we have an implicit general solution ex+y = x + C.


Next we apply the IC to get

1=0+C ⇒ C=1

so we have
ex+y = x + 1.

Finally we take the natural log of both sides and subtract x from both sides to get

y(x) = ln(x + 1) − x.

57
Example 2.41. Consider the problem

y 0 = (x + y + 1)2 , with y(1) = −2.

We set v = x + y + 1 which implies v 0 = 1 + y 0 = 1 + v 2 which is separable and separating


the variables we have
Z Z
dv
2
= dx = x + C ⇒ tan−1 (v) = x + C.
v +1

Thus we have an implicit general solution tan−1 (x + y + 1) = x + C.


Next we apply the IC to get

tan−1 (0) = 1 + C ⇒ C = −1

so we have
tan−1 (x + y + 1) = x − 1.

Finally we take tan of both sides and subtract x + 1 from both sides to get

y(x) = tan(x − 1) − (x + 1).

Example 2.42. Consider the problem

y 0 = tan2 (x + y), with y(1) = −1.

We set v = x + y which implies v 0 = 1 + y 0 = 1 + tan2 (v) which is separable and separating


the variables we have Z Z
dv
2
= dx = x + C.
tan (v) + 1
So the main problem is that we need to evaluate the integral
Z
dv
2
tan (v) + 1

58
Here recall a main trig identity sin2 (θ) + cos2 (θ) = 1 which, dividing by cos2 (θ), gives
tan2 (θ) + 1 = sec2 (θ). So we have
Z Z Z
dv dv
2
= = cos2 (v) dv
tan (v) + 1 sec2 (v)

At this point we need another trig identity (the half angle formula)

1 + cos(2v)
cos2 (v) =
2

and our integral becomes


Z Z  
dv 1 1 1
2
= (1 + cos(2v)) dv = v + sin(2v)
tan (v) + 1 2 2 2

Thus we have an implicit general solution


 
1 1
v + sin(2v) =x+C
2 2

or  
1 1
x + y + sin(2(x + y)) = x + C
2 2
Next we apply the IC to get
 
1 1
0 + sin(0) = 1 + C ⇒ C = −1
2 2

so we have  
1 1
x + y + sin(2(x + y)) = x − 1
2 2
Solving for y would not be easy so we stop with a little algebraic simplifying
 
1
x + y + sin(2(x + y)) = 2x − 2
2

or
sin(2(x + y)) = 2(x − y − 2).

59
Example 2.43. Consider the problem

y 0 = cos(x + y), with y(0) = π/2.

We set v = x + y which implies v 0 = 1 + y 0 = 1 + cos(v) which is separable and separating


the variables we have Z Z
dv
= dx = x + C.
1 + cos(v)
So the main problem is that we need to evaluate the integral
Z
dv
1 + cos(v)

Here re recall a main trig identity sin2 (θ) + cos2 (θ) = 1 which implies sin2 (θ) = 1 − cos2 (θ).
So we multiply the numerator and denominator by 1 − cos(v) and we have

(1 − cos(v)) (1 − cos(v)) dv
Z Z Z
dv dv
= =
1 + cos(v) (1 − cos(v)) 1 + cos(v) sin2 (v)
Z
= (csc2 (v) − csc(v) cot(v)) dv = − cot(v) + csc(v)

Thus we have an implicit general solution

csc(x + y) − cot(x + y) = x + C

Next we apply the IC to get

csc(π/2) − cot(π/2) = 0 + C

We have csc(π/2) = 1 and cot(π/2) = 0 so C = 1 and we have the implicit solution

csc(x + y) − cot(x + y) = x + 1.

60
Example 2.44. Consider the problem

y 0 = tan(x + y) − 1.

We set v = x + y which implies v 0 = 1 + y 0 = 1 + tan(v) − 1 = tan(v) which is separable and


separating the variables we have
Z Z
cot(v) dv = dx = x + C.

So the main problem is that we need to evaluate the integral


Z
cos(v) dv
sin(v)

We use the simple substitution w = sin(v) which implies dw = cos(v)dv


Z Z
cos(v) dv dw
= = ln(w).
sin(v) w

Thus we have an implicit general solution

ln(sin(x + y)) = x + C

Example 2.45. Consider the problem

y−x+1
y0 = .
y−x+2

There are several choices here for v but we set v = y − x + 2 which implies v 0 = y 0 − 1 =
v−1 1
− 1 = − which is separable and separating the variables we have
v v
Z Z
v dv = − dx = −x + C.

61
So the main problem is that we need to evaluate the integral
Z
1 1
v dv = v 2 = (x − y + 2)2
2 2

Thus we have an implicit general solution

1
(x − y + 2)2 = −x + C
2

If we had chose a different value for v, e.g., v = y − x then we would have gotten
−1
v0 = y0 − 1 = v+1
v+2
−1= v+2
which is separable and separating the variables we have
Z Z
(v + 2) dv = − dx = −x + C.

So the main problem is that we need to evaluate the integral


Z
1 1
(v + 2) dv = v 2 + 2v = (y − x)2 + 2(y − x)
2 2

Thus we have an implicit general solution

1
(y − x)2 + 2(y − x) = −x + C.
2

The two different answers given above only differ by a constant.


R
On the other hand, if we integrate (v + 2) dv without breaking it up we get

(v + 2)2 (y − x + 2)2
Z
(v + 2) dv = =
2 2

exactly as before.

62

You might also like