Math 225 Differential Equations Notes Chapter 2
Math 225 Differential Equations Notes Chapter 2
Math 225 Differential Equations Notes Chapter 2
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Math</strong> <strong>225</strong> <strong>Differential</strong> <strong>Equations</strong> <strong>Notes</strong> <strong>Chapter</strong> 2<br />
Michael Muscedere<br />
September 26, 2004<br />
1 Introduction<br />
See Note Set 1<br />
2 First-Order <strong>Differential</strong> <strong>Equations</strong><br />
2.1 Introduction: Motion of a Falling Body<br />
We will revisit this subject later on.<br />
2.2 Separable <strong>Equations</strong><br />
Definition If the right-hand side of the equation:<br />
dy<br />
= f(x, y)<br />
dx<br />
can be expressed as a function g(x) that depends only on x times a function<br />
p(y) that depends only on y, then the differential equation is called<br />
separable.<br />
1
2.2.1 Method for Solving Separable <strong>Equations</strong><br />
Start with:<br />
dy<br />
dx = g(x)p(y)<br />
multiply by dx and by h(y) := 1/p(y) to obtain<br />
Then integrate both sides:<br />
∫<br />
h(y)dy = g(x)dx<br />
∫<br />
h(y)dy = g(x)dx<br />
Obtain the implicit solution of the differential equation by merging together<br />
the integration constants.<br />
H(y) = G(x) + C<br />
2
Example 1: Solve the non-linear equation<br />
Solution:<br />
1. y 2 dy = (x − 5)dx<br />
2. ∫ y 2 dy = ∫ (x − 5)dx<br />
dy<br />
dx = x − 5<br />
y 2<br />
3. y3<br />
3 = x2<br />
2 − 5x + C<br />
(<br />
) 1/3<br />
3x<br />
4. y =<br />
2<br />
2 − 15x + 3C<br />
(<br />
) 1/3<br />
3x<br />
5. y =<br />
2<br />
2 − 15x + K 3
Example 2: Solve the Initial value problem<br />
Solution:<br />
• dy<br />
y−1 = dx<br />
x+3<br />
• ∫ dy<br />
y−1 = ∫ dx<br />
x+3<br />
• ln|y − 1| = ln|x + 3| + C<br />
dy<br />
dx = y − 1<br />
x + 3<br />
y(−1) = 0<br />
• now we have an implicit solution<br />
• Let’s solve for y explicitly<br />
• e ln|y−1| = e ln|x+3|+C<br />
• |y − 1| = e C |x + 3| = C 1 |x + 3| where C 1 = e C > 0<br />
• y − 1 = ±C 1 (x + 3) implying y = 1 ± C 1 (x + 3)<br />
• y = 1 + K(x + 3) If we let K := ±C 1 and non-zero<br />
We can solve for K using the initial condition of y(−1) = 0<br />
0 = 1 + K(−1 + 3) = 1 + 2K<br />
So k = −1/2 and the solution to the IVP is<br />
y = 1 − 1 2<br />
−1<br />
(x + 3) = (x + 1)<br />
2<br />
4
2.2.2 Formal Justification of Method<br />
Let’s write the original DE in the following form.<br />
h(y) dy<br />
dx = g(x)<br />
where h(y) := 1/p(y). Letting H(y) and G(x) denote antiderivatives<br />
(indefinite integrals) of h(y) and g(x). so<br />
H ′ (y) dy<br />
dx = G′ (x)<br />
By the chain rule the left hand side is the derivative of the composite<br />
function H(y(x)) so<br />
d<br />
dx H(y(x)) = d<br />
dx G(x)<br />
Now, H(y(x)) and G(x) are two functions of x that have the same<br />
derivative. Therefore they can only differ by a constant.<br />
H(y(x)) = G(x) + C<br />
Hence this is the implicit solution.<br />
5
2.3 Linear <strong>Equations</strong><br />
Recall from Section 1.1 that a linear first-order equation is of the<br />
form:<br />
a 1 (x) dy<br />
dx + a 0(x)y = b(x)<br />
There are two situation for which the solution is quite immediate.<br />
If a 0 (x) := 0 then<br />
a 1 (x) dy<br />
dx = b(x)<br />
∫ b(x)<br />
y(x) =<br />
a 1 (x) dx + C<br />
The second situation is if a 0 (x) happens to be equal to the derivative<br />
of a 1 (x) In this case:<br />
a 1 (x)y ′ + a 0 (x)y = a 1 (x)y ′ + a ′ 1(x)y = d<br />
dx [a 1(x)y]<br />
d<br />
dx [a 1(x)y] = b(x)<br />
∫<br />
a 1 (x)y = b(x)dx + C<br />
y(x) = 1 [∫<br />
a 1 (x)<br />
]<br />
b(x)dx + C<br />
6
A linear differential equation is seldom as easy to solve as the<br />
first situation but we can always recast a linear DE into the second<br />
situation by using integrating factors.<br />
First let’s define a standard form.<br />
dy<br />
dx<br />
+ P (x)y = Q(x)<br />
where P (x) = a 0 (x)/a 1 (x) and Q(x) = b(x)a 1 (x)<br />
Next we wish to find a function µ(x) such that if we multiply the<br />
standard form by µ(x) then the left hand side becomes the derivative<br />
of the product µ(x)y<br />
7
Let’s see what µ(x) we need to make this happen.<br />
µ(x) dy<br />
dx<br />
+ µ(x)P (x)y = µ(x)dy<br />
dx + µ′ (x)y = d<br />
dx µ(x)y<br />
We see that if µ ′ (x) = µ(x)P (x) then we have situation two. So<br />
• dµ(x)<br />
dx<br />
= µ(x)P (x) use separation of variables<br />
• ∫ 1<br />
µ dµ = ∫ P (x)dx<br />
• µ(x) = e ∫ P (x)dx<br />
We found the special µ(x) Yeh. so<br />
d<br />
µ(x)y = µ(x)Q(x)<br />
dx<br />
as before<br />
µ(x)y =<br />
∫<br />
y(x) = 1 [∫<br />
µ(x)<br />
µ(x)Q(x)dx + C<br />
]<br />
µ(x)Q(x) + C<br />
8
Example 3: Find the general solution to<br />
1 dy<br />
x dx − 2y<br />
x = xcos(x)<br />
2<br />
• dy<br />
dx − 2 x y = x2 cos(x) Put in standard form so P (x) = −2/x<br />
• ∫ P (x)dx = ∫ −2<br />
x<br />
dx = −2ln|x| find µ(x)<br />
• µ(x) = e −2ln|x| = e ln(x−2) = x −2<br />
• x −2 dy<br />
dx − 2x−3 y = cos(x) Multiply the standard form by µ(x)<br />
• d<br />
dx (x−2 y) = cos(x)<br />
• x −2 y = ∫ cos(x)dx = sin(x) + C Integrate both sides<br />
• so y = x 2 sin(x) + Cx 2 9
Example 4: Word Problem<br />
A rock contains radioactive isotopes RA 1 and RA 2 that belong to<br />
the same radioactive series:<br />
• RA 1 decays into RA 2 at the rate of 50e −10t kg/sec.<br />
• RA 2 decays into stable atoms at a rate proportional k to the<br />
mass y(t) of RA 2 present<br />
From this information we can setup a first order differential equation<br />
describing the rate of change of RA 2 {y(t)}<br />
dy<br />
dt =<br />
rate of creation - rate of decay<br />
So<br />
dy<br />
dt = 50e−10t − ky(t)<br />
If k = 2/sec and initially y(0) = 40 kg, find the mass y(t) of RA 2<br />
for t ≥ 0<br />
• dy<br />
dt + 2y = 50e−10t Put in standard form so P (t) = 2<br />
• ∫ P (t)dt = ∫ 2dx = 2t find µ(t)<br />
• µ(t) = e 2t<br />
• e 2t dy<br />
dt + 2e2t y = 50e 2t e −10t Multiply the standard form by µ(t)<br />
• d dt (e2t y) = 50e −8t<br />
• e 2t y = ∫ 50e −8t dt Integrate both sides<br />
• e 2t y = 50<br />
−8 e−8t + C<br />
• y = −25<br />
4 e−10t + Ce −2t 10
To find C we need to apply the initial conditions y(0) = 40 to the<br />
general solution.<br />
40 = −25<br />
4 e0 + Ce 0 = −25<br />
4 + C<br />
So C = 40 + 25/4 = 185/4<br />
Thus the IVP solutions is:<br />
y(t) = 185<br />
4 e−2t − 25<br />
4 e−10t<br />
11
Theorem 2.1 Existence and Uniqueness Theorem<br />
Suppose P (x) and Q(x) are continuous on an interval (a, b)<br />
that contains the point x 0 . Then for any choice of initial values<br />
y 0 there exist a unique solution y(x) on (a, b) to the initial value<br />
problem<br />
• dy<br />
dx<br />
+ P (x)y = Q(x)<br />
• y(x 0 ) = y 0<br />
In fact the solution is:<br />
y(x) = 1<br />
µ(x)<br />
for the appropriate C.<br />
[∫<br />
]<br />
µ(x)Q(x) + C<br />
12
2.4 Exact <strong>Equations</strong><br />
It is also possible to use integrating factors to solve certain non-linear<br />
differential equations. Consider an equation of the form<br />
N(x, y) dy<br />
dx<br />
+ M(x, y) = 0<br />
where M and N are arbitrary (differentiable) functions of x and y.<br />
Multiplying through by the differential dx, we get<br />
M(x, y)dx + N(x, y)dy = 0<br />
Now suppose there exists a function F (x, y) with the following special<br />
property.<br />
∂F<br />
∂x<br />
= M(x, y)<br />
∂F<br />
∂y<br />
= N(x, y)<br />
then the preceding equation can be written in the form<br />
∂F ∂F<br />
dx +<br />
∂x ∂y dy = 0<br />
We recognize the left hand side as the total differential dF of a multivariable<br />
function F so:<br />
meaning that<br />
dF = 0<br />
F (x, y) = C<br />
where C is a constant. <strong>Differential</strong> <strong>Equations</strong> where this is true are<br />
called Exact<br />
13
Example 5: Show the following equation is exact and give an<br />
implicit solution.<br />
(x + y) + (x + 3y) dy<br />
dx = 0<br />
We need to find an F such that:<br />
∂F<br />
∂x<br />
= (x + y) and<br />
∂F<br />
∂y<br />
= (x + 3y)<br />
F (x, y) = (1/2)x 2 + xy + (3/2)y 2<br />
Verify that this F does the trick.<br />
So (1/2)x 2 + xy + (3/2)y 2 = C is the implicit solution.<br />
14
Definition Exact <strong>Differential</strong> Form<br />
The differential form M(x, y)dx + N(x, y)dy is said to be exact<br />
differential form in a rectangle R if there is a function F (x, y) such<br />
that:<br />
∂F<br />
∂x<br />
= M(x, y)<br />
∂F<br />
∂y<br />
total differential of F (x, y) satisfies:<br />
= N(x, y) for all (x, y) in R. That is the<br />
dF (x, y) ≡ ∂F ∂F<br />
dx + dy = M(x, y)dx + N(x, y)dy<br />
∂x ∂y<br />
If M(x, y)dx + N(x, y)dy is an exact differential form, then the<br />
equation<br />
M(x, y)dx + N(x, y)dy = 0<br />
is said to be an exact differential equation.<br />
Before we waste time trying to find F (x, y) we need a test to see<br />
if M(x, y)dx + N(x, y)dy is an exact differential form.<br />
15
Theorem 2.2 Test for Exactness<br />
Suppose the first partial derivatives of M(x, y) and N(x, y) are<br />
continuous in a rectangle R. Then<br />
M(x, y)dx + N(x, y)dy = 0<br />
is an exact equation in R if and only if the compatibility condition<br />
∂M<br />
∂y<br />
holds for all (x, y) in R.<br />
Why is this true<br />
∂N<br />
(x, y) = (x, y)<br />
∂x<br />
Consider the continuous mixed partial derivatives of F (x, y). We<br />
know from calculus that<br />
∂ ∂F<br />
∂y ∂x = ∂ ∂F<br />
∂x ∂y<br />
which leads directly to the compatibility condition.<br />
16
2.4.1 Method for Solving Exact <strong>Equations</strong><br />
1. If M(x, y)dx + N(x, y)dy = 0 is exact, then ∂F/∂dx = M.<br />
Integrate this last equation with respect to x to get<br />
∫<br />
F (x, y) = M(x, y)dx + g(y)<br />
2. To determine g(y) take the partial derivative with respect to y<br />
of both sides of the above integral equation and substitute N for<br />
∂F/∂y. We can now solve for g ′ (y).<br />
3. Integrate g ′ (y) to get g(y) up to a numerical constant. Substituting<br />
g(y) into the integral equation above gives F (x, y)<br />
4. The solution is F(x,y)=C<br />
Alternatively, starting with ∂F/∂y = N, the implicit solution can<br />
be found by first integrating with respect to y.<br />
17
Example 6: Solve<br />
(2xy − sec 2 x)dx + (x 2 + 2y)dy = 0<br />
Solution:<br />
Here M(x, y) = (2xy − sec 2 x) and N(x, y) = (x 2 + 2y) Testing for<br />
exactness:<br />
∂M ∂N<br />
= 2x =<br />
∂y ∂x<br />
Integrate M(x, y) with respect to x<br />
F (x, y) =<br />
∫<br />
(2xy − sec 2 x)dx + g(y) = x 2 y − tan(x) + g(y)<br />
Next, take the partial derivative w.r.t y of the integral equation substituting<br />
∂F<br />
∂y = N(x, y) = (x2 + 2y)<br />
x 2 + 2y = x 2 + g ′ (y)<br />
so g ′ (y) = 2y implying g(y) = y 2 substituting in the equation for<br />
F (x, y) we get<br />
F (x, y) = x 2 y − tan(x) + g(y) = x 2 y − tan(x) + y 2<br />
and the implicit solution of the DE is<br />
x 2 y − tan(x) + y 2 = C<br />
18
2.5 Exact <strong>Equations</strong><br />
Can we use integrating factors to turn DE into exact DE equations<br />
Method for Finding Integrating Factors<br />
1. If Mdx + Ndy = 0 is neither separable nor linear, compute<br />
∂M ∂N ∂M<br />
∂y<br />
and<br />
∂x<br />
. If<br />
∂y<br />
= ∂N<br />
∂x<br />
then the DE is exact. use method in<br />
previous section 2.4.<br />
2. If not exact, consider<br />
∂M/∂y − ∂N/∂x<br />
N<br />
If this is just a function of x then use the following as the integrating<br />
factor.<br />
[∫ ( ) ]<br />
∂M/∂y − ∂N/∂x<br />
µ(x) = exp<br />
dx<br />
N<br />
3. If not, consider<br />
∂N/∂x − ∂M/∂y<br />
M<br />
If this is just a function of y then use the following as the integrating<br />
factor.<br />
[∫ ( ) ]<br />
∂N/∂x − ∂M/∂y<br />
µ(y) = exp<br />
dy<br />
M<br />
Example 7: Solve<br />
Solution:<br />
Test for exactness:<br />
(2x 2 + y)dx + (x 2 y − x)dy = 0<br />
∂M<br />
∂y<br />
= 1 ≠ (2xy − 1) =<br />
∂N<br />
∂x<br />
19
So compute<br />
∂M/∂y − ∂N/∂x<br />
N<br />
=<br />
1 − (2xy − 1)<br />
x 2 y − x<br />
=<br />
2(1 − xy)<br />
−x(1 − xy = −2<br />
x<br />
This is only a function of x so the integrating factor is:<br />
(∫ ) −2<br />
µ(x) = exp<br />
x dx = x −2<br />
multiplying the differential equation by µ we get<br />
(2 + yx −2 )dx + (y − x −1 )dy = 0<br />
∂M<br />
∂y = x−2 = ∂N<br />
∂x<br />
This equation is now exact. Using the method of 2.4 we get the<br />
implicit solution:<br />
2x − yx −1 + y2<br />
2 = C<br />
2.6 Substitution and Transformations<br />
Substitution Procedure<br />
1. Identify the appropriate substitution for the given problem type.<br />
2. Rewrite the original equation in terms of the new variables<br />
3. Solve the transformed equation<br />
4. Express the solution in terms of the original variables. Noting<br />
any solutions lost in the procedure.<br />
20
Definition Homogeneous <strong>Equations</strong><br />
If the right hand side of the equation<br />
dy<br />
= f(x, y)<br />
dx<br />
can be expressed as a function of the ratio y/x then we say the<br />
equation is homogeneous.<br />
One test to see if the DE in the definition is homogeneous is to replace<br />
x with tx and y with ty then the equation is homogeneous if and<br />
only if<br />
f(tx, ty) = f(x, y)<br />
for all t ≠ 0<br />
To solve a homogeneous equation, we can make the following substitutions<br />
and by the chain rule on y = vx<br />
Example 8: Solve<br />
v = y x<br />
dy<br />
dx = v d<br />
dx x + xdv dx = v + xdv dx<br />
Solution:<br />
(xy + y 2 + x 2 )dx − x 2 dy = 0<br />
• Is the equation exact<br />
No<br />
∂M<br />
∂y<br />
= x + 2y ≠ 2x =<br />
∂N<br />
∂x<br />
21
• Is the equation linear<br />
No<br />
• Is it a function of y/x<br />
dy<br />
dx = xy + y2 + x 2<br />
x 2<br />
dy<br />
dx = xy + y2 + x 2<br />
x 2 = y x + (y x )2 + 1<br />
So the equation is homogeneous.<br />
using the substitution we get:<br />
v + x dv<br />
dx = v + v2 + 1<br />
This equation is separable so:<br />
• ∫ ∫ 1 1<br />
v1<br />
2 dv =<br />
x dx<br />
•<br />
•<br />
•<br />
•<br />
arctan(v) = ln|x| + C<br />
v = tan(ln|x| + C)<br />
y<br />
x<br />
= tan(ln|x| + C)<br />
y = xtan(ln|x| + C)<br />
• Also note x ≡ 0 is also a solution.<br />
22
2.6.1 <strong>Equations</strong> of the form dy<br />
dx<br />
If the right side of the equation:<br />
= G(ax + by)<br />
dy<br />
= f(x, y)<br />
dx<br />
can be expressed as a function of ax + by, That is<br />
then the substitution<br />
dy<br />
dx<br />
= G(ax + by)<br />
z = ax + by<br />
transforms the equation into a separable one.<br />
Example 9: Solve<br />
Solution:<br />
dy<br />
dx<br />
= y − x − 1 + (x − y + 2)−1<br />
•<br />
dy<br />
dx = y − x − 1 + (x − y + 2)−1 = −(x − y) − 1 + [(x − y) + 2] −1<br />
•<br />
z = x − y<br />
•<br />
dz<br />
dx = 1 − dy<br />
dx<br />
•<br />
1 − dz = −z − 1 + [z + 2]−1<br />
dx<br />
•<br />
dz<br />
= (z + 2) − (z + 2)−1<br />
dx<br />
This equation is separable.<br />
23
• ∫<br />
• ∫<br />
•<br />
•<br />
•<br />
replacing z by x − y<br />
∫<br />
dz<br />
(z + 2) − (z + 2) = −1<br />
∫<br />
(z + 2)dz<br />
(z + 2) 2 − 1 =<br />
dx<br />
1<br />
2 ln|(z + 2)2 − 1| = x + C 1<br />
(z + 2) 2 = Ce 2x + 1<br />
(x − y + 2) 2 = Ce 2x + 1<br />
dx<br />
2.6.2 Bernoulli <strong>Equations</strong><br />
Definition Bernoulli <strong>Equations</strong><br />
A first order equation that can be written in the form<br />
dy<br />
+ P (x)y = Q(x)yn<br />
dx<br />
where P(x) and Q(x) are continuous on an interval (a,b) and n is a<br />
real number is called a Bernoulli Equation.<br />
Note that when n=0 or n=1 the equation is linear and can be solved<br />
by our known methods.<br />
24
To solve Bernoulli equations, we can make the following substitutions<br />
v = y 1−n<br />
suppose we divide Bernoulli’s equation by y n then:<br />
y −ndy<br />
dx +P (x)y1−n = Q(x) Eq 1<br />
Notice that from the chain rule applied to v = y 1−n<br />
dv<br />
= (1 − n)y−ndy<br />
dx dx<br />
So substituting into Eq 1. we get<br />
1 dv<br />
+ P (x)v = Q(x)<br />
1 − n dx<br />
This last equation is linear and can be solved using integrating factors.<br />
25
Example 10: Solve<br />
dy<br />
dx − 5y = −5 2 xy3<br />
Solution:<br />
This is a Bernoulli equation with n = 3, P (x) = −5, and Q(x) =<br />
−5x/2 So as described before divide by y 3<br />
y −3dy<br />
dx − 5y−2 = − 5 2 x<br />
Now make the substitution v = y 1−3 = y −2 and dv/dx = −2y −3 dy/dx<br />
− 1 dv<br />
2 dx − 5v = −5 2 x<br />
dv<br />
+ 10v = 5x<br />
dx<br />
So now we can use integrating factors to get.<br />
Substituting v = y −2 we get<br />
v = x 2 − 1 20 + Ce−10x<br />
y −2 = x 2 − 1 20 + Ce−10x<br />
How about the solution y = 0 for all x<br />
26