CHAPTER 15
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
When t = 0, n(0) = A = n0 and so
kt
n=Ae
n=4e
kt
Now when t = 5, n = 10 and so
5k
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
i) The highest derivative in = e + 1 is clearly one, so it is a first order
equation. Also, the highest power of y or its derivative is also one, so this
equation is linear.
ii) The highest derivative in 9y = 0 is two, so this is a second order
equation - it is also linear since no powers of y or its derivatives occur
higher than one.
iii) y + cos x = 0 is second order, but is nonlinear because of the y
multiplying the second derivative.
iv)+ 2y
= 1 is third order, but again nonlinear both because of the
multiplying the second derivative and the y
v) 4 + 3y = 3x + 2 is second order and linear
2.
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
a) 2e could not be a solution of i) because differentiating it could not
produce the 1 - and similarly for equation v). We therefore only need to
check that it is a solution of ii). We have, with y = 2e
3x
9y 9
= 2 18 e
3x
2 18 e
So y = 2e
3x
= 18e
3x
3x
18 e
3x
=0
is a solution of the equation ii) 9y = 0
b) y = e + x + 2 is most likely to be a solution of i) because c) would not
x
give the e in i). This is easily confirmed:
x
= = e +1
x
as required. So y = e + x + 2 is a solution of i) = e + 1
3x
c) y = e + x + 2 must now be a solution of the only remaining equation
v), which we now check
4 + 3 (e
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
1 i), = e + 1, is a particularly simple equation that can be 'solved' by
direct integration. We obtain
x
y = dx + C = e + x + C
where C is an arbitary constant. This is the most general solution - it has
been obtained by direct integration, and we cannot find any more
solutions. So the general solution is
x
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
ii) y= = y is a variables separable equation and we can write
" = dx "
So, integrating both sides with respect to their respective variables we
have
= = dx + C = x + C
So, rearranging we have
y=
Now when y(0) = 1, we have
y(0) = 1 =
or C = 1, giving the particular solution
y=
2
iii) y = x y is a separable equation also and we can write
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
iv) The equation xy = 2x + y can be rewritten
y = = 2 +
and is therefore homogeneous, and can be solved by substituting y = xv:
y = xv + v = 2 + v
and so
xv = 2 = x
This equation is separable and gives
2= 2 ln x = dv = v + C
So
v = 2 ln x + C =
The GS is then
y = 2x ln x + Cx
Now y(1) = 0 gives 0 = 0 + C (ln 1 = 0), and so C = 0 and the particular
solution is
y = 2x ln x
Exercise on 15.4
Find integrating factors for the following equations and hence obtain the
general solution
i)
xy+ y = x
ii) xy 2y = x + 2
Can you dispense with the integrating factor, by finding a derivative of a
product?
Solution
i) First convert xy+ y = x to standard form
y + y = 1
Now multiply through by an integrating factor I:
I y + y = I
Put
=
Solve this separable equation for I
=
giving
ln I = ln x or I = x
(remember we dont need an arbitrary constant here)
Multiply through by the integrating factor to retrieve the original
equation, the LHS of which we now know can be written as the
derivative of a product
x+y===x
Now integrate (now we bring in the arbitrary constant)
xy = + C
or
y=+
Now the very fact that multiplying by the integrating factor returned us
to the original 'non-standard' form of the equation leads us to suspect
that we really didn't need to use the IF method at all. And indeed, if
your differentiation is up to scratch you should notice that
xy+ y = x + y = = x
which can be integrated directly.
3
ii) Converting xy 2y = x + 2 to standard form gives
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
Multiply the DE through by I to get
y==1+
Now we can integrate through to get
y=x +C
or
3
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
differentiated a x , so we turn the coefficent of dy/dx into this by
3
dividing by x to get y which we then (hopefully) recognize as as we
found using the integrating factor.
Exercises on 15.5
1.
Solve the following initial value problems
i)
y y 6y = 0
y(0) = 1
ii)
2y+ y 10y = 0
y(0) = 0
y(0) = 0
y(0) = 1
Solution
i)
y(0) = 0
y y 6y = 0
Put y = e
y(0) = 1
to obtain the auxiliary equation
2
6 = ( 3)( + 2) = 0
from which we obtain = 2, 3 and so the GS is
y = Ae
3x
+ Be
2x
Applying the initial conditions y(0) = 1, y(0) = 0 gives
A+B=1
3A 2B = 0
which yield
A = and B =
and so the particular solution is
y= e
ii)
2y+ y 10y = 0
Put y = e
3x
+e
2x
y(0) = 0
y(0) = 1
to obtain the auxiliary equation
2
+ 10 = ( 2)(2 + 5) = 0
ie
= 2,
and so the GS is
2x
y = Ae
+ Be
5x/2
Applying the initial conditions y(0) = 0, y(0) = 1 gives
A+B=0
2A B = 1
or
4A 5B = 2
which yield
A = and B =
and so the particular solution is
y= e
2.
2x
5x/2
Solve the following boundary value problems
9
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
The auxiliary equation is
2
+ 4 + 13 = 0
The solution of this quadratic is found to be
= 2 3j
So the GS is
2x
y = e (A cos 3x + B sin 3x)
in 'real' form. The BCs give
y(0) = A = 0
y= e
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
The BCs give
y(0) = B = 0
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)
We first find the complementary function by finding the GS of the
homogeneous equation:
y+ 4y+ 3y = 0
The AE is
2
+ 4 + 3 = ( + 1)( + 3) = 0
giving
= 1 and 3
So the CF is
yc = A e
+Be
3x
To find a particular integral we look for any solution of the
inhomogeneous equation
y+ 4y+ 3y = 2e
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
Substituting into the equation gives
x
(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
We now apply the ICs
y(0) = A + B + = 0
y(0) = A 3B + = 1
Or
A+B=
A + 3B =
giving
A = 0 and B =
Hence the solution required is
y=e
ii)
y+ 4y = x + 1
3x
+ e =
y(0) = 0
The CF is the general solution of y+ 4y = 0, ie
yc = A cos 2x + B sin 2x
12
y() =
For the PI we try a linear function, like the RHS
yp = Lx + M
Substituting into the equation gives
4(Lx + M) = x + 1
from which
4L = 1 and 4M = 1, or L = M =
A PI is therefore
yp = x +
The GS of the inhomogeneous equation is thus
y = yc + yp = A cos 2x + B sin 2x + x +
Applying the BCs gives
y(0) = A + = 0 or A =
and
y= A cos + B sin + + =
ie
B + = 0 or B =
The required solution is therefore
y = cos 2x sin 2x + 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
4L sin 2x + L sin 2x = sin 2x
from which
L=
and so the PI is
yp = sin 2x
and the GS is
y = yc + yp = A cos x + B sin x sin 2x
The ICs give
y(0) = A = 0
y(0) = B cos 0 cos 0 = B = 0 so B =
The required solution is therefore
y = sin x sin 2x
2.
Solve the initial value problem
y 4y + 3y = 3x
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
in the equation to get
4L + 3Lx + 3M = 3x
From this we get
14
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+
Applying the ICs gives
y(0) = A + B + = 0
and
y(0) = 3A + B + 1 = 0
giving
A = and B =
So the required solution is
3x
y= e
e +x+
REINFORCEMENT EXERCISES
1.
Radioactive material decays at a rate proportional to the amount present:
construct and solve a mathematical model giving the amount of material
remaining after a given time.
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
where m0 is an arbitrary constant.
15
2.
Solve the following differential equations subject to the conditions given:
i)
ii)
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
Again direct integration
y = cos x dx + C = sin x + C
The IC gives (note that an IC does not necessarily have to be specified at
x = 0 !)
y() = C = 0
So the required solution is
y = sin x
iii)
xy= x + 1
y(1) = 0
16
After dividing through by x this again yields direct integration
y= = x +
and integration gives
y = + ln x + C
The IC gives
y(1) = + ln 1 + C = 0 or C =
and the particular solution is
y = + ln x
iv)
y= 4
y(0) = 1
y(0) = 2
This time we have to integrate twice. After one integration we get
y= 4x + C
and another gives
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
Again integrating twice gives
y = + Cx + D
The BCs give
y(0) = D = 0
y(2) = + 2C = 1, so C =
17
y (2) = 1
and the solution is finally
y= +x
vi)
y= cos x
y(0) = 0 y() = 1
Two integrations give
y = cos x + Cx + D
The BCs give
y(0) = 1 + D = 0 so D = 1
y() = cos + C + 1 = 1
from which
C==
and the solution is
y = cos x x + 1
vii)
y= 3y
y(0) = 1
By turning both sides upside down we obtain a direct integration with
respect to y
2
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) =
Again turning both sides upside down we have
= sec y =
so
= cos y
and
x = sin y + C
The IC y(0) = gives
0 = sin + C , so C = 0
The solution is therefore
x = sin y
or
y = sin
3.
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
y(x + 2y)/[x(2x + y)] xi) 3(y 3y + 2)
Solution
i)
The equation y= xy is separable, and we can write
= = x dx + C = + C
Solving for y we thus get the GS
19
y = = on redefinition of C
ii)
is also separable, giving
= ln y = = ln x + C = ln(Cx)
and so
y = Cx
iii)
= x sec y = is again separable, and gives
cos y dy = x dx
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)
= (x y)/x = = 1 is homogeneous, so we put v = or y = xv to get
=v+x=1v
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
Solve the equations
i)
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
y rearranges into the standard form
+ y=e
2x
Now multiply through by an integrating factor I:
I + Iy = Ie
2x
Put
=I
Solve this separable equation for I
= dx
23
giving
x
ln I = x or I = e for the integrating factor
Multiply through by the integrating factor to obtain the derivative of a
product
x
x 2x
e +e y===e e
=e
3x
Integrating this directly now gives
x
e y=e
So, dividing through by e
3x
dx + C = e
+e
2x
and multiplying through by it gives
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
For y+ xy = x the IF is exp(x /2), so
2
exp(x /2) + x y exp(x /2) = = x exp(x /2)
Integrating both sides gives
2
exp(x /2) y = x exp(x /2) dx + C
To integrate the RHS put u = , so du = xdx and
3
x exp(x /2) dx = x exp(x /2) (xdx)
= 2u exp u du = 2
on integrating by parts
24
= 2(ue e ) = 2e (u 1) = exp(x /2) (x 2)
So
2
exp(x /2) y = exp(x /2) (x 2) + C
or
2
y = x 2 + Cexp( x /2)
iv)
xy= 3y 2x rearranges to the standard form
y y = 2
The IF is and so
y==
Therefore
= +C
or
y=x+Cx
v) (x 1)y+ 2y = 0 is actually separable, as well as linear, and in fact
the LHS is immediately recognizable as the derivative of a product
2
(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
and hence the GS is
2
y = Cx e
5.
2x
Solve the following initial value problems
i)
ii)
iii)
iv)
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
The standard form is
y y = x
The IF is :
y y = =
Therefore
y = ln x + C
or
2
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
An obvious multiplication by x gives
2
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
Multiplying through by x gives (The 3 is the hint here it comes from
3
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.
Solve the following second order equations
i)
y+ y 2y = 0
ii) y 4y+ 4y = 0
iii)
y+ 4y+ 5y = 0
iv) y+ 4y = 0
v)
y 9y = 0
vi) y+ y = 0
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
gives the auxiliary equation
2
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.
Obtain the general solution of the inhomogeneous equations formed by
adding the following right hand sides to each of the equations of Q6.
a)
d)
Solution
a) i)
2
2 sin x
b) x + 1
c) e
2x
y+ y 2y = 2
The CF, ie the GS of the homogeneous equation, is from Q 6 i)
x
yc = Ae + Be
2x
For a particular integral we try a solution y = L and obtain on
substitution in the equation
2L = 2 or L = 1
So a particular solution is yp = 1 and the GS of the equation a) i) is
therefore
x
y = yc + yp = Ae + Be
a) ii)
2x
y 4y+ 4y = 2
From 6 ii) the GS to y 4y+ 4y = 0 gives the CF as
yc = (Ax + B)e
2x
Again using y = L as a trial solution for the PI gives for a PI:
yp = =
So the GS is
y = yc + yp = (Ax + B)e
30
2x
a) iii)
y+ 4y+ 5y = 2
From 6 iii) the GS to y+4y+ 5y = 0 gives the CF as
yc = e
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
For a particular integral we try a solution y p = Lx + M and obtain on
substitution in the equation
yp'' + yp' 2 yp = L 2(Lx + M) = 2Lx + L 2M x + 1
so
2L = 1 or L =
and
L 2M = 1, so M = =
Therefore
yp = x
and the GS of the equation is
x
y = yc + yp = Ae + Be
b) ii)
2x
y 4y+ 4y = x + 1
32
yc = (Ax + B)e
2x
Again using y = Lx + M as a trial solution gives for a PI:
yp = x +
So the GS is
y = yc + yp = (Ax + B)e
b) iii)
2x
+ x+
y+ 4y+ 5y = x + 1
yc = e
2x
(Acos x + B sin x)
With the trial yp = Lx + M we have
y+ 4y+ 5y = 4L + 5(Lx + M) = 5Lx + 4l + 5M x + 1
Equating coefficients gives
5L =1
5M = 1 4L
from which we find
L = and M =
yp = x +
So the GS is
2x
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
For a particular integral the trial y p = Le
2x
suggested by the RHS will
not work because this is already contained in the CF. We therefore try
yp = Lxe
2x
and obtain on substitution in the equation:
yp'= Le
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
as a guess for the PI giving in the
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
With the trial yp = Le
2x
2x
(Acos x + B sin x)
(Of course the occurrence of e
2x
in the CF is
not a problem here since it is accompanied by cos and sin terms) a PI is
found to be
2x
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
For a particular integral the trial y p = L cos x + M sin x is suggested by
the RHS:
yp'= L sin x + M cos x
yp'' = L cos x Msin x
so
yp'' + yp' 2 yp = L cos x M sin x L sin x + M cos x 2L cos x 2 M sinx
= ( 3L + M) cos x + ( L 3 M) sin x = 2 sin x
Therefore
3L + M = 0 or M = 3L
and
L 3M = 2
from which we get
L = and M =
giving a PI
yp = cos x sin x
and the GS of the equation is
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 = Lcos x + M sin x as a guess for the PI gives this time:
(3L 4M)cos x + (4L + 3M)sin x = 2 sin x
from which
3L 4M = 0
4L + 3M = 2
giving
L=M=
so
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)
With the trial yp = Lcos x + M sin x a PI is found to be
yp = cos x + sin x
So the GS is
2x
y = y c + yp = e
d) iv)
(Acos x + B sin x) cos x + sin x
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
The GS of the equation is
x
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
y 4y+ 4y = 2 y(0) = y'(0) = 0
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
y 4y+ 4y = 2 y(0) = y(1) = 0
The GS is
42
y = (Ax + B)e
2x
y(0) = 0 gives B =
2
y(1) = 0 gives (A + B)e + = 0 from which
A=
So the solution is
y=e
a) iii)
y+ 4y+ 5y = 2
2x
y(0) = y(1) = 0
The GS is
y= e
2x
(Acos x + B sin x) +
The BCs give
A+=0
2
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