Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1
solutions to first order odes - exact differential equations 1
This is the first part of lecture four
- A series of lecture notes primarily
Lecturer: Dr. Peter Amoako-Yirenkyi taken from the text book (Elementary
differential Equation and boundary
Recommended Textbook:Elementary differential Equation2 value problems by Boyce and Diprima.
After going through this lecture notes,
The laws of the universe are written largely in the language of math-
you should be able to:
ematics. Algebra is sufficient to solve many static problems, but the
• You should be able to understand
most interesting naturally phenomena involve change and are best de-
the principle behind Exactness of
scribed by equations that relate changing quantities. Many important differential Equations
and significant problems in engineering, the physical sciences, and the
• Find the solution to exact differen-
social sciences such as economics and business when formulated in tial equations
mathematical terms require the determination of a function satisfying
• Solve non-exact differential equa-
an equation containing the derivatives of unknown function. Such tions using method of integrating
equations are called differential equation. factors
2
W.W. Boyce & R.C. DiPrima. Elemen-
tary Differential Equations and Boundary
Exact Differential Equation Value Problems. John Wiley & Sons,
Inc., tenth edition, March 2012. ISBN
Through out the previous weeks we have been discussing first order 978-0-470-45832-7
differential equations and a number of methods that are applicable to various classes of problems. The
most important of these had been separable differential equations and linear coefficients of the differential
form of some differential equations(both homogeneous and non-homogeneous). Although these methods
can solve a number of differential equations, first order equations that can be solved by these methods are
rather special since most first order differential equations cannot be solved in this way. The next class of
equations we need to consider are known as exact differential equations which employs the idea of total
differential.
Given a function f ( x, y), its total differential, d f , is defined as:
∂f ∂f
df = dx + dy (1)
∂x ∂y
This shows that the family of curves (or general solution) f ( x, y) = c
satisfies the differential equation
df =0 (2)
∂f ∂f
=⇒ dx + dy =0 (3)
∂x ∂y
So if there exists a function f ( x, y) such that:
∂f
M( x, y) = and (4)
∂x
∂f
N ( x, y) = (5)
∂y
then M( x, y)dx + N ( x, y)dy is called an exact differential3 , and the 3
In order to establish that a differential
equation: equation is exact, recall that in partial
derivatives if f ( x, y) has continuous
M( x, y)dx + N ( x, y)dy = 0 (6) second order partial derivatives, then:
Solution
With ( M ( x, y) = 1 − 2xy) and N ( x, y) = 4y3 − x2 , we notice that:
∂y = −2x = ∂x So the given functions M ( x, y ) and N ( x, y ) passed
∂M ∂N
the test for exactness 4 . All that is left to do is to find the function 4
∂f ∂f
f ( x, y) such that: ∂x = M and ∂y = N. The way to accomplish this Example 2. Solve the differential equation
is to integrate M with respect to x, integrate N with respect to y, and
dy
then merge the results: (3x2 + 2xy) + ( x + y2 ) =0
dx
Solution
Z Z Here Mx = 2x, Nx = 1, the given
M( x, y)dx = (1 − 2xy)dx = x − x2 y + h(y) (10) equation is not exact. To see that it
Z Z cannot be solved by the procedure
above, let us suppose that there is a
M( x, y)dx = (4y3 − x2 )dy = y4 − x2 y + g( x ) (11)
function f ( x, y) such that:
f x = 3x2 + 2xy, f y = x + y2 (7)
These calculations imply that a function f ( x, y) which satisfies both:
Integrating the first of (7) gives:
∂f ∂f
= M = 1 − 2xy and = N = 4y3 − x2 is f ( x, y) = x2 y + y4 f ( x, y) = x3 + x2 y + ψ(y) (8)
∂x ∂y
where ψ(y) is an arbitrary function of y
Therefore, the exact equation we were given is satisfied by the family only. To try to satisfy the second of (7)
we compute f y from (8), obtaining:
of curves: x − x2 y + y4 = c
dψ
fy = x2 + = x + y2 or
Example 3. Solve the differential equation (y cos x + 2xey ) + (sin x + dy
dy
x2 ey + 2) dx = 0 dψ
= x + y2 − x 2 (9)
dy
Solution Since the right-hand side of (9) depends
M (( x, y) = y cos x + 2xey ), N ( x, y) = sin x + x2 ey + 2 on x as well as y, it is impossible to
∂M y ∂N y solve (9) for ψ(y). Thus there is no
∂y = cos x + 2xe , ∂x = cos x + 2xe Therefore, the differential f ( x, y) satisfying both of (7). So in the
∂f ∂f next section we will try to find a factor
equation is exact. We know that ∂x = M( x, y); ∂y = N ( x, y). Thus
to make the equation exact and have a
there is an f ( x, y) such that function satisfying both (7) - the factor
is called integrating factor.
∂f ∂f
= y cos x + 2xey and = sin x + x2 ey + 2 (12)
∂x ∂x
dy = (y cos x + 2xey )dx,
5 Integrating the first of these equations:
R R
5
Note that either of equations (10)
keeping y constant gives: having h(y) as a function of y alone or
(11) with g( x ) as a function of x alone
may be chosen conveniently
f ( x, y) = y sin x + x2 ey + ψ(y) (13)
and expect it to be exact. Then for (15) to be exact then: Theorem 1. 1. Assume µ = µ( x ) =⇒
∂µ
∂y = µy = 0, then: µ x =
∂(µM ) ∂(µN ) dµ M −N
= yN x , which is a function of
= dx
∂y ∂x x alone, call
R
this function ξ ( x ). Then
µ( x ) = e ξ ( x)dx is an integrating factor
Applying product rule we get: of (14)
∂µ
2. Assume µ = µ(y) =⇒ =
∂M ∂µ ∂N ∂µ ∂x
My − Nx
µ +M =µ +N 0, then: µy =
dµ
dy= −M , which is
∂y ∂y ∂x ∂x
a function of y alone, call
R
this function
ψ(y). Then µ(y) = e ψ(y)dy is an
∂µ ∂µ integrating factor of (14)
=⇒ M −N = µ (∂N∂x − ∂M∂y) (16)
∂y ∂x 3. If ∂x + ∂y 6 = 0, then: µ ( x, y ) =
∂M ∂N
1
Simply put Mµy − Nµ x = µ( Nx − My ), µ( My − Nx ) ∂M + ∂N , is the integrating factor of (14)
∂x ∂y
Sometimes an integrating factor may be found by inspection, after 4. If M ( x, y)dx + N ( x, y)dy = 0 can
be written in the form yg( x, y)dx +
grouping the terms in the equation, and recognizing a certain group xh( x, y)dy = 0 where h( x, y) 6=
as being a part of an exact differential. 7 The following tabulates g( x, y), then µ( x, y) = xM−1
yN
possible terms and their respective Integrating factors and the exact
7
The following observations are often
equations they produce: helpful in finding integrating factors:
1. If a first-order differential equation
contains the combination xdy +
Group of Terms Integrating factor Exact differential d f ( x, y) ydy = 21 d( x2 + y2 ) try some function
xdy−ydx x2 + y2 as a multiplier.
− x12 = d yx
ydx − xdy x2 2. If a first-order differential equation
ydx − xdy
ydx − xdy 1
y2 y2
= d yx contains the combination xdy +
xdy−ydx ydx = d( xy), try some function xy as
1
= d ln yx
ydx − xdy − xy xy a multiplier.
xdy−ydx
− x2 +1 y2 = d arctan yx
ydx − xdy x 2 + y2
3. If a first-order differential equation
1 ydx + xdy contains the combination xdy − ydx,
ydx + xdy xy xy = d (ln( xy)) try x12 or y12 as a multiplier. If
h i
1 ydx + xdy −1 1
ydx + xdy ( xy)n
, n>1 ( xy)n
= d neither of these works, try xy or
h (n−1)( xy)n−1 i 1
or some function of these
1 ydy+ xdx
ydx + xdy x 2 + y2 x 2 + y2
= d 21 ln( x2 + y2 ) x 2 + y2
h i expressions, as an integrating factor,
1 ydy+ xdx −1 remember that d tan−1 x =
y
ydx + xdy ( x 2 + y2 ) n
, n> 1 ( x 2 + y2 ) n
= d 2(n−1)( x2 +y2 )n−1 xdy−ydx y xdy−ydx
− − and tan−1 x = x2 +y2
aydx + bxdy a
x y 1 1 b x a−1 yb−1 ( aydx + bxdy) = d( x a yb ) xy
=⇒ f y = x3 + x2 yψ0 (y) = x3 + x2 y
ψ0 (y) = 0 =⇒ ψ(y) = c.
Finally x3 y + 12 x2 y2 = c
A( x )y0 + B( x )y = C ( x ) (19)
y0 + p( x )y = q( x ) (20)
B( x ) C(x)
p( x ) = and q( x ) =
A( x ) A( x )
math168 - solutions to odes - exact differential equations and integration factors 5
M( x, y) = µ( x )[ p( x )y − q( x )] and N ( x, y) = µ( x )
∂M ∂N
If (21) is exact, then ∂y = ∂x . Then,
∂ ∂ dµ( x )
[µpy − µq] = µ( x ) =
∂y ∂x dx
dµ
=⇒ µp = (22)
dx
Separating variables:
dµ
Z Z Z
= pdx =⇒ ln µ = pdx
µ
R
pdx
µ=e (23)
Without loss of operation, the constant of integration
R
of (23) is unity.
Consider (20) and multiply through by: µ( x ) = e pdx , then we have
the exact equation 9 : 9
The differential equation which has
q( x ) = 0 is called Homogeneous
µy0 + µpy = µq differential equation. The other term on
the R.H.S of the solution is dependent
0 0
= µq by (22) that is µp = µ0 on q( x ), that µ−1 µqdx is called the
R
µy + µ y
particular integral and it satisfies
d (with the complementary function)
(µp) = µp
dx the differential equation: y0 + p( x )y =
q( x ), called the Non-Homogeneous
Integrating both sides: differential equation. Notice that the
Z particular integral contains no constant.
µp = µqdx + c
Z
=⇒ y = µ−1 µqdx + µ−1 c
R Z R R
=⇒ y = e− p( x )dx
e p( x )dx
q( x )dx + ce− p( x )dx
(24)
The solution is in
R
two parts in the R.H.S.
The term ce− p( x)dx = µ−1 , which is called the complementary
function is the solution of the reduced equation: y0 + p( x )y = 0
obtained by setting
q( x ) = 0 in equation (20)
dy 3y
Example 6. Find the solution 10 of dx = 5x − x such that y(1) = 2 10
Solution
ALGORITHM
First, we rearrange the equation to put it in the standard form (20)
The solution process for a first order
of a linear equation:
differential equation is as follows:
dy 3
+ y = 5x 1. Put the differential equation in the
dx x correct initial form (20)
Multiply both sides of this by the integrating factor: 2. Find the integrating factor, µ( x )
using (23)
( 3x )dx
R R
p( x )dx
µ( x ) = e =e = e3 log x = x3 3. Multiply everything in the differen-
dy tial equation by µ( x ) and verify that
To give the equivalent equation; + 3x2 y = 5x4 . Notice that the
x3 dx the left side becomes the product
d 3
left hand side of dx ( x y), so by integrating both sides, we get: rule (µy)0 and write it as such.
Z 4. Integrate both sides; make sure you
x3 y = (5x4 )dx = x5 + c =⇒ y = x5 + cx −3 properly deal with the constant of
integration
5. Solve for the solution y
Now, to satisfy the initial condition, y(1) = 2, the value of c must be
1. Therefore, the solution to the IVP is: y = x5 + x −3
Solution
2
y0 + y = 4x (25)
x
2 dx
R
Integrating factor, µ( x ) = e x = e2 ln x = x2 . Multiply (25) through
by x2 :
Z
x2 y0 + 2xy = 4x3 =⇒ ( x2 y)0 = 4x3 =⇒ x2 y = 4x3 dx = x4 + c
Other first order equations in first degree which are not linear may
be reduced 11 to the linear form by means of appropriate transfor- 11
mations. No general rule can be stated; in each instance, the proper Example 8. Solve the differential equation
transformation is suggested by the form of the equation. Examples (3x − 4y3 )y0 + y = 0
of such equations are Bernoulli’s equation, Ricatti’s equation and the Solution
one considered below. Consider Clearly the coefficient of y0 is linear in
x and further more x appears nowhere
{ xs(y) + t(y)}y0 = µ(y) (26) again. Therefore we multiply through
by dx
dy to obtain:
dx dx dx
dy to obtain: µ ( y ) dy = xs ( y ) + t ( y ) or µ ( y ) dy − s ( y ) x = t ( y ) Thus this
3
eln y = y3 =⇒ y3 dx 2
dy + 3y x = 4y
5
BERNOULLI’S EQUATION
in which n is any real number. You would notice that the equation Solution
differs from a standardized first order linear differential equation in Write it in the form y0 + p( x )y =
q( x )yn that is:
first degree at the right side of the equation. Here there is a multipli-
y cos x
cation of yn , n 6= 0, n 6= 1, at the right hand side (RHS) Then divide y0 − = − 3 y4 (27)
x x
(28) through by yn and substitute z = y1−n . y −3
Divide through by y3 : y−4 y0 − x =
− cos x
, Let z = y−3 and z0 = −3y−4 y0 ,
y 0 y − n + p ( x ) y 1− n = q ( x ) x3
which is linear first order in first degree
0 3 dx
R R
p( x )dx
Let z = y1−n =⇒ z0 = (1 − n)y−n y0 =⇒ 1− z n 0 =⇒ µ( x ) = e =e x = e3 ln x = x3
n =y y
0
The equation becomes: z + (1 − n) p( x )z = (1 − n)q( x ) The Therefore, z · x3 = 3 cos x 3
R
x dx =
x3
3
R
solution is obtained using first order linear equation in first degree 3 cos xdx =⇒ zx = sin x + c
x3
But z = y−3 =⇒ = 3 sin x + c
solution techniques. y3
x3
Hence, y3 = 3 sin x +c
RICCATI’S EQUATION
The equation13 13
dy
= P ( x ) + Q ( x ) y + R ( x ) y2 (29) Example 10. Solve the equation dx =
dy
dx −2 − y + y2 where y1 = 2 is a particular
is non-linear and needs a particular solution before one can have the solution
chance to solve it. Consider the new function z defined by: z = y−1y , Solution
1
where y1 is the particular solution. Then easy calculations give: First we verify that y1 = 2 is a
solution, otherwise our calculation is
1 1
dz fruitless. Let z = y− 2 =⇒ y = 2 + z
= −[ Q( x ) + 2y1 R( x )]z − R( x ) (30)
dx z0
y0 = −
z2
which is a linear equation satisfied by new function z. Once it is
Hence, from the equation satisfied by y,
solved, we go back to via the relation: y = y1 1z . we get
Note: If one remembers the equation satisfied by z, then the linear
z0 1 2
1
equation satisfied by the function z is − 2 = −2 − 2 + + 2+
z z z
dz z0 3 1
= −[ Q( x ) + 2y1 R( x )]z − R( x ) = −(1 + 4)z − 1 = −3z − 1 =⇒ − = + 2
dz z2 z z
Hence z0 = −3z − 1. This is a linear
, since P( x ) = −2, Q( x ) = −1 and R( x ) = 1 equation. The general solution is given
by:
dy 2 cos2 x −sin2 x +y2
Exercise 1. 1. Verify that y1 = sin x is a solution to dx = 2 cos x
1
1
z = e−3x − e3x + c = − + ce−3x
and solve the differential equation using the initial condition y(0) = −1 3 3
1
Therefore, we have y = 2 +
2. Solve − 13 +ce−3x
References