






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Differential Equations with their classification are discussed in this lecture.
Typology: Lecture notes
1 / 12
This page cannot be seen from the preview
Don't miss anything!
A differential equation is an equation relating an independent variable, e.g. t, a dependent variable, y, and one or more derivatives of y with respect to t:
dx dt
= 3x y^2
dy dt
= et^
d^2 y dx^2
dy dx
In this section we will look at some specific types of differential equation and how to solve them.
We can classify our differential equation by four properties:
Ordinary
An Ordinary Differential Equation or ODE has only one independent variable (for example, x, or t). The alternative (with more than one) is called a partial differential equation and will not be covered in this course.
Linearity
A differential equation is linear if every term in the equation contains none or exactly one of either the dependent variable or its derivatives. There are no products of the dependent variable with itself or its derivatives. Each term has at most one power of the equivalent of x or ˙x or ¨x or... ; or f (x) and its derivatives.
Examples:
f (x)
df dx
= −ω^2 x is not linear
df dx
= f 3 (x) is not linear
d^2 f dx^2
= −x^2 f (x) + ex^ is linear.
Constant coefficients
A differential equation has constant coefficients if the dependent variable and all the derivatives are only multiplied by constants.
Examples: which have constant coefficients?
df dx
= −ω^2 x: yes
d^2 f dx^2
= −x^2 f (x) + ex: no
d^2 f dx^2
df dx
Finally, a “trick” one:
3 ex^ df dx
Order
The order of a differential equation is the largest number of derivatives (of the dependent variable) ever taken.
Examples:
f (x)
df dx
= −ω^2 x is 1st order
d^2 f dx^2
= −x^2 f (x)+ex^ is 2nd order
d^2 f dx^2
d^2 f dx^2
df dx
= 0 is 2nd order.
First the general theory. A first order linear differential equation for y(x) must be of the form
dy dx
If there is something multiplying the dy/dx term, then divide the whole equation by this first.
Now suppose we calculate an integrating factor
I(x) = exp
p(x) dx
Just this once, we won’t bother about a constant of integration.
We multiply our equation by the integrating factor:
I(x)
dy dx
and then observe that
d dx (yI(x)) =
dy dx I(x) + y
dI dx
dy dx I(x) + yp(x)I(x)
which is our left-hand-side. So we have the equation
d dx
(yI(x)) = I(x)q(x)
which we can integrate (we hope):
yI(x) =
I(x)q(x) dx + C
y =
I(x)
I(x)q(x) dx +
I(x)
We sort out the constant C from the initial conditions at the end.
which we can integrate by parts:
x^2 y = −x cos x +
cos x dx + C = −x cos x + sin x + C
so the general solution is
y = −
cos x x
sin x x^2
x^2
Finally, we use the initial condition y = 0 when x = π/2 to get
cos (π/2) (π/2)
sin (π/2) (π/2)^2
(π/2)^2
(π/2)^2
(π/2)^2
which means C = −1 and our solution is
y = − cos x x
1 − sin x x^2
This time we will solve two different differential equations in parallel.
dy dx
df dx
In this example, we don’t actually have variable coefficients – but that just makes it easier!
In both cases, I(x) = exp
3 dx = e^3 x.
e^3 x^
dy dx
df dx
d dx
e^3 xy
= ex^ and
d dx
e^3 xf
e^3 xy = ex^ + C 0 and e^3 xf = x + C 1. y = e−^2 x^ + C 0 e−^3 x^ and f = xe−^3 x^ + C 1 e−^3 x.
A homogeneous linear equation is one in which all terms contain exactly one power of the dependent variable and its derivatives:
e.g.
d^2 y dx^2
dy dx
For these equations, we can add up solutions: so if f (x) is a solution and g(x) is a solution:
d^2 f dx^2
df dx
d^2 g dx^2
dg dx
then so is af (x) + bg(x) for any constants a and b:
d^2 dx^2
[af (x) + bg(x)] + 5
d dx
[af (x) + bg(x)] + 6[af (x) + bg(x)] = 0.
An nth order homogeneous linear equation will “always” (i.e. if it is well-behaved: don’t worry about this detail) have exactly n independent solutions y 1 ,... , yn and the general solution to the equation is
y = c 1 y 1 + c 2 y 2 + · · · + cnyn.
Suppose we are given a differential equation in which the coefficient of the rth derivative is a constant multiple of xr^ :
e.g. x^2
d^2 y dx^2
dy dx
− 6 y = 0.
Then if we try a solution of the form y = xm^ we get
y = xm^
dy dx
= mxm−^1
d^2 y dx^2
= m(m − 1)xm−^2
and if we put this back into the original equation we get
x^2 m(m − 1)xm−^2 + 2mxxm−^1 − 6 xm^ = 0 xm(m(m − 1) + 2m − 6) = 0 xm(m^2 + m − 6) = 0.
Now xm^ will take lots of values as x changes so we need
(m^2 + m − 6) = 0 =⇒ (m − 2)(m + 3) = 0.
In this case we get two roots: m 1 = 2 and m 2 = −3. This means we have found two functions that work as solutions to our differential equation:
y 1 = xm^1 = x^2 and y 2 = xm^2 = x−^3.
But we know that if we have two solutions we can use any combination of them so our general solution is y = c 1 x^2 + c 2 x−^3.
This works with an nth order ODE as long as the nth order polynomial for m has n different real roots.
x^2
d^2 y dx^2
− 6 x
dy dx
Try y = xm:
y = xm^
dy dx = mxm−^1
d^2 y dx^2 = m(m − 1)xm−^2.
m(m − 1)xm^ − 6 mxm^ + 10xm^ = 0 =⇒ xm(m^2 − m − 6 m + 10) = 0 =⇒ xm(m − 5)(m − 2) = 0.
The general solution to this equation is
y = c 1 x^5 + c 2 x^2.
which has two roots,
λ =
= − 1 ± 2 i.
The general solution is then
y = Ae(−1+2i)x^ + Be(−^1 −^2 i)x^ = e−x[Ae^2 ix^ + Be−^2 ix]
where A and B will be complex constants: but if y is real (which it usually is) then we can write the solution as y = e−x[c 1 sin 2x + c 2 cos 2x].
If our polynomial for λ has two roots the same, then we will end up one short in our solution. This is similar to the case with a repeated eigenvalue in the previous section: there, we used a generalised eigenvector and a function xeλx. Here we only need the xeλx^ part.
Another third-order equation: d^3 y dx^3
d^2 y dx^3
dy dx
Trying y = eλx^ gives
λ^3 − 2 λ^2 + λ = 0 =⇒ λ(λ^2 − 2 λ + 1) = 0 =⇒ λ(λ − 1)^2 = 0
which has only two distinct roots, λ 1 = 0 λ 2 = λ 3 = 1.
The general solution is y = c 1 e^0 x^ + c 2 ex^ + c 3 xex^ = c 1 + c 2 ex^ + c 3 xex.
What happens if there is a term with none of the dependent variable? That is, loosely, a term on the right hand side, or a function of x.
f 2 (x) d^2 y dx^2
f 1 (x) dy dx
f 0 (x)y = g(x).
In the most general case we can’t do anything: but in one or two special cases we can.
If we already know the general solution to the homogeneous equation:
f 2 (x)
d^2 y dx^2
dy dx
then all we need is a particular solution to the whole equation: one function u(x) that obeys
f 2 (x) d^2 u dx^2
f 1 (x) du dx
f 0 (x)u = g(x).
Then the general solution to the whole equation is
y = c 1 y 1 (x) + c 2 y 2 (x) + u(x).
The solution to the homogeneous equation is called the complementary function or CF; the particular solution u(x) is called the particular integral or PI. Finding it involves a certain amount of trial and error!
In this case, we can only cope with one specific kind of RHS: a polynomial. We will see this by example:
x^2 d^2 y dx^2
− 6 x dy dx
The homogeneous equation in this case is one we’ve seen before:
x^2
d^2 y dx^2
− 6 x
dy dx
Now as long as the power on the right is not part of the CF we can find the PI by trying a multiple of the right hand side:
y = Ax^3 =⇒ dy dx
= 3Ax^2 and d^2 y dx^2
= 6Ax.
x^2
d^2 y dx^2
− 6 x
dy dx
so for this to be a solution we need − 2 A = 6 so A = −3. Then the general solution to the full equation is y = c 1 x^5 + c 2 x^2 − 3 x^3.
A couple of words of warning about this kind of equation:
Given a linear ODE with constant coefficients, we saw in the previous section that we can always find the general solution to the homogeneous equation (using eλx, xeλx^ and so on), so we know how to find the CF. There are a set of standard functions to try for the PI, but that part is not guaranteed.
This time we have initial conditions as well: remember we always use these as the very last thing we do. d^3 y dx^3
d^2 y dx^2
dy dx
= 2x with y = 3,
dy dx
= −4 and
d^2 y dx^2
= 4 at x = 0.
First we find the CF. Try y = eλx:
λ^3 + 2λ^2 + λ = 0 =⇒ λ(λ^2 + 2λ + 1) = 0 =⇒ λ(λ + 1)^2 = 0.
This has only two distinct roots: λ 1 = 0, λ 2 = λ 3 = − 1. Therefore the CF is:
yCF = c 1 + c 2 e−x^ + c 3 xe−x.
Now we look for the PI. The RHS is x so we try a function
y = Ax + B =⇒
dy dx
d^2 y dx^2
d^3 y dx^3
This makes d^3 y dx^3
d^2 y dx^2
dy dx
and no value of A can make this equal to x. What do we do when it fails?
[Note: in this case we could have predicted this because the B of our trial function is part of the CF.]
We want one more power of x so we try
y = Cx^2 + Ax =⇒
dy dx
= 2Cx + A =⇒
d^2 y dx^2
= 2C and
d^3 y dx^3
d^3 y dx^3
d^2 y dx^2
dy dx = 0 + 4C + 2Cx + A
so we need 2 Cx + 4C + A = 2x which means C = 1, A = − 4.
Our general solution is y = c 1 + c 2 e−x^ + c 3 xe−x^ + x^2 − 4 x.
Now we apply the initial conditions:
y = c 1 + c 2 e−x^ + c 3 xe−x^ + x^2 − 4 x =⇒ y(0) = c 1 + c 2 = 3 dy dx
= −c 2 e−x^ + c 3 e−x^ − c 3 xe−x^ + 2x − 4 =⇒
dy dx
(0) = −c 2 + c 3 − 4 = − 4
d^2 y dx^2
= c 2 e−x^ − 2 c 3 e−x^ + c 3 xe−x^ + 2 =⇒
d^2 y dx^2
(0) = c 2 − 2 c 3 + 2 = 4
The solution to this linear system is c 2 = −2, c 3 = −2, c 1 = 5 so our final answer is
y = 5 − 2 e−x^ − 2 xe−x^ + x^2 − 4 x.
f (x) Conditions on CF First guess at PI αekx^ λ = k not a root Aeλx αekx^ λ = k a root Axeλx αekx^ λ = k a double root Ax^2 eλx sin kx λ = ik not a root A cos kx + B sin kx cos kx λ = ik not a root A cos kx + B sin kx sin kx λ = ik a root Ax cos kx + Bx sin kx sin kx λ = ik a double root Ax^2 cos kx + Bx^2 sin kx xn^ λ = 0 not a root Axn^ + Bxn−^1 + · · · + C xn^ λ = 0 a root Axn+1^ + Bxn^ + · · · + Cx xn^ λ = 0 a double root Axn+2^ + Bxn+1^ + · · · + Cx^2