Lecture2 ODE
Lecture2 ODE
Mathematical Sciences,
University of Southampton, UK
MATH2048, Semester 1
1 Review
2 Euler equations
3 Inhomogeneous ODEs
4 Summary
Dias / Hawke (Maths) MATH2048 Lecture 2 Semester 1 1 / 16
Outline
1 Review
2 Euler equations
3 Inhomogeneous ODEs
4 Summary
1 Review
2 Euler equations
3 Inhomogeneous ODEs
4 Summary
ax 2 y 00 + bxy 0 + cy = 0.
for constants a, b, c.
One ansatz (educated guess) that we can try is y = x n .
n (n−1)n
⇒ y 0 = n x n−1 = x y & y 00 = (n − 1)n x n−2 = x2
y
This leads to the auxiliary equation:
a n2 + (b − a)n + c y = 0 ⇒ a n2 + (b − a)n + c = 0,
1 d 2 [r X (r )] ` (` + 1)
− X (r ) = 0,
r dr 2 r2
r being the star’s radius and ` a constant.
We can rewrite this as
r 2 X 00 + 2r X 0 − ` (` + 1) X = 0.
a = 1, b = 2, c = −`(` + 1),
n2 + n − `(` + 1) = 0 ⇒ n = `, n = −` − 1
( % case of two real, distinct roots )
1
X (r ) = c1 r ` + c2
r `+1
where c1 , c2 are constants.
dy 0 d 1 d ẏ 1 d 1
00
y = = ẏ = + ẏ
dx dx x dx x dx x
!
d ẏ dt 1 1 d ln x 1 1 1
= + ẏ − = ÿ − ẏ = (ÿ − ẏ ) .
dt dx x x2 dx x x2 x2
a ÿ + (b − a)ẏ + c y = 0,
1 Review
2 Euler equations
3 Inhomogeneous ODEs
4 Summary
y 00 + 4y 0 + 4y = 4x + 25e3x
we need to:
1 solve the homogeneous problem, y 00 + 4y 0 + 4y = 0 for the
complementary functions y1 (x) and y2 (x);
2 find a (any) particular integral yp (x);
3 Add to get general solution: y (x) = c1 y1 (x) + c2 y2 (x) + yp (x).
yP = (A x + B) + C e3x
Substitute yP in the LHS (left hand side) of ODE & match with RHS:
yP00 + 4yP0 + 4yP = [0 + 4A + 4(Ax + B)] + (9 + 12 + 4) C e3x
≡ 4x + 25 e3x .
Matching terms in x 0 , x 1 , e3x we find that
4(A + B) = 0,
4A = 4,
25C = 25
⇒ A = 1, B = −1, C = 1 ⇒ yP = (x − 1) + e3x
Thus, the general solution y (x) = c1 y1 (x) + c2 y2 (x) + yp (x) is:
y = e−2x (c1 + x c2 ) + x − 1 + e3x .
Dias / Hawke (Maths) MATH2048 Lecture 2 Semester 1 13 / 16
More complex undetermined coefficients
What guesses should we use for the inhomogeneous equations below?
y 00 + 4y 0 + 4y = e−2x ; (1)
00 0 −2x
y + 4y + 4y = x e ; (2)
h i
y 00 + 4y 0 + 4y = log sin x 3/4 . (3)
y1 = e−2x , y2 = x e−2x .
For (1) we have to try yP = C x 2 e−2x ; this works (i.e. matching
with source is possible).
For (2) we have to try yP = C x 2 e−2x , but find it does not work.
We then try yP = C x 3 e−2x which works.
For (3) you can forget about undetermined coefficients; there is no
sensible educated guess.
Dias / Hawke (Maths) MATH2048 Lecture 2 Semester 1 14 / 16
Outline
1 Review
2 Euler equations
3 Inhomogeneous ODEs
4 Summary
Euler equations: a x 2 y 00 + b x y 0 + c y = 0.
I First make the ansatz (educated guess) y = x n .
I This gives the auxiliary equation: a quadratic that we solve for n.
I If the roots are repeated or complex, make the substitution t = ln x.
I Don’t forget to change back to x: we want y (x) [not only y (t)].