L01_ODE_Second_ORDER
L01_ODE_Second_ORDER
1
Mapúa University
Outline
Learning Objectives
Nonhomogeneous ODEs
Euler-Cauchy Equations
Learning Objectives
Homogeneous ODEs of Second
Order
Homogeneous Linear ODEs of Second Order
λ2 e λx + aλe λx + be λx = 0
We make a trial solution
y = e λx
Then,
dy d 2x
= λe λx , = λ2 e λx
dx dy 2
Thus, the original differential equation becomes
λ2 e λx + aλe λx + be λx = 0
or
(λ2 + aλ + b)e λx = 0
We make a trial solution
y = e λx
Then,
dy d 2x
= λe λx , = λ2 e λx
dx dy 2
Thus, the original differential equation becomes
λ2 e λx + aλe λx + be λx = 0
or
(λ2 + aλ + b)e λx = 0
So for e λx to be a solution,
λ2 + aλ + b = 0
λ2 + aλ + b = 0
This is the characteristic or auxiliary equation.
λ2 + aλ + b = 0
The roots of this equation provide us the general solutions. There
are three cases according as a2 − b is positive, zero, or negative.
Complex Conjugate
λ1 = − 12 a + iω
III y = e −ax/2 (A cos ωx + B sin ωx
λ2 = − 12 a − iω
ω = b − 41 a2
Exercises
d 2y dy
2
+ P(x) + Q(x)y = R(x)
dx dx
Solution of the Linear ODE of Second Order
d 2y dy
2
+ P(x) + Q(x)y = R(x)
dx dx
is the sum of the solution yh (x) of the homogeneous equation
d 2y dy
2
+ P(x) + Q(x)y = 0
dx dx
Solution of the Linear ODE of Second Order
d 2y dy
+ P(x) + Q(x)y = R(x)
dx 2 dx
is the sum of the solution yh (x) of the homogeneous equation
d 2y dy
2
+ P(x) + Q(x)y = 0
dx dx
and a particular solution yp (x).
Solution of the Linear ODE of Second Order
d 2y dy
+ P(x) + Q(x)y = R(x)
dx 2 dx
is the sum of the solution yh (x) of the homogeneous equation
d 2y dy
2
+ P(x) + Q(x)y = 0
dx dx
and a particular solution yp (x).
General Form:
ar 2 + br + c = 0
Basic Idea:
▶ Assume a form for the particular solution yp (x) based on f (x).
▶ The form is chosen to include undetermined coefficients.
▶ Substitute yp (x) into the ODE and solve for the coefficients.
Common Forms for f (x) and yp (x)
Given:
y ′′ − 3y ′ + 2y = e 2x
Example 1: f (x) = e 2x
Given:
y ′′ − 3y ′ + 2y = e 2x
Steps:
1. Solve the homogeneous equation: yh (x).
Example 1: f (x) = e 2x
Given:
y ′′ − 3y ′ + 2y = e 2x
Steps:
1. Solve the homogeneous equation: yh (x).
r 2 − 3r + 2 = 0
Given:
y ′′ − 3y ′ + 2y = e 2x
Steps:
1. Solve the homogeneous equation: yh (x).
Homogeneous solution:
yh (x) = C1 e x + C2 e 2x
Example 1: f (x) = e 2x
Given:
y ′′ − 3y ′ + 2y = e 2x
Steps:
1. Solve the homogeneous equation: yh (x).
Homogeneous solution:
yh (x) = C1 e x + C2 e 2x
Homogeneous solution:
yh (x) = C1 e x + C2 e 2x
yp (x) = Axe 2x
Example 1: f (x) = e 2x
Given:
y ′′ − 3y ′ + 2y = e 2x
Steps:
1. Solve the homogeneous equation: yh (x).
Homogeneous solution:
yh (x) = C1 e x + C2 e 2x
yp (x) = Axe 2x
Example 1: f (x) = e 2x
Given:
y ′′ − 3y ′ + 2y = e 2x
Steps:
1. Solve the homogeneous equation: yh (x).
Homogeneous solution:
yh (x) = C1 e x + C2 e 2x
yp (x) = Axe 2x
Solution:
y (x) = C1 e x + C2 e 2x + xe 2x
Example 2: f (x) = x 2
Given:
y ′′ + 4y ′ + 4y = x 2
Steps:
1. Solve the homogeneous equation: yh (x).
2. Assume a particular solution yp (x) = Ax 2 + Bx + C .
3. Substitute yp (x) into the ODE and solve for A, B, and C .
Solution:
1 1 3
y (x) = (C1 + C2 x)e −2x + x 2 − x +
4 2 8
Example 3: f (x) = cos(2x)
Given:
y ′′ + y = cos(2x)
Steps:
1. Solve the homogeneous equation: yh (x).
2. Assume a particular solution yp (x) = A cos(2x) + B sin(2x).
3. Substitute yp (x) into the ODE and solve for A and B.
Solution:
1
y (x) = C1 cos(x) + C2 sin(x) + cos(2x)
3
Summary
ar 2 + br + c = 0
Assume:
yp (x) = u1 (x)y1 (x) + u2 (x)y2 (x)
where u1 (x) and u2 (x) are functions to be determined.
▶ Differentiate yp (x):
yp′ (x) = u1′ (x)y1 (x) + u1 (x)y1′ (x) + u2′ (x)y2 (x) + u2 (x)y2′ (x)
▶ Impose the condition u1′ (x)y1 (x) + u2′ (x)y2 (x) = 0 to simplify.
▶ The simplified expression is then substituted into the ODE.
Solving for u1′ (x) and u2′ (x)
Resulting System:
Integrate:
Z Z
f (x) f (x)
u1 (x) = − y2 (x) dx, u2 (x) = y1 (x) dx
W [y1 , y2 ] W [y1 , y2 ]
Given:
y ′′ − 4y ′ + 4y = e 3x
Steps:
1. Solve the homogeneous equation: yh (x) = (C1 + C2 x)e 2x .
2. Find the Wronskian: W [y1 , y2 ].
3. Compute u1 (x) and u2 (x).
4. Substitute to find yp (x).
Solution:
1
y (x) = (C1 + C2 x)e 2x + xe 3x
4
Example 2: f (x) = sin(2x)
Given:
y ′′ + y = sin(2x)
Steps:
1. Solve the homogeneous equation:
yh (x) = C1 cos(x) + C2 sin(x).
2. Find the Wronskian: W [y1 , y2 ] = 1.
3. Compute u1 (x) and u2 (x).
4. Substitute to find yp (x).
Solution:
1
y (x) = C1 cos(x) + C2 sin(x) − x cos(2x)
2
Example 3: f (x) = ln(x)
Given:
x 2 y ′′ + xy ′ − y = ln(x)
Steps:
1. Solve the homogeneous equation: yh (x) = C1 x + C2 x −1 .
2. Find the Wronskian: W [y1 , y2 ] = −2.
3. Compute u1 (x) and u2 (x).
4. Substitute to find yp (x).
Solution:
1 1
y (x) = C1 x + C2 x −1 + x ln(x) + x
2 4
Summary
If r1 ̸= r2 :
y (x) = C1 x r1 + C2 x r2
If r1 = r2 = r :
y (x) = (C1 + C2 ln(x))x r
Given:
x 2 y ′′ − xy ′ + y = 0
Solution:
▶ Characteristic equation: r (r − 1) − r + 1 = 0 simplifies to
r 2 = 0.
▶ Roots: r = 0 (repeated root).
▶ General solution: y (x) = C1 + C2 ln(x).
Example 2: x 2 y ′′ + 4xy ′ + 4y = 0
Given:
x 2 y ′′ + 4xy ′ + 4y = 0
Solution:
▶ Characteristic equation: r (r − 1) + 4r + 4 = 0.
▶ Roots: r = −2 (repeated root).
▶ General solution: y (x) = (C1 + C2 ln(x))x −2 .
Summary
Thank you!
Questions?