Math 201 Lecture 04: Homogeneous and = G(a x + b y)

Math 201 Lecture 04: Homogeneous and
dy
dx
= G(a x + b y)
Jan. 16, 2012
•
Many examples here are taken from the textbook. The first number in () refers to the problem number
in the UA Custom edition, the second number in () refers to the problem number in the 8th edition.
0. Review
•
Exact equation:
M (x, y) dx + N (x, y) dy = 0
(1)
∂M ∂N
=
.
∂y
∂x
(2)
M (x, y) dx + N (x, y) dy = 0
(3)
with M , N satisfying
•
How to solve: Given equation
1. Make sure it is exact:
∂M ∂N
=
.
∂x
∂y
2. Look at
R
M (x, y) dx and
3. Integrate
Set F (x, y) =
R
R
(4)
N (x, y) dy, pick the one that is easier to do. Say it’s
Z
M (x, y) dx.
R
M (x, y) dx.
(5)
M (x, y) dx + g(y) with g(y) to be determined.
4. Determine g(y) through solving
Z
∂
∂
M (x, y) dx + g ′(y) = [F (x, y)] = N (x, y).
∂y
∂y
(6)
5. The general solution is
F (x, y) = C.
(7)
Simplify.
6. If solving initial value problem with initial condition y(x0) = y0, the solution is
F (x, y) = F (x0, y0).
(8)
7. Check solution if time allows.
•
Quiz.
◦
Solve
Solution. We have
1
x−
y
dx +
x
− y dy = 0,
y2
1
M =x− ,
y
Check
N=
1
∂M
= 2;
y
∂y
So equation is exact.
Compute
Z
M dx =
Z x−
1
1
y
y(1) = 1.
x
− y.
y2
(9)
(10)
∂N
1
=
∂x y 2
(11)
(12)
dx =
x2 x
− .
y
2
Math 201 Lecture 04: Homogeneous and
2
dy
dx
= G(a x + b y)
So
F (x, y) =
x2 x
− + g(y)
2
y
(13)
with g(y) to be determined. To get g(y), use
∂F
=N
∂y
(14)
which for our F (x, y) and N (x, y) becomes
x
x
+ g ′(y) = 2 − y
y2
y
So
g ′(y) = −y
F (x, y) =
and the general solution is
g(y) = −
y2
.
2
x2 x y 2
− −
y
2
2
(15)
(16)
x2 x y 2
− − = C.
2
y
2
(17)
To get the solution for the initial value problem, identify: x0 = 1, y0 = 1. So
F (x0, y0) = −1.
(18)
x2 x y 2
− − = −1.
2
y
2
(19)
dy
+ P (x) y = Q(x).
dx
(20)
The final answer is then
◦
Consider the linear equation
R
Show that multiplying µ(x) = e
P
makes the equation exact.
Proof. Multiply the equation by µ:
µ(x)
dy
+ P (x) µ(x) y = µ(x) Q(x).
dx
(21)
Write it as M dx + N dy = 0 we get
[P (x) µ(x) y − µ(x) Q(x)] dx + µ(x) dy = 0
so
M = P (x) µ(x) y − µ(x) Q(x);
Now check
R
But as µ(x) = e
∂M
= P (x) µ(x);
∂y
P
N = µ(x).
∂N
= µ ′(x).
∂x
(22)
(23)
(24)
we have exactly
µ ′(x) = P (x) µ(x)
so the equation is exact.
(25)
1. Basic Information
1.1. Homogeneous equations.
•
The Equation
dy
= f (x, y)
dx
with f (x, y) satisfying f (t x, t y) = f (x, y) for any t 0 (See “Notes and Comments” for some more
discussion on whether it’s necessary to require this for “any t 0”).
Jan. 16, 2012
•
3
How to get general solution
◦
Idea: Let v = y/x be the new unknown function. Re-write the equation into a new one with
variable x but unknown function v. This new equation is separable and can be solved.
◦
Procedure:
1. Check that the equation is indeed homogeneous;
We can either use the definition: Calculate f (t x, t y), simplify, and see whether it
turns out to be f (x, y); Or in many cases we can simply try to write everything in the
ratio y/x.
dy
dx
2. Replace y by v x in
to obtain
dy d(v x)
dv
=
=x
+ v.
dx
dx
dx
(26)
3. Replace every y in f (x, y) by v x. Simplify. All x’s should disappear and the result
should be a function of v, G(v). (If after simplification there are still some x dangling
around, you may want to return to step 1 and check whether the equation is homogenous
after all)
4. The new equation is
x
dv
+ v = G(v)
dx
dv
1
= [G(v) − v] .
dx
x
(27)
It is separable. Solve it. (Don’t forget to check extra solution!)
5. Get the final answer y by y = x v(x). Simplify.
If the formula for v is implicit, replace every v in your formula by y/x, simplify.
◦
Example: (2.6 9; 2.6 10) Solve
(3 x2 − y 2) dx + (x y − x3 y −1) dy = 0.
(28)
Solution. First re-write the equation to
dy
3 x2 − y 2
=−
.
dx
x y − x3 y −1
Thus
f (x, y) = −
Now check
f (t x, t y) = −
3 x2 − y 2
.
x y − x3 y −1
3 t2 x 2 − t2 y 2
3 x2 − y 2
3 (t x)2 − (t y)2
=− 2
=−
= f (x, y)
−1
3
−1
2
3
t xy −t x y
x y − x3 y −1
(t x) (t y) − (t x) (t y)
(29)
(30)
(31)
so the equation is homogeneous.
Now set v = y/x, or more practically, replace every y by v x. The left hand side becomes
x
For the right hand side we have
−
3 x2 − y 2
x y − x3 y −1
−
dv
+ v.
dx
3 x2 − (v x)2
3 − v2
=−
.
−1
3
x (v x) − x (v x)
v − v −1
So the equation for v is
x
3 − v2
dv
+v=−
v − v −1
dx
The equation is separable.
(32)
x
dv
−2
=
.
dx v − v −1
(33)
(34)
Math 201 Lecture 04: Homogeneous and
4
dy
dx
= G(a x + b y)
Now we solve v. First separate the variables:
(v − v −1) dv = −2
Integrate to get
dx
x
(35)
1 2
v − ln |v | = −2 ln |x| + C.
2
Note that as
p(v) =
(36)
1
v − v −1
(37)
there is no extra solution to add back.
Finally we return to y: As the formula for v is implicit, we simply substitute v = y/x which
leads to
1 y 2
− ln |y | + ln |x| = −2 ln |x| + C
(38)
2 x
Simplify
1 y 2
− ln |y | + 3 ln |x| = C.
(39)
2 x
This is the implicit formula for the general solution.
To check the solution, take d:
1 y 2
1
y
y2 3
d
−
dx +
dy
− ln |y | + 3 ln |x| = − 3 +
2 x
x
x2 y
x
1
= 3 [(3 x2 − y 2) dx + (x y − x3 y −1) dy].
x
So our solution is correct.
•
How to solve initial value problem (IVP)
◦
◦
Replace y by y0 and x by x0, determine C.
Example: Solve
(3 x2 − y 2) dx + (x y − x3 y −1) dy = 0,
y(1) = 2.
Solution. We have already found the general solution (given implicitly) as
1 y 2
− ln |y | + 3 ln |x| = C.
2 x
Now substitute y = 2, x = 1 we reach
1 2 2
− ln2 + 3 ln 1 = C
2 1
•
1.2.
•
(40)
C = 2 − ln 2.
So the solution to the initial value problem is
1 y 2
− ln |y | + 3 ln |x| = 2 − ln 2.
2 x
How to check solutions
◦
dy
dx
(41)
(42)
(43)
(44)
dy
If solution is explicit, compute dx and compare with f (x, y); If solution is implicit, take d and
check whether the result is equivalent to dy − f (x, y) dx.
= G(a x + b y).
The Equation
dy
= f (x, y)
dx
(45)
with f (x, y) of the form G(a x + b y) for some constants a, b.
•
How to get general solution
◦
Idea: Let z = a x + b y be the new unknown. Re-write the equation into an equation for v. This
new equation should be separable.
Jan. 16, 2012
◦
5
Procedure:
1. Decide that the equation is indeed of the form
dy
= G(a x + b y).
dx
2. Let z = a x + b y. We have
y=
z −ax
b
dy dz a
=
− .
dx
b
b
(46)
(47)
So the equation becomes
1 dz a
− = G(z)
b dx b
(48)
which is separable. (Again, if after simplification the equation is just not separable, that
dy
may mean the original equation is not of the form dx = G(a x + b y).
3. Solve the separable equation (Don’t forget to check extra solutions!). Use
z −ax
b
(49)
dy √
= x + y − 1.
dx
(50)
y=
to get the final answer.
If the solution to the separable equation is implicit, replace z by a x + b y, simplify.
◦
Example: (2.6 17; 2.6 17) Solve
Solution. We see that the equation is of the form
√
with a = b = 1, G(z) = z .
Let z = x + y. We have
so the equation becomes
which simplifies to
dy
= G(a x + b y).
dx
y=z −x
dy dz
=
−1
dx dx
(51)
(52)
√
dz
−1= z −1
dx
(53)
dz √
= z.
dx
(54)
This is separable and can be solved as follows:
Separate the variables:
dz
√ = dx
(55)
z
Integrate
√
x+C 2
z=
.
(56)
2 z =x+C
2
√
Add back extra solutions: Since we divided by z , we should add back z = 0. So the general
solution for the z equation is
x+C 2
and z = 0.
(57)
z=
2
Now return to y. Replace z by x + y we have
x+C 2
x+ y=
and x + y = 0.
2
This simplifies to
x+C 2
y=
− x,
y = −x.
2
(58)
(59)
Math 201 Lecture 04: Homogeneous and
6
dy
dx
= G(a x + b y)
It is easy to check that we have indeed obtained the right solutions.
Remark 1. The above example shows that it’s not always the case that we can “integrate” the extra
solutions into the general solution
formula. Note that no matter what value we assign to C, we can
never get y = −x from y =
•
x+C
2
2
− x.
How to solve initial value problem (IVP)
◦
Example: Solve
dy √
= x + y − 1,
y(0) = 0.
dx
Solution. Take
x+C 2
−x
y=
2
and let x = 0, y = 0. We reach
0+C 2
−0
0=
C = 0.
2
The solution is
x2
− x.
y=
4
How to check solutions
•
◦
(60)
(61)
(62)
(63)
Nothing new here.
2. Things to be Careful/Tricky Issues
See “Common Mistakes” for examples.
•
Be sure the equation is categorized correctly.
3. More Examples
•
Tricky integration may be involved.
Example 2. (2.6 20; 2.6 20) Solve
dy
= sin (x − y).
dx
(64)
Solution. We see that it is in the form
with G(z) = sin z, a = 1, b = −1.
Let z = x − y. Then
and the equation becomes
This gives
dy
= G(a x + b y).
dx
y=x−z
dy
dz
=1− .
dx
dx
(65)
(66)
dz
= sin z.
dx
(67)
dz
= 1 − sin z
dx
(68)
1−
which is separable. We separate the variables:
Now integrate. To find
dz
= dx.
1 − sin z
Z
dz
1 − sin z
(69)
(70)
Jan. 16, 2012
7
we need the following trick:
1 − sin z = cos2
z
z
z
z
z
z 2
+ sin2 − 2 sin cos = cos2
1 − tan
.
2
2
2
2
2
2
So the integral should be evaluate through
Z
Z
1
dz
dz
=
z
z
1 − sin z
cos2 2 1 − tan 2 2
Z
z
dtan 2
= 2
z
1 − tan 2 2
1
= 2
z.
1 − tan 2
(71)
(72)
Therefore the solution to the z problem is
2
z = x + C.
1 − tan 2
(73)
Now check for extra solutions. The equation we solve is
dz
= 1 − sin z
dx
(74)
π
This gives p(z) = 1 − sin z and therefore the solutions to p(c) = 0 are 2 k π + 2 for any integer k. Thus
the general solution to the z equation is
2
π
z = x + C , and z = 2 k π +
2
1 − tan 2
(75)
where C is an arbitrary constant, and k is any integer.
Finally we return to y. As the solution is given implicitly, we simply replace z = x − y to reach
Simplify:
2
x − y = x + C,
1 − tan 2
π
x− y=2kπ+ .
2
(76)
2
x − y − x = C,
1 − tan 2
y=x−
π
− 2 k π.
2
(77)
− 2 k π, we have
π
sin(x − y) = sin
+2kπ =1
2
(78)
To check solution, first check that if y = x −
dy
= 1,
dx
π
2
so the constant solutions are right.
Now check the other solutions. Take d of
2
1 − tan
x−y
2
− x and see whether we get something a
multiplication factor away from dy − sin (x − y) dx.
#
"
x−y
2 dtan 2
2
−
x
=
d
x−y
x − y − dx
1 − tan 2
1 − tan 2 2
dx − dy
1
=
x−y
x − y − dx
cos2 2
1 − tan 2 2
dx − dy
=
− dx
1 − sin (x − y)
sin (x − y) dx − dy
=
1 − sin (x − y)
1
= −
[dy − sin (x − y) dx].
1 − sin (x − y)
(79)
Math 201 Lecture 04: Homogeneous and
8
dy
dx
= G(a x + b y)
So the solution is correct.
4. Notes and Comments
•
As we have mentioned, the only equations we can solve directly are exact equations, and the only
idea we have for non-exact equations is to somehow make it exact. Interested reader can check that
what we did today is indeed making the equations exact.
•
Usually whether an equation
is of the form
dy
= f (x, y)
dx
(80)
dy
= G(a x + b y)
dx
(81)
is straightforward to decide. However there are cases where one may get a bit confused. In that case
the following criterion may be handy:
f (x, y) is of the form G(a x + b y)
b
∂f
∂f
=a .
∂x
∂y
(82)
For example, it may happen that at first sight
dy
= f (x, y) = (x + y − 1)2 − (x + y + 1)2
dx
(83)
does not look like of the form G(a x + b y). But if we calculate the derivatives, we see that
This means
∂f ∂f
= .
∂x ∂y
(84)
f (x, y) = G(x + y).
(85)
Of course.
•
•
For those who are curious enough to have read Section 2.5 (not required for 201): In principle, any
non-exact equation can be made exact through multiplying a certain function µ(x, y), the so-called
integrating factor. However it is often very hard, if not impossible, to find integrating factors without
solving the equation. If you have time and energy, try searching for integrating factors for the two
types of equations we studied today using the approach of Section 2.5, and see how hard it is.
In the textbook, an equation is homogeneous if f (x, y) satisfying f (t x, t y) = f (x, y) for any t 0.
However, in practice we will often encounter problems where f (t x, t y) only holds for certain t. For
example,
dy y (ln y − ln x + 1)
=
(86)
dx
x
with
y (ln y − ln x + 1)
.
(87)
f (x, y) =
x
It simply doesn’t make sense to talk about f (t x, t y) with t < 0. This is not a problem though. Because
even when f (t x, t y) = f (x, y) only holds for t in a certain interval, say a < t < b, our solution method
still works. To understand why, let’s look at our solution procedure more carefully.
When solving homogeneous equations, we say “let v = y/x be the new unknown”, then f (x,
y) = G(v) for some function G. What we are actually doing is this:
f (x, y) = f (x · 1, x v) = f (1, v) = G(v).
(88)
Now it is clear that if f (t x, t y) = f (x, y) only holds for a < t < b, the above reduction is still true as
long as we restrict a < x < b.
To summarize, if f (t x, t y) = f (x, y) does not hold for all t 0 but only for t in an interval (a, b),
then the method in this lecture can still solve the equation, although the solution is only good for x
inside the same interval, that is a < x < b.
Jan. 16, 2012
•
9
Try solve the initial value problem
dy √
= x + y − 1,
dx
y(1) = 1.
(89)
How many solutions do you get? Are they all solutions?
dy
(No). Hint: For a solution to the original problem, we must have dx > −1. The reason why we
get “bogus solutions” is that we take the square in the simplification step
√
x+C 2
2 z =x+C
.
(90)
z=
2
•
Try solve the initial value problem
dy √
= x + y − 1,
dx
y(1) = −1.
(91)
How many solutions can you get? Are they all really solutions?
(Yes). This is an example of “non-uniqueness”. In general for an initial value problem there is one
and only one solution. But when the function f (x, y) is not smooth enough, things can go wild.