Tema 6
Tema 6
Tema 6
The order of an ordinary differential equation is the largest derivative n in the equation
F ( x, y, y0 , . . . , y(n ) = 0.
Similar to the first order case, it is possible to prove that the Cauchy problem has only one
∂f ∂f ∂f
solution if f is continuous and all the partial derivatives ∂y , ∂y0 , …, ∂y(n−1 are continuous.
Equations of the form F(x, y(k , y(k+1 , . . . , y(n ) = 0. We make the change to the variable
u = y(k .
c1 x3
y0 = u = x2 + =⇒ y = + c1 ln x + c2
x 3
1
Equations in the form F(y, y0 , y00 , . . . , y(n ) = 0. The independent variable does not ap-
pear. Let’s consider the function: p(y) = y0 , then we have
y0 = p
dp dp dy dp
y00 = = =p
dx dy dx dy
2
dy00 dy00 d2 p d2 p
000 dp dp dp
y = = p= +p 2 p= p + p2 2
dx dy dy dy dy dy dy
..
.
Example 1.2. The second order ODE y00 + (y0 )2 = 2y0 e−y changes to
dp dp
p + p2 = 2pe−y =⇒ + p = 2e−y (First order linear)
dy dy
with solution
ey
Z
0 −y
p = y = (2y + c1 )e =⇒ dy = x + c2
2y + c1
Note: We don’t know how to calculate last integral.
2
2 Linear Ordinary Differential Equations
A linear ODE of order n is
a 0 ( x ) y ( n + a 1 ( x ) y ( n −1 + · · · + a n −1 ( x ) y 0 + a n ( x ) y = p ( x ) (1)
where a0 ( x ), a1 ( x ), . . . , an ( x ) and p( x ) are functions of x (independent of y). If p( x ) = 0
then it is a homogeneous linear ODE.
Boundary Problems
Sometimes a type of problems different to the initial values problems might be interesting.
It is said that a differential equation involves a boundary problem if it is of the form:
a 0 ( x ) y ( n + a 1 ( x ) y ( n −1 + · · · + a n −1 ( x ) y 0 + a n ( x ) y = p ( x )
0 ( n −1 ( x
α1,1 y( x0 ) + α1,2 y ( x1 ) + · · · + α1,n y n −1 ) = β 1
. (3)
..
α y ( x ) + α y 0 ( x ) + · · · + α y ( n −1 ( x ) = β
n,1 0 n,2 1 1,n n −1 n
where the n values x0 , x1 , . . . , xn−1 are in the domain of the solutions y and αi,j , β i are con-
stants.
A boundary problem could have no solution or unique or several or infinity solutions.
Example 2.2. It is easy to check that the lineal equation x 00 + 16x = 0 has as general solution
the family
x (t) = c1 cos 4t + c2 sin 4t
with c1 , c2 arbitrary real numbers. The following boundary problems have different solu-
tions.
(
x 00 + x 0 = 0
1. has infinity solutions.
x (0) = 0, x π2 = 0
(
x 00 + x 0 = 0
2. has unique (trivial) solution.
x (0) = 0, x π8 = 0
(
x 00 + x 0 = 0
3. has no solution.
x (0) = 0, x π2 = 1
3
3 General Solution for a Linear ODE
The adjective linear comes from the fact that the solutions of a homogeneous equation form
a vector subspace of the vector space of (sufficiently) derivable functions.
Proposition 3.1. If y1 , y2 , . . . , yk are solutions of the homogeneous linear differential equation
a0 ( x )y(n + a1 ( x )y(n−1 + · · · + an−1 ( x )y0 + an ( x )y = 0, then any linear combination of these
∑ik=1 ci yi is another solution.
Proof. Straight from the linearity of the derivatives.
Solutions of the non homogeneous linear ODEs are obtained by translation of the sub-
space of solutions of the associated homogeneous equation.
Proposition 3.2. Let y p be a particular solution of a linear differential equation (1),
a 0 ( x ) y ( n + a 1 ( x ) y ( n −1 + · · · + a n −1 ( x ) y 0 + a n ( x ) y = p ( x ),
y00 + a( x )y0 + b( x )y = 0.
c1 y1 ( x0 ) + c2 y2 ( x0 ) = y0
c1 y10 ( x0 ) + c2 y20 ( x0 ) = y00
and this system has a unique solution when the following determinant, called Wronskian,
is non-zero
y1 ( x0 ) y2 ( x0 )
W (y1 , y2 )( x0 ) = 6= 0.
y10 ( x0 ) y20 ( x0 )
y1 ( x ) y2 ( x )
The pair of two non-zero solutions y1 , y2 such that W (y1 , y2 ) = 6= 0 is
y10 ( x ) y20 ( x )
called Fundamental System of Solutions.
4
Proposition 3.3. {y1 , y2 } is a fundamental system of solutions if and only if they are linearly inde-
pendent.
y20 y0
W (y1 , y2 ) = 0 =⇒ y1 y20 − y2 y10 = 0 =⇒ = 1 =⇒ y2 = ky1
y2 y1
For all the above reasons, if {y1 , y2 } is a fundamental system of solutions of a second
order homogeneous linear ODE, then the general solution is
y = c1 y1 + c2 y2 , with c1 , c2 constants.
Example 3.4. The homogeneous linear equation x2 y00 − 2xy0 + 2y = 0 has solutions y = x,
y = x2 . The Wronskian
x x2
W ( x, x2 ) = = x2
1 2x
is not zero. Therefore { x, x2 } is a fundamental system of solutions and the general solution
is y = c1 x + c2 x2 .
the polynomial λ2 + aλ + b is called Characteristic polynomial. We know that there are always
two complex roots r, s (which may be the same or different).
Theorem 3.5. Let r, s be the roots of the characteristic polynomial of the homogeneous linear equation
y00 + ay0 + by = 0, then
2. If r is the unique (double) solution, then {erx , xerx } is a fundamental system of solutions.
Proof. In the first case, function erx is solution (similar to esx ), because, for example
erx esx
W (erx , esx ) = = ( s − r ) e (r + s ) x 6 = 0
rerx sesx
5
In the second case, xerx is solution
( D − r )2 ( xerx ) = ( D − r )(
xre
rx
+ erx −
rxe
rx
) = rerx − rerx = 0
and
erx xerx 1 x
W (erx , xerx ) = = e2rx = e2rx 6= 0,
rerx rx
xre + e rx r xr + 1
which prove the theorem.
From what we have seen so far, the general solution is as follows
y = c1 erx + c2 esx or y = (c1 + c2 x )erx .
Corollary 3.6. In case of non real roots α ± iβ, the set {eαx cos βx, eαx sin βx } is a fundamental
system of solutions.
Example 3.7 (Simple Harmonic Motion). It is typified by the motion of a mass m in a spring
when it is subject to a linear elastic restoring force F given by Hooke’s Law F = −kx, being
k a constant that depends on spring and x the distance on time t.
y = L cos ωt
Idle state
2π
T= 2T
L ω
−L
m
The equation is
mx 00 (t) = −kx (t)
which is a homogeneous linear ODE of second
order.q q
The characteristic polynomial λ + m = λ − i mk
2 k
λ + i mk = (λ − iω )(λ +
q
iω ), where ω = mk . So the solution is
x (t) = c1 cos ωt + c2 sin ωt
Considering the initial conditions x (0) = L and vi = x 0 (0) = 0, then
(
L = c1 cos 0 + c2 sin 0
=⇒ c1 = L, c2 = 0.
0 = −c1 ω sin 0 + c2 ω cos 0
Hence
x (t) = L cos ωt,
3.3 Second order non homogeneous linear ODEs with constant coefficients
As can be seen from the proposition 3.2, if the general solution yh of the associated homo-
geneous equation is known, then for the solution of the non-homogeneous linear equation
y00 + ay0 + by = p( x )
we need to find a particular solution y p . So the general solution is
y = y p + yh .
There are several methods for finding a particular solution, but only will be seen two of
them.
6
Indeterminate coefficients method.
It consists of searching for a particular solution ‘similar’ to the function p( x ), trying to find
some undefined coefficients. For example, if p( x ) is a second degree polynomial, we will
look for another polynomial of degree 2 (maybe higher) y p = Ax2 + Bx + C with indeter-
minate coefficients A, B, C.
Example 3.8. For solving the equation y00 + 3y0 + 2y = x, first we find a general solu-
tion for the associated homogeneous through the characteristic polynomial λ2 + 3λ + 2 =
(λ + 1) (λ + 2), then
yh = c1 e− x + c2 e−2x .
For finding a particular solutions, we suppose y p = Ax + B (because ( x ) is a polynomial of
first grade). So
( Ax + B)00 + 3( Ax + B)0 + 2( Ax + B) = x
3A + 2Ax + 2B = x
A = 12
2A = 1
=⇒
3A + 2B = 0 B = − 34
1 2
y = y p + yh = x − + c1 e− x + c2 e−2x .
2 4
You should know that sometimes it is not possible to find particular solutions in the
same form as p( x ).
Example 3.9. Equation y00 + y0 = x has not particular solution as a polynomial of first
order Ax + B
( Ax + B)00 + ( Ax + B)0 = x =⇒ B = x
Therefore
1 2
y= x − x + c1 e − x + c2
2
is the general solution.
Table 1 gives a list of proposed particular solutions depending the second term p( x ) in
the non homogeneous linear equations.
7
Table 1: Pm ( x ) and Qm ( x ) represent polynomials of grade m.
Now we look for a certain solution y p = xe x ( Ax2 + Bx + C ) according to the above Table 1,
and
x3 2x2 8x
√
y = y p + yh = − + + c1 e x + c2 e − x
9 9 27
Remark. This method does not work with equations where the independent term is a func-
tion such as
1
ln x, , tan x, arccos x, etc.
x
.
To make the second derivative of y p , we don’t want to involve the second derivatives of
functions C1 and C2 , hence impose
y00p = (C1 y10 + C2 y20 )0 = (C1 y100 + C10 y10 ) + (C2 y200 + C20 y20 ).
8
Now applying y p is solution, we have
(C1 y100 + C10 y10 ) + (C2 y200 + C20 y20 ) + a C1 y10 + C2 y20 + b(C1 y1 + C2 y2 ) = p( x )
C1 (y100 + ay10 + by1 ) +C2 (y200 + ay20 + by2 ) +C10 y10 + C20 y20 = p( x )
| {z } | {z }
=
0 0
C10 y10 + C20 y20 = p( x ) (5)
C10 y1 + C20 y2 = 0
which has solution because Wronskian W (y1 , y2 ) 6= 0. Last, making integration we obtain
C1 and C2 , thus y p .
Best way to understand this method, as usually, is solving exercises.
Example 3.11. We are going to use this method of variation of constants to solve the same
2
problem that Exercise 3.10, 2y00 − y0 − y = x2 e x .
1
By characteristic polynomial, yh = c1 e x + c2 e− 2 x . The particular solution y p = C1 e x +
1
C2 e− 2 x , gives the linear system
1
C10 e x + C20 e− 2 x = 0
)
1 2
C10 e x + C20 − 12 e− 2 x = x2 e x
1
ex e− 2 x 1 12 x 1 3
√
with Wronskian W = 1 = − e − e 2x = − e x . Cramer’s method for
2 2
e x − 2 e− 2 x
1
9
Example 3.12 (Application of Fourier Series. RLC circuit).
∂2 q ∂q 1
L + R + q = E(t)
∂t2 ∂t C
With the notation we have seen in the previous chapter, we express this equation of the
form ax 00 + bx 0 + cx = f (t) with a, b, c positive real numbers. Solutions x = x p + xh of this
EDO are depending of the roots λ1 , λ2 of characteristic polynomial aλ2 + bλ + c, then
1. λ1 6= λ2 are negative real numbers and xh = k1 eλ1 t + k2 eλ2 t .
y ( n ) + a 1 ( x ) y ( n −1) + · · · + a n ( x ) y = p ( x )
y1 y2 . . . yn
y10 y20 . . . y0n
W ( y1 , y2 , . . . , y n ) =
... ...
6= 0
(n) (n) (n)
y1 y2 . . . yn
10
If {y1 , y2 , . . . , yn } is a fundamental system of solutions of a homogeneous linear ODE,
then the general solution is
y = c1 y1 + c2 y2 + · · · + cn yn , with ci constants.
y = c1 e2x + c2 e−2x + c3 e x + c4 e− x .
Example 4.4. Find the general solution of y(4) − 2y000 + 2y00 − 2y0 + y = 0.
The characteristic polynomial is p(λ) = λ4 − 2λ3 + 2λ2 − 2λ + 1 = (λ − 1)2 (λ2 + 1).
It has a real doble roots r1 = 1 and two non real simple roots r2 = i, r3 = −i, then the
general solution is
11
4.2 Non homogeneous linear ODEs with constant coefficients
A particular solution is solved in a similar way as the case of second-order equations. Meth-
ods of indeterminate coefficients and variation of constants are valid for equations of order
higher than two.
5 Cauchy-Euler Equation
As we have seen, linear equations with constant coefficients all have a solution method. Linear
equations with variable coefficients (functions), on the other hand, have no method for solving them,
and some of them are even integrated by series expansion. An exception to this fact are the so-called
Cauchy-Euler equations:
Definition 5.1. A Cauchy-Euler equation is a linear ODE of the form:
a0 x n y(n + a1 x n−1 y(n−1 + · · · + an−1 xy0 + an y = p( x ),
with a0 , a1 , . . . , an are constants real numbers.
To solve them, as we saw above, we make use of the associated homogeneous equation
a0 x n y(n + a1 x n−1 y(n−1 + · · · + an−1 xy0 + an y = 0.
According to the theorem 2 on page 3, no unique solution is guaranteed in intervals in which a0 x n =
0, so we will seek solutions in the interval (0, inf).
We are going to describe a method for second order equations. Higher order ones are solved in
similar way.
To determinate a solution for
ax2 y00 + bxy0 + cy = 0 (6)
To find a solution of the form y = xm ,
where m is a number just to be determined, we substitute into
the equation for obtaining the auxiliary polynomial equation
a m (m − 1) x m + b mx m + cx m = 0 =⇒ a m2 + (b − a)m + c x m = 0 ∀ x, then
a m2 + ( b − a ) m + c = 0
and its solutions, r and s, determinate the fundamental system of solutions.
Proposition 5.2. Considering the homogeneous second order equation (6) and r, s roots of the auxiliary poly-
nomial
p(λ) = aλ2 + (b − a)λ + c
we have the following cases:
1. r 6= s: Then { xr , x s } is a fundamental system. In case of non real solution r, s = α ± iβ, then a
fundamental system is { x α cos( β ln x ), x α sin( β ln x )}.
2. r = s: Then { xr , xr ln x } is a fundamental system.
Proof.
1. For proving that { xr , x s } is a fundamental system only check that the Wronskian
xr xs
W ( xr , x s ) = = (s − r ) xr+s−1 6= 0.
rxr−1 sx s−1
It is obvious c1 xr + c2 x s are solutions of (6), and moreover is r, s are not real, then x α±iβ =
x α e±iβ ln x , β 6= 0, therefore
c1 x α+iβ + c2 x α−iβ = c1 x α (cos( β ln x ) + i sin( β ln x )) + c2 x α (cos( β ln x ) − i sin( β ln x ))
= (c1 + c2 ) x α cos( β ln x ) + (c1 i − c2 i ) x α sin( β ln x )
= k1 x α cos( β ln x ) + k2 x α sin( β ln x )
12
−b . We let as an exercise to check that y = x r ln x is
2. From (b − a)2 = 4ac, the root is r = a2a
another solution of (6) and the Wronskinano W ( xr , xr ln x ) 6= 0.
λ2 + 4λ + 4 = (λ + 2)2
c1 + c2 ln x
y = c1 x −2 + c2 x −2 ln x = , for x > 0.
x2
The boundary conditions give us the algebraic equations
(
c1 + c2 0
12
=1
c1 + c2 1
e2
=0
1 − ln x
y= .
x2
λ3 + 2λ2 + 4λ + 8 = (λ + 2)(λ2 + 4)
x2 y00 − 4xy0 = x6 .
13
The associated homogeneous is solved from the auxiliary polynomial p(λ) = λ2 − 5λ = λ(λ − 5),
therefore
yh = c1 + c2 x5 , for x > 0.
In the order hand, as for x>0suming y p = C1 ( x ) + C2 ( x ) x5 , and the equivalent equation
4 0
y00 − y = x4
x
we need to solve the following system
( ( 5
( 6
C10 + C20 x5 = 0 C10 = − x5 x
C1 = − 30
=⇒ =⇒
C10 · 0 + 5C20 x4 = x4 C20 = 15 x
C2 = 5
x 6 x6 x6
and so y p = − 30 + 5 = 6 . Finally
x6
y = c1 + c2 x 5 + , for x > 0.
6
y = c1 xr + c2 x s = c1 er ln x + c2 es ln x ,
and it suggests the change of variable t = lnx ⇐⇒ x = et for x < 0. This change turns the
Cauchy-Euler equation into a constant coefficients one.
14
Exercises
Exercise 1
Reduce the order and solve, if possible, the following differential equations:
a) y00 = (y0 )2 − y(y0 )3 . b) y000 = (y00 )2 .
1
c) x2 y00 = (y0 )2 − 2xy0 + 2x2 . d) y(5 − y(4) = 0.
x
e) y00 − y0 tan x = 1
2 sin 2x. f) yy − (y0 )2 = 6xy2 .
00
Solutions:
y2
a) y = −c1 e−y + 2 − y = x + c2 . b) y = − (c1 + x ) ln (c1 + x ) + x + c2 x + c3 .
x2 ln(c1 x −1) x c2 3 c3 2
c) y = 2 − c21
− c1 + c2 . d) y = c1 e x + 6x +
+ c4 x + c5 .
2x
Exercise 2
The non-free fall of a solid through a fluid (e.g. air) with friction can be modelled by the
differential equation
mx 00 = mg − kx 0
where x = x (t) is the height of the solid as a function of time and constants: m is the mass
of the solid, g is gravity and k > 0 is a constant that depends on the fluid.
a) Calculate the function x assuming the solid starts from rest, x 0 (0) = 0, and height
x (0) = h.
b) What can you say about the falling speed x 0 as time t goes to infinity?
Solutions:
kt
gm2 e− m gmt g m2 gm
a) x = k2
+ k +h− k2
. b) v f = k .
Exercise 3
Answer the questions in the exercise 2 above if friction is proportional to the square of ve-
locity:
my00 = mg − k (y0 )2 .
Remark: This happens when the solid is heavy enough and fluid turbulence occurs.
Hint: Transform the equation to express it as a Riccati equation.
Exercise 4
Find the differential equation having as a set of solutions:
a) y = Ce x + De2x . b) yeCx = 1. c) y = Ax2 + Bx + C + D sin x + E cos x.
Exercise 5
Let {e x , cos x, sin x } be a fundamental system of solutions of a homogeneous linear dif-
ferential equation. Find the particular solution that satisfies the initial conditions y(0) =
3, y0 (0) = 4, y00 (0) = −1.
15
Exercise 6
All roots of characteristic polynomial of a higher order linear ODE are:
Exercise 7
Find the general solution of the ODE
Exercise 8
Integrate the following ODEs:
1
a) y00 − 3y0 + 2y = ( x2 + x )e2x . b) y00 + 3y0 + 2y = .
1 + ex
c) y(4) − y000 − 3y00 + 5y0 − 2y = 0. d) 2y00 + y0 − y = 0 con y(0) = y0 (0) = 1.
e) y00 − 2y0 + y = ln x. f) y00 + 5y0 + 6y = 3e−2x .
g) y000 + y0 = tan x.
h) y(4) − y = 8e x con y(0) = −1, y0 (0) = 0, y00 (0) = 1, y000 (0) = 0
Solutions:
a) y = 1 3
3x − 12 x2 + x + c2 e2x + c1 e x . b) e− x ln (e x + 1) + e−2 x ln (e x + 1) − e− x .
x
e− x
c) y = (c1 + c2 x + c3 x2 )e x + c4 e−2x . d) y = 4e2
3 − 3 . e) —
f) y = (3x + c1 )e−2x + c2 e−3x .
(sin x +1) ln(sin x +1)−sin x −1 sin x −1) ln(sin x −1)−sin x +1
g) y = − 2 +( 2 + c1 sin x − c2 cos x.
h) y = 2 sin x + cos x + (2x − 3)e x + e− x .
Exercise 9
Find the general solution of the Cauchy-Euler ODE x2 y00 − xy0 − 3y = 5x4 ,
Solution: y = x4 + c1 x3 + c2 1x .
Exercise 10
Solve the third order equation with initial conditions:
(
y000 = 3yy0
y(0) = 1, y0 (0) = 1, y00 (0) = 32 .
Solution: y = (2−4x)2 .
16