0% found this document useful (0 votes)
47 views

Lecture2 ODE

This document outlines a lecture on Euler equations and inhomogeneous ordinary differential equations (ODEs). It begins with a review of general linear second-order ODEs and ODEs with constant coefficients. It then discusses the Euler equation and how to find solutions using an ansatz. Examples are provided of applying the method to a pulsating star model. The document also covers solving inhomogeneous ODEs using the method of undetermined coefficients, which involves guessing a particular integral and finding its coefficients by substitution.

Uploaded by

houngjunhong03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

Lecture2 ODE

This document outlines a lecture on Euler equations and inhomogeneous ordinary differential equations (ODEs). It begins with a review of general linear second-order ODEs and ODEs with constant coefficients. It then discusses the Euler equation and how to find solutions using an ansatz. Examples are provided of applying the method to a pulsating star model. The document also covers solving inhomogeneous ODEs using the method of undetermined coefficients, which involves guessing a particular integral and finding its coefficients by substitution.

Uploaded by

houngjunhong03
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Outline

Lecture 2 - Euler equation and Inhomogenous


ODEs

Oscar Dias and Ian Hawke

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

Dias / Hawke (Maths) MATH2048 Lecture 2 Semester 1 2 / 16


Review

General Linear second-order ODEs: y 00 + p(x)y 0 + q(x)y = r (x).


I r ≡ 0: the ODE is homogeneous
I General solution: y (x) = c1 y1 (x) + c2 y2 (x), with c1 , c2 constants.

ODEs with constant coefficients: ay 00 + by 0 + cy = 0.


I Ansatz: y = eλx .
I This gives an auxiliary equation, a quadratic that can be solved.
I We get three different kinds of solutions for real distinct, real
repeated, and complex roots.

Dias / Hawke (Maths) MATH2048 Lecture 2 Semester 1 3 / 16


Outline

1 Review

2 Euler equations

3 Inhomogeneous ODEs

4 Summary

Dias / Hawke (Maths) MATH2048 Lecture 2 Semester 1 4 / 16


→ Euler equations
The general Euler equation can be written

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,

which is another quadratic equation we can solve:


p
−be ± b e2 − 4ac
n= , with b e ≡b−a
2a

Dias / Hawke (Maths) MATH2048 Lecture 2 Semester 1 5 / 16


Example of Euler eqn: a pulsating star

A simple model for radial pulsations of a star can be reduced to

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.

This is an example of an Euler equation.


What is the solution of this Euler equation?

Dias / Hawke (Maths) MATH2048 Lecture 2 Semester 1 6 / 16


Example of Euler eqn: a pulsating star

In our Euler example r 2 X 00 + 2r X 0 − ` (` + 1) X = 0, so

a = 1, b = 2, c = −`(` + 1),

and, under the ansatz X = r n , the auxiliary equation becomes

n2 + n − `(` + 1) = 0 ⇒ n = `, n = −` − 1
( % case of two real, distinct roots )

Thus, the general solution is

1
X (r ) = c1 r ` + c2
r `+1
where c1 , c2 are constants.

Dias / Hawke (Maths) MATH2048 Lecture 2 Semester 1 7 / 16


Euler equations: repeated or complex roots case

If the roots are repeated or complex: use the substitution t = ln x.


We now use the chain rule:
0 dy dy dt d ln x 1 2
y = = = ẏ = ẏ , where ẏ ≡ dy
dt
and ÿ ≡ ddtẏ = d 2y ;
dx dt dx dx x dt

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

The Euler equation a x 2 y 00 + b xy 0 + c y = 0 then becomes:

a ÿ + (b − a)ẏ + c y = 0,

⇒ constant coefficient ODE that we know how to solve for y(t) !

Finally: replace t by x (using the substitution t = ln x) to get y(x).

Dias / Hawke (Maths) MATH2048 Lecture 2 Semester 1 8 / 16


Example of Euler eqn with repeated roots
x 2 y 00 + 3xy 0 + y = 0
Use y = x n ⇒ Auxiliary equation:
n(n − 1) + 3n + 1 = 0 ⇒ (n + 1)2 = 0
We have a real, repeated root, n = −1.
We substitute t = ln x and, after using chain rule (last slide), one gets:
aÿ + (b − a)ẏ + cy = 0 → ÿ + 2ẏ + y = 0
⇒ ODE with constant coefficients (Lecture 1).
Solution:
y (t) = c1 e−t + c2 t e−t (← see Lecture 1)
Substitute back t = ln x ⇔ x = et :
1 1
y (x) = c1 + c2 ln x
x x
Dias / Hawke (Maths) MATH2048 Lecture 2 Semester 1 9 / 16
Outline

1 Review

2 Euler equations

3 Inhomogeneous ODEs

4 Summary

Dias / Hawke (Maths) MATH2048 Lecture 2 Semester 1 10 / 16


→ Inhomogeneous ODEs:
Method of Undetermined coefficients
• To solve inhomogeneous ODEs such as

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).

• In the method of undetermined coefficients we give a “general guess”


for the particular integral, then substitute in to find the coefficients.

What educated general guess is suitable in the present example?

Dias / Hawke (Maths) MATH2048 Lecture 2 Semester 1 11 / 16


Method of Undetermined coefficients
source
z }| {
00 0
y + 4y + 4y = 4x + 25 e3x

Homogeneous equation: y 00 + 4y 0 + 4y = 0. Its solutions


(complementary functions) are:

y1 = e−2x , y2 = x e−2x . (- case of Constant Coefficient ODE with repeated root)

General educated guesses for the particular integral are given in


the Lecture notes. Here we want

yP = (A x + B) + C e3x

with the polynomial (Ax + B) ’matching’ the x term (4x) in the


source & the exponential C e3x ’matching’ the source term 25 e3x .
Note: there are no clashes/matchings w/ complementary functions
Dias / Hawke (Maths) MATH2048 Lecture 2 Semester 1 12 / 16
Method of Undetermined coefficients
y 00 + 4y 0 + 4y = 4x + 25 e3x ,
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)

Note that the complementary functions are

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

Dias / Hawke (Maths) MATH2048 Lecture 2 Semester 1 15 / 16


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)].

For inhomogeneous equations:


I First solve the homogeneous equation (for complementary
functions y1 ,y2 ).
I Then find a particular solution (particular integral) yP .
I Add complementary and particular solutions to form the general
solution

Dias / Hawke (Maths) MATH2048 Lecture 2 Semester 1 16 / 16

You might also like