Difeq
Difeq
Consider
dy
M(x, y) + N(x, y) =0
dx
or equivalently
M(x, y) dx + N(x, y) dy = 0
∂M ∂N
This equation is said to be exact if =
∂y ∂x
To solve an exact eq. we find a potential function F(x, y) such that
∂F ∂F
= M and =N
∂x ∂y
Using this function the exact equation
M dx + N dy = 0
becomes Fx dx + Fy dy = 0
which is dF = 0
⇒ F = x2 + xy + h(y)
Fy = N ⇒ 0 + x + h′ (y) = 2y + x + 3
⇒ h′ (y) = 2y + 3
Z
⇒ h(y) = 2y + 3 dy = y2 + 3y + c
F(x, y) = x2 + xy + y2 + 3y + c is a potential function for any value of the constant c.
⇒ F = y2 + xy + 3y + h(x)
Fx = M ⇒ 0 + y + 0 + h′ (x) = 2x + y
⇒ h′ (x) = 2x
Z
⇒ h(x) = 2x dx = x2 + c
F(x, y) = y + xy + 3y + x2
2
is a potential function so
2 2
y + xy + 3y + x = C defines the general solution implicitly.
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Example
Find the solution
3 of the I.V.P.
x dy
4x − x2 y − + 2y = 0 , y(3) = 2
3 dx
3
x
Solution 2
(4x − x y) dx + − − 2y dy = 0
| {z } 3
M | {z }
N
My = −x2
My = Nx ⇒ the eq. is exact
Nx = −x2
Find F(x, y) such that Fx = M and Fy = N
Fx = M ⇒ Fx =4x − x2 y
x3
⇒ F = 2x2 − y + h(y)
3
x3 ′ x3
Fy = N ⇒ − + h (y) = − − 2y
3 3
⇒ h′ (y) = −2y
Z
⇒ h(y) = −2y dy = −y2 + c
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
x3 y
F(x, y) = 2x2 − − y2 is a potential function so
3
x3 y
2x2 − − y2 = C defines the general solution implicitly.
3
33 · 2
y(3) = 2 ⇒ 2 · 32 − − 22 = C ⇒ C = −4
3
x3 y
2x2 − − y2 = −4 defines the solution of the I.V.P. implicitly.
3
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Integrating Factors
Suppose that M(x, y) dx + N(x, y) dy = 0 is not exact. We will try to
find an integrating factor µ(x, y) such that
µ · M dx + µ · N dy = 0 is exact
| {z } | {z }
m n
Exactness ⇒ m y = nx
⇒ µy · M + µ · My = µx · N + µ · Nx
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Example
Find the general solution of the D.E.
(5x2 y2 + 4x − 3y3 ) dx + (2x3 y − 3xy2 ) dy = 0
Solution (5x2 y2 + 4x − 3y3 ) dx + (2x3 y − 3xy2 ) dy = 0
| {z } | {z }
M N
My = 10x2 y − 9y2
My ̸= Nx ⇒ the eq. is not exact
Nx = 6x2 y − 3y2
2
⇒ µ(x) = x
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Multiply the D.E. by µ(x) = x2
(5x4 y2 + 4x3 − 3x2 y3 ) dx + (2x5 y − 3x3 y2 ) dy = 0 is exact(my = 10x4 y − 9x2 y2 = nx )
| {z } | {z }
m n
⇒ F = x5 y2 + x4 − x3 y3 + h(y)
⇒ h′ (y) = 0 ⇒ h(y) = c
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Example
Find the solution of the I.V.P. y dx + (y − x) dy = 0 , y(2) = −1
y
dy x
exercise: = y (homogeneous eq.)
dx 1−
x
Solution y dx + (y − x) dy = 0
|{z} | {z }
M N
My = 1
̸ Nx ⇒ the eq. is not exact
My =
Nx = −1
My − Nx 2
= is not independent of y.
N y−x
Nx − My −2
= is independent of x so there is an integrating factor µ(y)
M y
satisfying:
Z ′ Z
µ′ −2 µ −2
= ⇒ dy = dy
µ y µ y
⇒ ln µ = −2 ln y
⇒ µ(y) = y−2
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Multiply
the D.E. by µ(y) = y−2
−1 −1 −2
y dx + y − xy dy = 0 is exact (my = −y−2 = nx )
|{z} | {z }
m
n
⇒ F = xy−1 + h(y)
⇒ h′ (y) = y−1
Z
⇒ h(y) = y−1 dy = ln |y| + c
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Existence-Uniqueness Theorem for First Order ODE’s
Theorem
(E-U thm for first order linear ODE’s) y′ + p(t) · y = g(t) , y(t0 ) = A
If the functions p and g are continuous on an open interval I = (a, b)
containing the point t = t0 , then there exists a unique function
y = ϕ(t) that satisfies the D.E. for each t ∈ I and also satisfies the
initial condition where A is any prescribed initial value.
Example
Use existence-uniqueness theorem to find an interval in which the
I.V.P. ty′ + 3y = 6t3 , y(1) = 2 has a unique solution.
Solution y′ + 3 y = 6t2
t
3
g(t) = 6t is continuous for all t ∈ R and p(t) = is continuous for all
2
t
t ∈ R − {0}.
0
1
Solution 3
y′ + y = 6t2
t
3
g(t) = 6t2 is continuous for all t ∈ R and p(t) = is continuous for all
t
t ∈ R − {0}.
0
−1
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Existence-Uniqueness Theorem for First Order ODE’s
Theorem
(E-U thm for general first order ODE’s) y′ = f(t, y) , y(t0 ) = A
∂f
Let the functions f and be continuous in some rectangle
∂y
a < t < b , c < y < d containing the point (t0 , A). Then, in some
interval t0 − h < t < t0 + h contained in a < t < b, there exists a
unique solution y = ϕ(t) of the initial value problem.
y
d (t0 , A)
t
a b
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Example
Apply the existence-uniqueness theorem to the I.V.P.
dy t+1
= , y(0) = −1
dt 2(y − 1)
Solution t+1 ∂f −t − 1
f(t, y) = , (t, y) =
2(y − 1) ∂y 2(y − 1)2
Both f and fy are continuous everywhere except on the line y = 1.
y
y=1
t
(0, −1)
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
Example
Apply the existence-uniqueness theorem to the I.V.P.
dy t+1
= , y(0) = 1
dt 2(y − 1)
Solution t+1 ∂f −t − 1
f(t, y) = , (t, y) =
2(y − 1) ∂y 2(y − 1)2
Both f and fy are continuous everywhere except on the line y = 1.
y
(0, 1)
y=1
t
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .