Chapters 1-2 Lecture Notes
Chapters 1-2 Lecture Notes
Chapters 1-2 Lecture Notes
1 Chapter 1
Notes Proofread by Yunting Gao and corrections made on 03/02/2021
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).
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.
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.
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.
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)
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.
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.
F. y = sin(x) and y = cos(x) The best answer for equation 1 is E since both functions
satisfy the equation.
1. E y 00 + y = 0
2. C y 0 + 3y = 0
3. A y 0 − 3y = 0
4. D y 00 − 9y = 0
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
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.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)
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
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
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
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
4 = −4C1 sin(4 π/2) + 4C2 cos(4 π/2) = −4C1 sin(2π) + 4C2 cos(2π) = 4C2
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
10
2 Chapter 2
Reading assignment: Your need to study Chapter 2, Sections 2.1 through 2.5.
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).
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).
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).
13
AS US
+ + + - - - - - - + + + +
0 3
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
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
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
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.
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
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.
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
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
dµ
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)
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
R
Z R
− p(x) dx p(x) dx
yp (x) = e e f (x) dx .
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)
and therefore
yp (x)0 + p(x)yp (x) = f (x).
1
y 0 + y = 4x2 .
x
20
First we find the integrating factor.
Z
1
µ(x) = exp dx = eln x = x
x
dy
(xy) = 4x3
dx
and integrate
xy = x4 + C
C
y = x3 + .
x
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
0=1+C ⇒ C = −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
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)
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)
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.
(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
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:
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
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
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.
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,
∂F ∂F
dF ≡ dx + dy,
∂x ∂y
∂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.
∂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),
∂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
y = N = Fy = h0 (y) ⇒ h0 (y) = y.
x2 + y 2 = c.
Example 2.13.
(2x − 1)dx + (3y + 7)dy = 0.
∂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).
3y 2
x2 − x + + 7y = c.
2
Example 2.14.
(2xy 2 − 3)dx + (2x2 y + 4)dy = 0.
∂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
and we find
F (x, y) = x2 y 2 − 3x + 4y.
Example 2.15.
(x2 − y 2 )dx + (y 2 + 2xy)dy = 0.
∂M ∂N
= −2y 6= 2y =
∂y ∂x
Example 2.16.
∂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).
and we find
F (x, y) = x2 − xy 3 − y 2 cos(x).
x2 − xy 3 − y 2 cos(x) = c.
Example 2.17.
(y ln(y) − e−xy )dx + (y −1 + x ln(y))dy = 0.
∂M ∂N
= ln(y) + 1 + xe−xy 6= ln(y) =
∂y ∂x
Example 2.18.
(2xex − y + 6x2 )dx − xdy = 0.
∂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).
So we have
h(x) = 2xex − 2ex + 2x3
and we find
F (x, y) = −xy + 2xex − 2ex + 2x3 .
Example 2.19.
∂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).
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)|).
Integrating Factors
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
µM
f dx + µN
e 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
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
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
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 .
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 .
yx−2 dx − x−1 dy = 0
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 .
y −1 dx − xy −2 dy = 0
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.
My = 4xy = Nx .
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 .
(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 .
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 .
(1 + 2xy −1 ) dx − (x2 y −2 ) dy = 0
My = −2xy −2 = Nx .
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
My = 4xy 3 = Nx .
(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)
(x + y) dx + (x + cot(y)) dy = 0
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 .
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).
so Z
0 2x
h (x) = 4e , ⇒ h(x) = 4e2x dx = 2e2x .
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
f = (2y 2 − 6xy), N
So we have M e = (3xy − 4x2 ) and we seek an integrating factor µ = xn y m .
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
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
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.
2.5 Substitutions
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
du
u+x = F (u)
dx
du dx
=
F (u) − u x
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
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
dx
du = − .
x
44
So we get
y
= − ln(|x|) + C
x
From the initial conditions we have C = 1 so
y = x(1 − ln(x)).
dy y−x
= .
dx y+x
dy (y/x) − 1
= .
dx (y/x) + 1
dy du
=u+x .
dx dx
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
dy y+x
= .
dx y−x
dy (y/x) + 1
= .
dx (y/x) − 1
dy du
=u+x .
dx dx
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
dy x + yey/x
= , y(1) = 0.
dx xey/x
dy 1 + (y/x)ey/x
= .
dx ey/x
dy du
=u+x .
dx dx
du 1 + ueu
u+x = u
= e−u + u.
dx e
du
x = e−u .
dx
47
Separate variables to get
dx
eu du = .
x
Integrating both sides we have
eu = ln(|x|) + C.
ey/x = ln(|x|) + 1.
y
= ln(ln(|x|) + 1)
x
and finally
y = x ln(ln(|x|) + 1).
dy y 2 − x2
= , y(1) = 1.
dx 2xy
dy du
=u+x .
dx dx
48
Now we subtract the u from both sides
1 u2 + 1
du 1 1
x =− u+ =− .
dx 2 u 2 u
so we have
ln(u2 + 1) = − ln(|x|) + C
or
ln((y/x)2 + 1) = − ln(|x|) + C
ln(2) = 0 + C ⇒ C = ln(2).
Combining these results we have (notice x = 1 > 0 which implies ln(|x|) = ln(x))
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.
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.
y0 + y = y4.
50
the linear equation
u0 − 3u = −3.
R
µ = e−3 dx
= e−3x .
Multiplying by µ we obtain
0
e−3x u = −3e−3x .
which gives
e−3x u = e−3x + C
or
u(x) = 1 + Ce3x .
y(x)−3 = 1 + Ce3x .
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
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 .
which gives
x3 u = x 3 + C
or
x3 y 3 = x3 + C
x3 y 3 = x3 + 7
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
R
µ = e− dx/x
= e− ln(x) = x−1 .
Multiplying by µ we obtain
0
x−1 u = −x−2 .
which gives
x−1 u = x−1 + C
or
x−1 y −1 = x−1 + C
x−1 y −1 = x−1 + 1
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 .
which gives
x−2 u = 2x3 + C
or
x−2 y 2/3 = 2x3 + C
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 .
which gives
x7 u = 7x3 + C
or
x7 y 7/4 = 7x3 + C
x7 y 7/4 = 7x3 − 6
4/7
7x3 − 6
y(x) = .
x7
55
Example 2.39. Consider the problem
2
R
µ = e−2 xdx
= e−x .
Multiplying by µ we obtain
2 0 2
e−x u = −2xe−x .
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
−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 .
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.
dv
ev =1 ⇒ ev dv = dx ⇒ ev = x + C ⇒ ex+y = x + C.
dx
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
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
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
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
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)
csc(x + y) − cot(x + y) = x + C
csc(π/2) − cot(π/2) = 0 + C
csc(x + y) − cot(x + y) = x + 1.
60
Example 2.44. Consider the problem
y 0 = tan(x + y) − 1.
ln(sin(x + y)) = x + C
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
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.
1
(y − x)2 + 2(y − x) = −x + C.
2
(v + 2)2 (y − x + 2)2
Z
(v + 2) dv = =
2 2
exactly as before.
62