Professional Documents
Culture Documents
SOLUTIONS
DIFFERENTIAL EQUATIONS
TO
EXERCISES
IN
ORDINARY
Exercise on 15.1
Solve the more general equation (15.1) in the case when the initial number of
bacteria is n0 = 4. If time is measured in seconds, and after 5 seconds it is
found that the number of bacteria is 10, what is the value of k?
Solution
We have
= kn
The general solution is
kt
n=Ae
n=4e
kt
10 = 4 e
So
5k
e =
Taking 'antilogs', or exponentiating we have
5k = ln
and therefore
k = ln
Exercises on 15.2
1.
State the order of the following differential equations. Which are
nonlinear?
x
i) = e + 1
iii) y + cos x = 0
ii) 9y = 0
2
iv) + 2y = 1
v) 4 + 3y = 3x + 2
Solution
x
Verify that the following functions are each solutions of one of the
equations in Q1, and match the solution to its equation.
3x
a) 2e
3x
c) e
b) e + x + 2
+x+2
Solution
On the face of it we need to try each function in each equation, and if you
want plenty of practice in differentiation, by all means do! However, with
a little common sense we can save ourselves a lot of work. For example
none of these functions contains a trig function, and this would rule out
equation iii). Also, we know that when we differentiate an exponential,
we always get back a multiple of the same exponential, and so equation
iv) could not eliminate the exponentials in the proposed solutions, ruling
out this equation. So we are left with equations i), ii), iii) to try.
3x
3x
9y 9
= 2 18 e
3x
2 18 e
So y = 2e
3x
= 18e
3x
3x
18 e
3x
=0
= = e +1
x
as required. So y = e + x + 2 is a solution of i) = e + 1
3x
3x
+ x + 2)
3x
3x
3x
= 9 e 12 e 4 + 3 e + 3 x + 6
= 3 x + 2 on simplification
So y = e
3.
3x
+ x + 2 is a solution of v) 4 + 3y = 3x + 2
Find the general solution of equation 1 i) and the particular solution that
satisfies y(0) = 1.
Solution
x
y = dx + C = e + x + C
y=e +x+C
If y(0) = 1 then we have
0
y(0) = 1 = e + 0 + C = 1 + C
so C= 0 and the particular solution in this case is
x
y=e +x
Exercise on 15.3
Solve the differential equations
i)
y= sin x
ii)
y= y
iii)
y = x y
iv)
xy = 2x + y
In i), ii), iii) give the particular solutions satisfying the condition y(0) = 1. In iv)
give the solution satisfying y(1) = 0.
Solution
i) y= sin x can be solved by direct integration. We have
y = sin x dx + C
= cos x + C
which is the required solution, as you should check by substituting back
into the DE. If y(0) = 1 then we have
y(0) = 1 = cos 0 + C = 1 + C
and so C = 2 and the particular solution is
y = 2 cos x
2
" = x dx "
So, integrating both sides with respect to their respective variables we
have
2
= ln y = x dx + C = + C
So, exponentiating we get
y = exp= eC exp
We can replace eC by a new arbitrary constant A if we wish, or simply
rename C (since it is arbitrary anyway) to write the general solution as
y = C exp
Since y(0) = 1 we find C = 1 and so the particular solution is
y = exp
xy+ y = x
ii) xy 2y = x + 2
y y = x +
The equation for the integrating factor then becomes
=I
Solving this for I gives
=
or
ln I = 2 lnx = ln x
So
I=x
y= x +Cx 1
In this case it is not so easy to spot the total derivative that the original
equation represented but the 2 in xy 2y gives a hint that we have
2
y(0) = 0
y(0) = 1
Solution
i)
y(0) = 0
y y 6y = 0
Put y = e
y(0) = 1
6 = ( 3)( + 2) = 0
from which we obtain = 2, 3 and so the GS is
y = Ae
3x
+ Be
2x
2y+ y 10y = 0
Put y = e
3x
+e
2x
y(0) = 0
y(0) = 1
+ 10 = ( 2)(2 + 5) = 0
ie
= 2,
and so the GS is
2x
y = Ae
+ Be
5x/2
2x
5x/2
i)
ii)
Solution
i)
y+ 4y+ 13y = 0
y 4y+ 4y = 0
y(0) = 0
y(0) = 0
y= 1
y(1) = 1
y+ 4y+ 13y = 0
y(0) = 0
y= 1
+ 4 + 13 = 0
The solution of this quadratic is found to be
= 2 3j
So the GS is
2x
B sin = e
so
B=e
and the particular solution is
y=e
=e
ii)
y 4y+ 4y = 0
2x
B=1
( e sin 3x)
2x
sin 3x
y(0) = 0
y(1) = 1
The AE is
2
4 + 4 = ( 2) = 0
So the GS is
y = (Ax + B) e
2x
10
y(1) = Ae = 1, so A = e
The required solution is therefore
2
y=e
xe
2x
=xe
2(x 1)
Exercises on 15.6
1.
Find the solutions to each of the following second order equations, with
the specified conditions. Remember to apply the conditions to the full
solution CF + PI.
i)
ii)
iii)
y+ 4y+ 3y = 2e
y+ 4y = x + 1
y+ y = sin 2x
y(0) = 0
y(0) = 0
y(0) = 0
y(0) = 1
y() =
y(0) = 0
y+ 4y+ 3y = 2e
y(0) = 0
y(0) = 1
Solution
i)
+ 4 + 3 = ( + 1)( + 3) = 0
giving
= 1 and 3
So the CF is
yc = A e
+Be
3x
11
We note that the RHS 2e is not contained in the CF, so we are safe in
trying a solution of the form
yp = Le
(L + 4L + 3L) e = 2e
From which
8L = 2 or L =
So a PI is
x
yp = e
The GS is therefore
y = y c + yp = A e
+Be
3x
+ e
y+ 4y = x + 1
3x
+ e =
y(0) = 0
12
y() =
yp = x +
iii)
y+ y = sin 2x
The CF is
y(0) = 0
y(0) = 0
yc = A cos x + B sin x
For the PI we can on this occasion use y p = L sin 2x, since there is no y
term in the differential equation, and substituting into the equation gives
13
y(0) = 0
y(0) = 0
Solution
The CF is the general solution of
y 4y + 3y = 0
The AE is
2
4 + 3 = ( 1)( 3) = 0
So = 1 and = 3 and the CF is
yc = A e
For the PI we try
3x
+ Be
yp = Lx + M
L = 1 and 3M 4 = 0, or M =
and a PI is
yp = x +
The GS is therefore
y = y c + yp = A e
3x
+ Be +x+
y= e
e +x+
REINFORCEMENT EXERCISES
1.
Solution
Let the mass at time t be m. Then 'radioactive material decays at a rate
proportional to the amount present' can be expressed mathematically as
m or = m
where is a positive constant - the negative sign denoting a decaying
process. By now you should be able to state the GS immediately as
m = m0 e
15
2.
y= x
y= cos x
2
iii)
iv)
xy= x + 1
y= 4
v)
vi)
y= x 1
y= cos x
vii)
viii)
y= 3y
y= sec y
y(0) = 1
y() = 0
y(1) = 0
y(0) = 1
y(0) = 0
y(0) = 1
y(0) =
y(0) = 2
y (2) = 1
y(0) = 0 y() = 1
Solution
i)
y= x
y(0) = 1
This is a case of direct integration
y = x dx + C = + C
The IC gives
y(0) = C = 1
so the solution required is
y= + 1
ii)
y= cos x
y() = 0
xy= x + 1
y(1) = 0
16
y= 4
y(0) = 1
y(0) = 2
y = 2x + Cx + D
The ICs give
y(0) = C = 2
y(0) = D = 1
So the solution is
2
y = 2x + 2x + 1
v)
y= x 1
y(0) = 0
y (2) = 1
y= cos x
y(0) = 0 y() = 1
vii)
y= 3y
y(0) = 1
y= 3y =
so
=
Integrating with respect to y gives
x=+C
The IC y(0) = 1 now gives
0 = + C, so C =
and the solution is therefore
x= + =
rearranging:
18
3x 1 =
so
y=
viii)
y= sec y y(0) =
Find the general solution of the differential equations y= f(x, y) where f(x,
y) is given by
i)
iv)
vii)
x)
xy
ii)
x+y
viii)
iii)
v) 10 2y
vi)
y lnx ix)
(x y)/x
x sec y
2x 3y
Solution
i)
19
y = = on redefinition of C
ii)
and so
y = Cx
iii)
So
sin y = + C
and the GS is
y = sin
iv) = e
x+y
= e e is separable
e
dy = e dx + C
So
y
= e +C
= Ce
y = ln(C e )
Giving the GS
y = ln
NOTE: Strictly, all expressions in which, as above, we take a log of a
function, we should include modulus signs, since we can only take the log
of a positive quantity. However, to avoid cluttering up expressions, it is
usual to omit this, it being taken for granted.
v)
= 10 2y is separable and also linear. The easiest way to tackle it
is clearly by separation of variables however.
= dx + C
So, integrating
20
ln (10 2y) = x + C
or
ln(10 2y) = C 2x
Exponentiating gives
C 2x
10 2y = e
from which we find, on redefining C
y=
vi)
= e
2x 3y
=e
2x
3y
3y
separates to give
dy = e
2x
dx + C
Integrating
e
3y
= +C
Rearranging
3y
= +C
Taking logs
3y = ln
Finally giving the solution
y = ln
vii) =
2
5 sin y dy = 5y + cos y = 2x dx + C = x + C
So the solution is
2
5y + cos y = x + C
Note that in this case we cannot solve explicitly for y, so we leave the
solution as it is, in implicit form
viii) = y lnx yields, on using the standard integral for the natural log
= ln y = ln x dx + C = x ln x x + C
So
y= e
x ln x x + C
= Ce
21
x ln x x
(x > 0)
x x
=Cx e
ix)
So
x= 1 2v
Therefore, separating the variables,
= +C
So integrating both sides
ln(1 2v) = ln x + C = ln (Cx)
Taking anti-logs
1 2v = Cx
Or
v==
So finally
y=
x)
= y(x + 2y)/[x(2x + y)] = is again homogeneous and substituting y
= xv gives
=v+x=
and so
x= v=
Separating the variables gives
= +C
We can integrate the left-hand side using partial fractions
dv = ln (Cx)
Therefore
3 ln(v 1) 2 ln v = ln = ln Cx
Removing the logs gives
22
= Cx
3
=Cv x=Cx= C
which simplifies finally to
3
(y x) = Cx y
xi)
= 3(y 3y + 2) is separable:
= 3dx + C = 3 x + C
The LHS can be integrated using partial fractions
= dy
= ln (y 2) ln (y 1) = ln = 3x + C
So, removing logs
= Ce
4.
3x
y= e
2x
ii) y+ 2y = 3e
iii)
y+ xy = x
iv)
xy= 3y 2x
v) (x 1)y+ 2y = 0
vi)
(x 1)y= 3x y
3 2x
vii) xy 2y = x e
Solution
All of these equations are linear. We will only illustrate the explicit
determination of the integrating factor in the first example, leaving you to
confirm the remaining IFs as exercises.
i)
y= = e
2x
2x
2x
Put
=I
Solve this separable equation for I
= dx
23
giving
x
x 2x
e +e y===e e
=e
3x
e y=e
So, dividing through by e
3x
dx + C = e
+e
2x
The IF for y+ 2y = 3e is e
2x
+C
y = Ce
ii)
3x
+ 2e
2x
2x
y==3e
3x
Therefore, integrating:
e
2x
y=e
3x
+C
or
x
y=e +Ce
iii)
2x
24
y = x 2 + Cexp( x /2)
iv)
The IF is and so
y==
Therefore
= +C
or
y=x+Cx
(x 1)y+ 2y = = 0
which integrates to
2
(x 1)y = C
or
y=
vi)
(x 1)y= 3x y becomes
(x 1)y + y = = 3x
Integrating gives
3
(x 1) y = x + C
or
y=
25
3 2x
vii) xy 2y = x e
rearranges to
2 2x
y y = x e
The IF is found to be giving
y y = e
2x
So
y=e
2x
+C
y = Cx e
5.
2x
y 3y = e
5x
y(0) = 0
y(1) = 2
y(1) = 0
y() = 0
xy 2y = x
xy+ 2y = x
xy+ 3y =
Solution
i)
y 3y = e
The IF is e
3x
5x
y(0) = 0
:
3x
y 3e
3x
y=e
2x
So
e
3x
y=e
2x
+C
or
5x
y=e
Now applying the ICs gives
+Ce
3x
y(0) = 0 = + C
so C = and therefore the solution is:
y==e
ii)
xy 2y = x
3x
y(1) = 2
26
y = x ln x + C x
The ICs now give y(1) = C = 2, so finally the solution becomes
2
y = x (ln x + 2)
iii)
xy+ 2y = x
y(1) = 0
x y+ 2xy = = x
So, integrating
2
x y=+C
or
y= +
The IC y(1) = 0 now gives + C = 0
So C = and the solution is
y=
iv)
xy+ 3y =
y() = 0
2
differentiating x )
3
x y+ 3x y = = sin x
So
3
x y = cos x + C
27
y= +
Now y() = 0 gives ( 1) + C = 0 or C = 1, so the required solution is
y= =
6.
Solution
i)
y+ y 2y = 0
Substituting y = e
gives the AE
+ 2 = ( 1)( + 2) = 0
So
= 1, 2
and therefore the GS is
x
y = Ae + Be
ii)
2x
y 4y+ 4y = 0
Substituting y = e
4 + 4 = ( 2) = 0
So
= 2 (twice)
and therefore the GS is
y = (Ax + B)e
iii) y+ 4y+ 5y = 0
Substituting y = e
gives the AE
28
2x
+ 4 + 5 = 0
So
===2j
and therefore the GS is
y=e
iv)
2x
(Acos x + B sin x)
y+ 4y = 0
Substituting y = e
gives the AE
2
+4= 0
So
= 2j
and therefore the GS is
y = Acos 2x + B sin 2x
v)
y 9y = 0
The AE is
2
9= 0
So
= 3
and therefore the GS is
y = Ae
vi)
3x
+ Be
3x
y+ y = 0
The AE is
2
+1= 0
So
= j
and therefore the GS is
y = Acos x + B sin x
29
7.
Solution
a) i)
2
2 sin x
b) x + 1
c) e
2x
y+ y 2y = 2
yc = Ae + Be
2x
y = yc + yp = Ae + Be
a) ii)
2x
y 4y+ 4y = 2
2x
30
2x
a) iii)
y+ 4y+ 5y = 2
2x
(Acos x + B sin x)
A PI is found to be
yp =
So the GS is
2x
y = y c + yp = e
(Acos x + B sin x) +
a) iv) y+ 4y = 2
From 6 iv) the GS to y+ 4 = 0 gives the CF as
yc = Acos 2x + B sin 2x
A PI is found to be
yp =
So the GS is
y = yc + yp = Acos 2x + B sin 2x +
a) v) y 9y = 2
The CF is
yc = Ae
3x
+ Be
3x
A PI is
yp =
31
So the GS is
y = yc + yp = Ae
a) vi)
The CF is
3x
+ Be
3x
y+ y = 2
yc = Acos x + Bsin x
A PI is
yp = 2
So the GS is
y = yc + yp = Acos x + Bsin x + 2
b) i)
y+ y 2y = x + 1
x
yc = Ae + Be
2x
yp = x
y = yc + yp = Ae + Be
b) ii)
2x
y 4y+ 4y = x + 1
32
yc = (Ax + B)e
2x
2x
+ x+
y+ 4y+ 5y = x + 1
yc = e
2x
(Acos x + B sin x)
y = y c + yp = e
(Acos x + B sin x) + x +
b) iv)y+ 4y = x + 1
yc = Acos 2x + B sin 2x
33
A PI is found to be
yp = x +
So the GS is
y = yc + yp = Acos 2x + B sin 2x + x +
b) v) y 9y = x + 1
The CF is
yc = Ae
3x
+ Be
3x
A PI is
yp = x
So the GS is
y = yc + yp = Ae
b) vi)
3x
+ Be
3x
y+ y = x + 1
yc = Acos x + Bsin x
A PI is
yp = x + 1
So the GS is
y = yc + yp = Acos x + Bsin x + x + 1
c) i)
y+ y 2y = e
2x
yc = Ae + Be
34
2x
2x
not work because this is already contained in the CF. We therefore try
yp = Lxe
2x
2x
yp'' = 4Le
2Lxe
2x
2x
+ 4Lxe
2x
so
yp'' + yp' 2 yp = 4Le
2x
+ 4Lxe
= 3Le
2x
2x
+ Le
=e
2x
2Lxe
2x
2Lxe
2x
2x
Hence
3L = 1 or L =
So a PI is
2x
yp = xe
and the GS of the equation is
x
2x
y = yc + yp = Ae + Be
c) ii)
y 4y+ 4y = e
xe
2x
2x
yc = (Ax + B)e
This time we can use y p = Le
2x
2x
equation:
4Le
2x
4(2Le
2x
) + 4Le
2x
=e
2x
from which
16L = 1 or L =
and
yp = e
2x
and the GS is
y = yc + yp = (Ax + B)e
c) iii)
y+ 4y+ 5y = e
2x
2x
35
+ e
2x
yc = e
2x
2x
(Acos x + B sin x)
2x
in the CF is
yp = e
So the GS is
2x
y = y c + yp = e
(Acos x + B sin x) + e
2x
c) iv) y+ 4y = x + 1
yc = Acos 2x + B sin 2x
A PI is found to be
2x
yp = e
So the GS is
2x
y = yc + yp = Acos 2x + B sin 2x + e
c) v) y 9y = e
The CF is
2x
yc = Ae
3x
+ Be
3x
A PI is
yp = e
2x
So the GS is
y = yc + yp = Ae
3x
+ Be
3x
36
2x
c) vi)
y+ y = e
2x
yc = Acos x + Bsin x
A PI is
yp = e
2x
So the GS is
y = yc + yp = Acos x + Bsin x + e
d) i)
2x
y+ y 2y = 2 sin x
x
yc = Ae + Be
2x
yp = cos x sin x
37
y = yc + yp = Ae + Be
d) ii)
2x
cos x sin x
y 4y+ 4y = 2 sin x
yc = (Ax + B)e
2x
yp = cos x + sin x
and the GS is
y = yc + yp = (Ax + B)e
d) iii)
2x
+ cos x + sin x
y+ 4y+ 5y = 2 sin x
yc = e
2x
(Acos x + B sin x)
y = y c + yp = e
d) iv)
y+ 4y = 2 sin x
yc = Acos 2x + B sin 2x
38
A PI is found to be
yp = sin x
So the GS is
y = yc + yp = Acos 2x + B sin 2x + sin x
NB In this case, as there is no y' term in the DE we could just take y p
=Lsin x as a trial.
d) v)y 9y = 2 sin x
The CF is
yc = Ae
3x
+ Be
3x
A PI is
yp = sin x
So the GS is
y = yc + yp = Ae
d) vi)
3x
+ Be
3x
sin x
y+ y = 2 sin x
yc = Acos x + Bsin x
In this case the RHS is included in the CF and so we have to take a trial
of the form
y = x(Lcos x+ M sin x)
Substituting in the equation produces on simplification
2M cos x 2Lsin x = 2 sin x
from which
L = 1, M = 0
so a PI is
39
yp = x cos x
So the GS is
y = yc + yp = Acos x + Bsin x x cos x
8.
Solve the initial value problem y(0) = 0, y(0) = 0 for each of the equations
solved in Q7 a). If you feel really keen press on with the other questions you can check your answers by substituting into the equation.
Solution
a) i)
y+ y 2y = 2
y(0) = y'(0) =0
y(0) = 0 gives
y'(0) = 0 gives
Solving these give
y = Ae + Be
A+B1=0
A 2B = 0
2x
A=B=
so the required solution is
x
y= e +e
a) ii)
2x
The GS is
y = (Ax + B)e
2x
y(0) = 0 gives
B + = 0 or B =
y'(0) = 0 gives A + 2B = 0 or A = 2B = 1
So the solution is
y=e
2x
40
a) iii)
y+ 4y+ 5y = 2
y(0) = y'(0) = 0
The GS is
2x
y= e
The ICs give in this case
(Acos x + B sin x) +
A = and B = 2A =
So the solution is
y=e
a) iv) y+ 4y = 2
2x
y(0) = y'(0) = 0
The GS is
y = Acos 2x + B sin 2x +
The ICs give
A = and B = 0
So the solution is
y=
a) v) y 9y = 2
The GS is
y(0) = y'(0) = 0
3x
3x
y = Ae + Be
The ICs give, respectively
A+B=
AB=0
from which
A= B =
giving a particular solution of
y=
a) vi)
The GS is
y+ y = 2
y(0) = y'(0) = 0
41
y = Acos x + Bsin x + 2
The ICs give A = 2 and B = 0, so the solution is
y = 2(1 cos x)
9.
Solve the boundary value problem y(0) = y(1) = 0 for each of the
equations solved in Q7 a). Again press on with the rest of Q7 if you need
more practice.
Solution
Boundary value problems are always that bit more difficult to solve, because
they usually lead to more complicated equations but in principle there is not a
lot of difference.
a) i) y+ y 2y = 2 y(0) = y(1) = 0
The GS of the equation is
x
y(0) = 0 gives
y = Ae + Be
A+B1=0
2x
y(1) = 0 gives eA + 2e B 1 = 0
or
A+B=1
3
A+e
Subtracting to remove A gives
B=e
B== =
Then
A=1B=
- all excellent practice in algebra!! The required solution is finally
x
y= e +e
a) ii)
2x
The GS is
42
y = (Ax + B)e
2x
y(0) = 0 gives B =
2
a) iii)
y+ 4y+ 5y = 2
2x
y(0) = y(1) = 0
The GS is
y= e
2x
(Acos x + B sin x) +
e
from which we find
(Acos 1 + B sin 1) + = 0
A = and B =
and so
y= e
a) iv) y+ 4y = 2
2x
y(0) = y(1) = 0
The GS is
y = Acos 2x + B sin 2x +
The BCs give
A = and B =
So the solution is
y = cos 2x + sin 2x +
a) v) y 9y = 2
The GS is
y(0) = y(1) = 0
43
3x
y = Ae + Be
The BCs give, respectively
A+B=
3
Ae + Be
3x
or
6
A + Be =
A tour de force in algebra should then give you
B==
A==
giving a solution of
y= e
a) vi)
The GS is
y+ y = 2
3x
+ e
3x
y(0) = y(1) = 0
y = Acos x + Bsin x + 2
The BCs give A = 2 and B = 2
So
y = 2 cos x + 2 sin x + 2
44