Mathematical Methods: 1 Ordinary Differential Equations (ODE's)
Mathematical Methods: 1 Ordinary Differential Equations (ODE's)
Lecture 6.
20/10-2008
We fix c by using initial conditions, like f (x0 ) = y0 . For a first order equation, we need only
one: Solution space is one-dimensional.
Z Z
y ′′ = f (x) → y(x) = f (x)dx + c1 dx + c2 .
We fix c1,2 by using initial conditions, like y(x0 ) = y0 , y ′ (x0 ) = c0 . For second order equations,
we need two: Solution space is two-dimensional.
Sometimes, we can separate the variables
Z Z
′
g(y)y = f (x) → g(y)dy = f (x)dx + c.
1
1.2 Total derivatives
The equation
∂u ∂u
f1 (y, x) = , f2 (y, x) = ,
∂x ∂y
du(y, x) = 0 → u(y, x) = c.
Sometimes, the equation is not a total differential, but can be made to be one by multiplying
by a function F (x, y), known as a integrating factor.
Ex.
dy y dx y c
x dy − y dx = 0 → F (x) = 1/x2 → − 2 =0 → u(y, x) = a =c → y= x.
x x x a
y ′ + f (x)y = r(x).
f (x) and r(x) are assumed to be known analytic functions. If r(x) = 0 we speak of a homoge-
neous differential equation.
First order linear differential equations always have solutions (Theorem!), and the solution
space is one-dimensional. Hence any solution can be written as
where y1 (x) is one solution, for some a determined from a boundary condition. In the homo-
geneous case, we have by separation of variables
dy
Z
y ′ + f (x)y = 0 → = −f (x)dx → ln |y| = − f (x)dx + c
y
which becomes
R
f (x)dx
y(x) = c e .
y ′ + f (x)y = r(x),
2
we assume an integrating factor F depending only on x. By cross differentiation and separation
of variables we get
dF
R
F (x)(f y − r)dx + F (x)dy = 0 → F f = → F (x) = e f (x)dx
dx
Then we use the integrating factor
R ′ R R
ye f (x)dx = e f (x)dx
(y ′ + f y) = e f (x)dx r(x) →
R Z R
− f (x)dx f (x)dx
y(x) = e e r(x)dx + c
Ex.
Z
2x x −x 2x
′
y −y =e → y(x) = e e e dx + c = c ex + e2x .
We can
R write this differently, starting with the solution to the homogeneous equation v(x) =
exp( f (x)dx) and write for the inhomogeneous solution (for some u(x) we then need to solve
for)
Then
Z
r(x) r(x)
Z
u(x) = dx + c → y(x) = u(x)v(x) = v(x) dx + c
v(x) v(x)
always have solutions (Theorem!), and the solution space is two-dimensional. Hence we can
find two linearly independent solutions y1 (x) and y2 (x).
For the homogeneous case r(x) = 0, any solution can be written as a linear combination of the
two,
y ′′ + ay ′ + by = 0,
3
The eigenvalues λ± may be complex, but then they are complex conjugate. If λ− 6= λ+ , we
have two linearly independent solutions, and we write the general solution as
If λ− = λ+ , the solutions are not linearly independent, and we need another solution to span
the solution space. By variation of parameters (using the ansatz y2 (x) = u(x)y1 (x)), we find
that this is given by y2 (x) = xeλ± x , and so the general solution is
Ex.
y ′′ + y ′ − 2y = 0 → λ2 + λ − 2 = 0 → λ± = 1, −2
so that
y(x) = c1 ex + c2 e−2x .
Ex.
y ′′ + 8y ′ + 16y = 0 → λ2 + 8λ + 16 = 0 → λ± = −4,
In the inhomogeneous case r(x) 6= 0, we construct the general solution from the solution to the
homogeneous equation,
then we have
y2 (x)r(x) y1 (x)r(x)
Z Z
y(x) = yp (x) + yh (x), yp (x) = −y1 (x) dx + y2 (x) dx,
W (x) W (x)
W is the Wronskian W (y1 , y2 ) = y1 y2′ − y2 y1′ , which is non-zero if y1,2 are linearly independent.
Ex.
y ′′ + y = sec(x)
Z Z
yp (x) = − cos(x) sin(x) sec(x)dx + sin(x) cos(x) sec(x)dx = cos(x) ln | cos(x)| + x sin(x).
4
1.5 Existence and uniqueness
Theorem: If the coefficient functions fn (x) are continuous on an open interval I, then the
linear homogeneous n’th order equation
All the solutions (with different initial conditions) are linear combinations of precisely n linearly
independent solutions, and any linear combination of these is a solution. In other words, the
solution space is an n dimensional vector space, spanned by the basis yi , i = 1, .., n.
Plugging this into (1), as well as similar power series for f (x), g(x) and r(x), we can solve for
each coefficient cm by equating coefficients of xm order by order.
Ex.
X X
y′ − y = 0 → ncn xn−1 − cm xm = 0.
Matching powers
X xn
ncn = cn+1 → y(x) = c0 = c0 e x .
n!
c0 is given by the initial conditions.
1.6.1 Convergence
• If a power series converges for all x with |x| < R, R is said to be its radius of convergence.
This can be found from
1
= lim |cm |1/m ,
R m→∞
1 cm+1
= lim | |.
R m→∞ cm
• A power series retains its radius of convergence upon differentiation and integration term
by term.
• The sum and product of two power series is convergent in the region where they are both
convergent.
5
1.7 Frobenius method
Simple power series don’t always work. The equation of the form
a(x) ′ b(x)
y ′′ + y + 2 y = 0,
x x
has at least one solution of the form
∞
X
r
y(x) = x cm xm ,
m=0
r2 + (a0 − 1)r + b0 = 0,
where a0 and b0 are the first coefficients of the power series for a(x) and b(x), respectively.
This equation has two roots, r1 and r2 . The simplest case is when a(x) = a0 and b(x) = b0 are
just constants. Then the solution is of the form y(x) = xr , and the differential equation is a
Cauchy equation.
Otherwise, three distinct cases can occur:
• If r1 6= r2 and r1 − r2 is not an integer, the two independent solutions come from plugging
r1 and r2 into the power series equation.
∞
X ∞
X
y1 (x) = xr1 cm xm , y2 (x) = xr2 dm xm .
m=0 m=0
Then put these expressions back into the differential equation and solve for all the cm
and dm .
• If r1 = r2 only one solution is found from plugging back into the power series equation.
The second independent solution is of the form
∞
X ∞
X
y1 (x) = xr cm xm , y2 (x) = y1 (x) ln(x) + xr dm xm .
m=0 m=0
Then put these expressions back into the differential equation and solve for all the cm .
• If r1 6= r2 and r1 − r2 is an integer, y2 (x) instead follows from plugging r1 into the power
series equation and
∞
X ∞
X
y(x) = xr1 cm xm , y2 (x) = ky1 (x) ln(x) + xr2 em xm ,
m=0 m=0
for some k which may be zero. Then put these expressions back into the differential
equation and solve for all the cm and k.
(Note that case 2) is just case 3) for r1 − r2 = 0).
What does it mean? Only the simplest non-linear differential equations are tractable. The
linear ones are much simpler. Use any of the tools above. If all else fails, use a powers series. If
the coefficient functions are analytic, positive, integer powers, then so is the solution. Otherwise,
in the special Frobenius case, we can use one non-integer power.
6
2 Orthogonal polynomials
The set of functions defined on (a subset of) the real axis can be thought of as a vector space,
with the obvious composition rules
f (x) = 0,
Consider in particularly the space of functions that are square integrable over an interval [a, b]
Z b
dx|f (x)|2 < ∞,
a
(the completion of) which is denoted as L2 [a, b]. We can define the inner product
b
1
Z
(f, g) = dxf ∗ (x)g(x),
b−a a
In the case b = −a = ∞ the prefactor, we use 1/(b − a) → 1/(2π). If (f, g) = 0, the functions
are said to be orthogonal. As for any vector space, individual vectors can be written as a linear
combination of a set of linearly independent basis vectors hi . It is particularly useful to have a
set of orthogonal, or even orthonormal basis vectors ei . We can then write for any f (x)
X
f (x) = ai ei (x),
i
where ai are complex coefficients. This is known as a generalized Fourier series for f . We have
ai = (f, ei ).
as can be easily checked for a finite-dimensional space, where it is the generalisation of Pythago-
ras theorem.
A (complete) inner product space is called a Hilbert space, a crucial concept in quantum
mechanics. In fact L2 [a, b] is the space of wavefunctions ψ(x) defined on some interval [a, b]. This
can of course be generalised to functions on, say, three-dimensional spaces. And to infinitely
many degrees of freedom, as in quantum field theory.
7
We can generalize by defining orthogonality of real functions f, g with respect to a given weight
function p(x),
Z b
1
(f, g) = dx p(x)f (x)g(x) = 0
b−a a
What does is meant? We should think of functions as vectors in a vector space, with an
inner product, from which we can define norms, orthogonality and linear independence. In
particular, we can look for a basis of vectors on which we can expand all functions (of the type
we are interested in).
8
2.2.2 Bessel functions
With p(x) = x, q(x) = −ν 2 /x, r(x) = x we get Bessels equation,
x2 y ′′ + xy ′ + (x2 − ν 2 )y = 0.
ν is a real positive number. We plug in (1) And get the indicial equation
(r + ν)(r − ν) = 0
For r1 = ν > 0 we have the Bessel function of the first kind of order ν,
∞
X (−1)m x2m
Jν (x) = xν
m=0
22m+ν m!Γ(ν + m + 1)
It converges for all x. Similary we define J−ν (x). If ν is not integer, the two are linearly
independent, and a complete solution to Bessels equation is (for some a, b)
y(x) = aJν (x) + bJ−ν (x).
If ν is integer, the two are not linearly independent, and we define instead Bessels functions of
the second kind of order ν
1
Yν (x) = [Jν (x) cos(νπ) − J−ν (x)] .
sin(νπ)
The complete solution to Bessels equation is now
y(x) = aJν (x) + bYν (x).
For real values of x we can also define complex-valued Bessel functions of the third kind (first
and second Hankel function)
Hν1 (x) = Jν + iYν (x),
Hν2 (x) = Jν − iYν (x).
Bessel functions are orthogonal with respect to the weight function p(x) = x.
9
2.2.5 Hermite polynomials
2 2
/2 /2
With r(x) = e−x , p(x) = e−x , q(x) = 0 and λ = n we get Webers/Hermites equation
y ′′ − xy ′ + ny = 0.
The solutions
n −x2 /2
2
/2 d (e )
He0 = 1, Hen (x) = (−1)n ex ,
dxn
2
are orthogonal on ] − ∞; ∞[ with respect to the weightfunction p(x) = e−x /2 . (Note that
2 2
Mathematica has a different definition with e−x instead of e−x /2 . So there are factor of 2
running around.)
10