Solving Ordinary Differential Equations
Solving Ordinary Differential Equations
Solving Ordinary Differential Equations
It is expected that you can solve first order ODEs by separation of variables and by
substitution, and that you can solve linear, constant-coefficient second order ODEs (by
finding the complementary function and the particular integral). These techniques are
very important and before the course starts you should make sure that you are very
familiar with them. The theory of solving such ODEs is covered in many standard texts,
such as ‘Advanced Engineering Mathematics’ by Kreyszig (published by Wiley) or the
Schaum Outline Series ‘Differential Equations’ by Bronson. It is also covered in the OU
undergraduate course MST209 (and its predecessors MST207 and MST204). If you feel
that you are happy with the general procedures, then you could try working through the
questions given here. These are relatively hard questions, and each question has been
chosen to make a particular point, such as the use of ln c in Question 1. Even if you
know you can answer the questions it might still be worth reading through my answers.
1
Answers
Z
y Z
1
1. Separating the variables and integrating gives dy = dx so that
y2 + 1 x
1
ln(y 2 + 1) = ln x + ln c,
2
where c is a constant and we use ln c for the constant of integration to make
subsequent manipulations easier. Hence ln(y 2 + 1) = ln(xc)2 so that
√
y = ± (dx2 − 1),
4. Here the auxiliary equation has roots m = ±2i and so the complementary function
is y = A sin(2x) + B cos(2x), for A and B both constants. Since the right-hand
side of the differential equation, i.e. sin(2x), occurs in the complementary function
2
then the standard ‘guess’ for the particular integral of y = a sin(2x) + b cos(2x)
will fail (if you don’t believe me, try it). So instead we multiply by x and try
y = ax sin(2x) + bx cos(2x) (and note that we DO need the cos term, as b will turn
out to be non-zero). So, y 0 = a sin(2x) + 2ax cos(2x) + b cos(2x) − 2bx sin(2x) and
y 00 = 2a cos(2x) + 2a cos(2x) − 4ax sin(2x) − 2b sin(2x) − 2b sin(2x) − 4bx cos(2x).
Substituting these into the original differential equation and equating coefficients
gives, for sin(2x), −2b−2b = 1; for cos(2x), 2a+2a = 0; for x sin(2x), −4a+4a = 0
and for x cos(2x), −4b + 4b = 0. So a = 0, b = −1/4 and
x
y = A sin(2x) + B cos(2x) − cos(2x).
4
Note that for a different differential equation a would not necessarily be zero - can
you see how a equals zero in this case?
y = x arcsin(c/x).
d2 y dy
a2 x 2 2
+ a1 x + a0 y = f (x),
dx dx
where the ai are known constants.
3
Consider the equation
d2 y dy
4x2 2
+ 4x − y = 0, (2)
dx dx
which is an example of Euler’s equation. The substitution needed (and one which
you should be able to remember, having identified the equation as Euler’s) is x = et .
In order to use the substitution, note that
dy dy dt dy
= = e−t
dx dt dx dt
and that
d2 y d2 y
! ! !
d −t dy d dy dt d dy −t dy
= e = e−t = e−t e = e−2t 2 − e−2t .
dx2 dx dt dt dt dx dt dt dt dt
d2 y
Substituting these into (2) and simplifying results in 4 − y = 0, the general
dt2
solution of which is y = Aet/2 + Be−t/2 , where A and B are arbitrary constants.
Hence the general solution of (2) is
√ B
y =A x+ √ .
x
√ √
7. Here the auxiliary equation is m4 − 4 = √0, which has√ solutions
√ m = ± 2, ±
√ 2i.
So the complementary function is y = Ae 2x + Be− 2x + C sin( 2x) + D cos( 2x),
where A, B,√ C and D are constants.
√ Alternatively
√ this solution
√ may be written as
y = A sinh( 2x) + B cosh( 2x) + C sin( 2x) + D cos( 2x), where A and B are
still constants, just not the same as the A and B before.
For the particular integral, let y = a. Then y (iv) = 0 and so −4a = 8. Hence the
general solution is
√ √ √ √
y = A sinh( 2x) + B cosh( 2x) + C sin( 2x) + D cos( 2x) − 2.
Cath Wilkins
January 19 2008