This document provides an overview of solving second order ordinary differential equations (ODEs). It discusses Euler-Cauchy ODEs, inhomogeneous ODEs, and finding particular solutions through guesswork. For Euler-Cauchy ODEs, it examines the cases where the quadratic formula yields real and complex roots. It also presents methods for finding the general solution from the characteristic equation. The document outlines the process of finding the general solution to inhomogeneous ODEs using the related homogeneous ODE. It includes an example of guessing an exponential particular solution based on the form of the inhomogeneous term.
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
Week 7 [compatibility mode]
1. KNF1023
Engineering
Mathematics II
Second Order ODEs
Prepared By
Annie ak Joseph
Prepared By
Annie ak Joseph Session 2007/2008
2. Learning Objectives
Explain about Euler-Cauchy ODEs
Discuss about Second order
inhomogeneous ODEs
Explain about Particular Solution by
Guesswork
3. Euler-Cauchy ODEs
An Euler-Cauchy ODE is one of the form
ax 2 y "( x) + bxy '( x) + cy ( x) = 0
Where a ≠ 0, b and c are given constants.
To look for linearly independent solutions of this
ODE, try y = x λ
where λ is a constant yet to be determined.
Differentiating, we have
y ' = λ x λ −1 and y " = λ ( λ − 1) x λ − 2
4. Euler-Cauchy ODEs
Substituting into the ODE gives
ax ⋅ λ ( λ − 1) x
2 λ −2
+ bx ⋅ λ x λ −1 λ
+ cx = 0
⇒x λ
( aλ ( λ − 1) + bλ + c ) = 0
⇒ aλ ( λ − 1) + bλ + c = 0
⇒ aλ 2 + ( b − a ) λ + c = 0
Hence, the value of the constant λ can be
determined from the quadratic equation above. We
consider the following cases.
5. 2
Case (a): [b − a ] − 4ac > 0
In this case, we can find two distinct real values for
as given by
2
− [b − a ] + [b − a ] − 4ac
λ = λ1 =
2a
2
− [b − a ] − [b − a ] − 4ac
λ = λ2 =
2a
Thus, we have two solutions for the Euler-Cauchy
ODE, namely
λ1
y1 = x , y 2 = x λ2
6. Continue…
These solutions are linearly independent, since
y1 x λ1
= λ2 = x λ1 −λ2 ≠ (cons tan t ) (as λ1 ≠ λ2 )
y2 x
For this particular case where λ1 ≠ λ 2 and λ1 a nd λ 2
are real, the general solution of the Euler-Cauchy
λ λ
ODE is given by y = A x 1 + B x 2
where A and B are arbitrary constants.
7. Example 1
Solve the ODE x 2 y"+4 xy'+2 y = 0 subject to
y (1) = y ' (1) = 1
This is an Euler-Cauchy ODE. So try
y=x λ
, y ' = λx λ −1
and y" = λ (λ − 1)x λ −2
Substituting into the ODE, we obtain
x 2 (λ (λ − 1) x λ − 2 ) + 4 x(λ x λ −1 ) + 2 x λ = 0
x λ [λ (λ − 1) + 4λ + 2] = 0
λ (λ − 1) + 4λ + 2 = 0
λ2 + 3λ + 2 = 0
(λ + 1)(λ + 2) = 0
λ = −1, λ = −2
8. Continue…
y = Ax-1 + Bx-2
Where A and B are arbitrary constant.
Differentiating the general solution gives
−2 −3
y ' = − Ax − 2 Bx
Putting the given conditions into the general
solution, we have
y (1) = 1; A+ B =1
y ' (1) = 1; − A − 2 B = 1
9. Continue…
Solving for A and B, we obtain A=3 and B=-2.
The required particular solution is
−1 −2
y = 3x − 2 x
10. 2
Case (b): [b − a ] − 4ac = 0
In this case, the quadratic equation
aλ 2 + (b − a)λ + c = 0 has only one solution.
− [b − a ]
λ = λ1 =
2a
λ
Thus, in trying y = x we manage to find only
one solution for the Euler-Cauchy ODE. We need
two linearly independent solutions to construct the
general solution of the ODE. To find another
solution, let us try
11. Continue…
y ( x ) = x λ1 ⋅ u ( x )
y '( x ) = λ1 x λ1 −1 ⋅ u ( x ) + x λ1 ⋅ u '( x )
y "( x ) = λ1 ( λ1 − 1) x λ1 − 2 ⋅ u ( x ) + 2 λ1 x λ1 −1 ⋅ u '( x ) + x λ1 ⋅ u "( x )
Here, u ( x) is a function yet to be determined.
Substitution into the ODE, we obtain
ax 2 λ1 ( λ1 − 1) x λ1 − 2 ⋅ u ( x) + 2λ1 x λ1 −1 ⋅ u '( x) + x λ1 ⋅ u "( x)
+bx λ1 x λ1 −1 ⋅ u ( x) + x λ1 ⋅ u '( x) + cx λ1 ⋅ u ( x) = 0
12. Continue…
[b − a ]
Since aλ ( λ − 1) + bλ + c = 0 and λ1 = − this further
2a
reduces to
u '( x ) + xu "( x ) = 0
dv
To solve for u ( x) let v ( x ) = u '( x) so that v + x =0
dx
This leads to
dv dx
∫v = −∫
x
1
⇒ ln(v) = − ln( x) = ln
x
1
⇒v=
x
du 1
⇒ =
dx x
⇒ u = ln( x)
13. Continue…
The solution of the Euler-Cauchy ODE which
we are looking for is therefore given by y = x λ1 ⋅ ln ( x )
λ λ
The solutions y = x 1 and y = x 1 ⋅ ln( x ) are linearly
independent to each other.
λ1 λ1
y = Ax + Bx ln( x)
where A and B are arbitrary constants.
14. Example 2
Solve the ODE x 2 y "+ 3 xy '+ y = 0 subject to
y (1) = 1 and y (e) = 2
This is an Euler-CODE. So let us try
y=x , λ
y ' = λx λ −1
, y " = λ ( λ − 1) x λ −2
Substitution into the ODE gives
x λ [λ (λ − 1) + 3λ + 1] = 0
λ ( λ − 1) + 3λ + 1 = 0
λ 2 + 2λ + 1 = 0
2
( λ + 1) =0
λ = −1 is the only solution
15. Continue…
Thus, general solution of the ODE is
y = Ax −1 + Bx −1 ln( x)
Where A and B are arbitrary constants.
Using the given conditions, we have
y (1) = 1; A =1
1 B ln(e)
y (e) = 2; + = 2; B = 2e − 1
e e
The required particular solution is therefore
y = x −1 + ( 2e − 1) x −1 ln( x)
16. 2
Case C: [b − a ] − 4ac < 0
In this case, the quadratic equation
aλ 2 + (b − a )λ + c = 0 has two complex solutions given
by.
2
[b − a ] + i [b − a ] − 4ac
λ = λ1 =−
2a 2a
2
[b − a ] − i [b − a ] − 4ac
λ = λ2 =−
2a 2a
If we proceed on, without bothering about the facts
that λ 1 and λ 2 are complex, we can construct the
general solution of the Euler-Cauchy ODE as
λ1 λ2
y = Ax + Bx
17. Continue…
λ
Our only problem is to interpret what x
means when λ is complex and also to find a way to
calculate this complex power. Once again we can
resort to the theory of complex functions to resolve
this problem. We can use the following results
1 x z + w = x z ⋅ x w if z and w are any numbers (real or
complex) and x is a real number
2 x iy = eiy ln( x ) if x > 0 and y are real numbers
± ix
3 e = cos( x) ± i sin( x) if x is any real numbers
18. Example 3
2
Solve the ODE x y "( x) + 3 xy '( x) + 2 y ( x) = 0
subject to y (1) = y '(1) = 1
λ λ −1
y=x , y ' = λx , y " = λ ( λ − 1) x λ −2
x λ [λ (λ − 1) + 3λ + 2] = 0
λ ( λ − 1) + 3λ + 2 = 0
λ 2 + 2λ + 2 = 0
λ = −1 + i , − 1 − i
−1+ i −1−i
y = Ax + Bx
19. Continue…
y = Ax −1+i + Bx −1−i
Axi + Bx − i
=x −1
= x −1 Aei ln( x ) + Be −i ln( x )
= x −1 A ( cos ( ln( x) ) + i sin(ln( x) ) + B(cos(ln( x)) − i sin(ln( x))
( )
= x −1 [C cos(ln( x)) + D sin(ln( x))]
20. Continue…
where C = A + B and D = i ( A − B ) are arbitrary
constants.
Differentiating, we have
y ' = x −1 −Cx −1 sin ( ln ( x ) ) + Dx −1 cos ( ln ( x ) ) − x −2 C cos ( ln ( x ) ) + D sin ( ln ( x ) )
Using the given conditions, we have
y (1) = 1; C = 1
y '(1) = 1; D − C = 1; D = 2
22. THEORY FOR INHOMOGENEOUS ODEs
Consider the 2nd order linear inhomogeneous
ODE
y "+ f ( x) y '+ g ( x) y = r ( x)
Let y p = y p ( x) be any particular solution of
the inhomogeneous ODE. Then
" '
y + f ( x) y + g ( x) y p = r ( x)
p p
To solve the inhomogeneous ODE, let us make the
substitution
y = y p ( x) + Y ( x)
23. Continue…
On substituting into the ODE, we obtain
"
p
y'p ( x) + Y '( x) + g( x) yp ( x) + Y ( x) = r( x)
y ( x) + Y "( x) + f ( x)
y"p + f ( x) y'p + g( x) yp + Y "+ f ( x)Y '+ g( x)Y = r( x)
r( x) + Y "+ f ( x)Y '+ g( x)Y = r( x)
Y "+ f ( x)Y '+ g( x)Y = 0
Thus, we obtain a 2nd order linear
homogeneous ODE in Y = Y ( x)
24. Continue…
To summarise, assuming that we can find a
particular solution for the 2nd order linear
inhomogeneous ODE and also that we can solve the
homogeneous ODE in for its general solution of the
inhomogeneous ODE is given by
y= y p ( x) + Y ( x)
{
{
a particular solution general solution of the
of in hom ogeneous ODE corresponding hom ogeneous ODE
25. PARTICULAR SOLUTIONS BY
GUESSWORK: Example
Solve the ODE y "( x) + 3 y '+ 2 y = 2 exp(5 x) subject to
y (0) = y '(0) = 0
Firstly let us solve the corresponding homogeneous
ODE
Y "+ 3Y '+ 2Y = 0
This is a 2nd order linear ODE with constant
coefficients. Let us try
Y = eλ x , Y ' = λ eλ x , Y " = λ 2 eλ x
26. Continue…
Then, substitution into the homogeneous ODE
Gives
λ 2 + 3λ + 2 = 0
( λ + 1)( λ + 2 ) = 0
λ = −1, − 2
The general solution of the homogeneous ODE is
Y = Ae− x + Be−2 x
27. Continue…
Now, to construct the general solution of the
inhomogeneous ODE y "( x) + 3 y '+ 2 y = 2exp(5x) we
need to find one particular solution of the ODE. We
will try to look for one by guesswork. The right
hand side of the ODE, namely the term 2 exp(5 x )
suggests that we try a particular solution of the
Form
y p = α exp(5 x)
where the constant α is to be selected to satisfy the
ODE
28. Continue…
Differentiating, we have
"
y p ' = 5α exp(5 x), y = 25α exp(5 x)
p
Substituting into the ODE, we obtain
25α exp(5 x) + 15α exp(5 x) + 2α exp(5 x) = 2 exp(5 x)
⇒ 42α exp(5 x) = 2 exp(5 x)
1
⇒α =
21
1
Hence, y p = exp(5 x ) is a particular solution of the
21
inhomogeneous ODE.
29. Continue…
The general solution of the inhomogeneous
ODE is 1
y = exp(5 x ) + Ae − x + Be − 2 x
21
5
y' = exp(5 x ) − A exp(− x) − 2 B exp( −2 x)
21
1
y (0) = 0; A+ B = −
21
5
y '(0) = 0; A + 2B =
21
2 1
B= and A = −
7 3
1 1 2
y = exp(5 x) − exp(− x) + exp(−2 x)
21 3 7
30. Prepared By
Annie ak Joseph
Prepared By
Annie ak Joseph Session 2008/2009