Solutions to Exercises in Ordinary Differential Equations

advertisement
CHAPTER
15
SOLUTIONS
TO
EXERCISES
IN
ORDINARY
DIFFERENTIAL EQUATIONS
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
dn
dt = kn
The general solution is
n = A ekt
When t = 0, n(0) = A = n0 and so
n = 4 ekt
Now when t = 5, n = 10 and so
10 = 4 e5k
So
5
e5k = 2
Taking 'antilogs', or exponentiating we have
5
5k = ln 2
 
and therefore
1
5
k = 5 ln 2
 
Exercises on 15.2
1.
State the order of the following differential equations. Which are
nonlinear?
dy
i) dx = ex + 1
ii)
d2y
– 9y = 0
dx2
–1–
d2y
iii) y 2 + cos x = 0
dx
dy d3y
iv) dx
dx3
+ 2y2 = 1
d2y
dy
v)
2 – 4 dx + 3y = 3x + 2
dx
Solution
dy
i) The highest derivative in dx = ex + 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.
d2y
ii) The highest derivative in
– 9y = 0 is two, so this is a second order
dx2
equation - it is also linear since no powers of y or its derivatives occur
higher than one.
d2y
iii) y 2 + cos x = 0 is second order, but is nonlinear because of the y
dx
multiplying the second derivative.
dy d3y
iv)dx
+ 2y2 = 1 is third order, but again nonlinear both because of
dx3
dy
the dx multiplying the second derivative and the y2
v)
2.
d2y
dy
2 – 4 dx + 3y = 3x + 2 is second order and linear
dx
Verify that the following functions are each solutions of one of the
equations in Q1, and match the solution to its equation.
a) 2e3x
c) e3x + x + 2
b) ex + 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
–2–
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.
a) 2e3x 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 = 2e3x
d2y
d2
–
9y

(2e3x) – 9(2e3x)
dx2
dx2
=2
d2 3x
(e ) – 18 e3x
dx2
2 (9 e3x) – 18 e3x = 18e3x – 18 e3x = 0
So y = 2e3x is a solution of the equation ii)
d2y
– 9y = 0
dx2
b) y = ex + x + 2 is most likely to be a solution of i) because c) would not
give the ex in i). This is easily confirmed:
dy
d
x
x
=
dx
dx ( e + x + 2) = e + 1
dy
as required. So y = ex + x + 2 is a solution of i) dx = ex + 1
c) y = e3x + x + 2 must now be a solution of the only remaining equation
v), which we now check
d2 3x
d 3x
3x
2 (e + x + 2) – 4 dx (e + x + 2) + 3 (e + x + 2)
dx
= 9 e3x – 12 e3x – 4 + 3 e3x + 3 x + 6
= 3 x + 2 on simplification
–3–
So y = e
3.
3x
d2y
dy
+ x + 2 is a solution of v) 2 – 4 dx + 3y = 3x + 2
dx
Find the general solution of equation 1 i) and the particular solution that
satisfies y(0) = 1.
Solution
dy
1 i), dx = ex + 1, is a particularly simple equation that can be 'solved' by
direct integration. We obtain

y =  (ex + 1) dx + C = ex + 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
y = ex + x + C
If y(0) = 1 then we have
y(0) = 1 = e0 + 0 + C = 1 + C
so C= 0 and the particular solution in this case is
y = ex + x
Exercise on 15.3
Solve the differential equations
i)
y´= sin x
ii)
y´= y2
iii)
y´ = x2y
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
–4–

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
dy
ii) y´= dx = y2 is a variables separable equation and we can write
"
dy
= dx "
y2
So, integrating both sides with respect to their respective variables we
have
 dy

1
 2 = – y =  dx + C = x + C
y

So, rearranging we have
1
y=C–x
1
(or y = – x + C if we replace C by – C)
Now when y(0) = 1, we have
1
y(0) = 1 = C
or C = 1, giving the particular solution
1
y=1–x
–5–
iii) y´ = x2y is a separable equation also and we can write
dy
" y = x2 dx "
So, integrating both sides with respect to their respective variables we
have
 dy

x3
 y = ln y =  x2 dx + C = 3 + C


So, exponentiating we get
 x3

 x3
y = exp 3 + C = eC exp 3 


 
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
 x3
y = C exp 3 
 
Since y(0) = 1 we find C = 1 and so the particular solution is
 x3
y = exp 3 
 
iv) The equation xy´ = 2x + y can be rewritten
y´ =
2x + y
y
=
2
+
x
x
and is therefore homogeneous, and can be solved by substituting y = xv:
y´ = xv´ + v = 2 + v
and so
–6–
dv
xv´ = 2 = x dx
This equation is separable and gives
 dx

2 x = 2 ln x = 


dv = v + C
So
y
v = 2 ln x + C = x
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)
ii) xy´– 2y = x3 + 2
xy´+ y = x
Can you dispense with the integrating factor, by finding a derivative of a
product?
Solution
i) First convert xy´+ y = x to standard form
1
y´ + x y = 1
Now multiply through by an integrating factor I:
I
I y´ + x y = I
Put
dI
I
dx = x
–7–
Solve this separable equation for I
 dI
 dx
 I =  x


giving
ln I = ln x or I = x
(remember we don’t 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
dy
d
d
x dx + y = dx (Iy) = dx (xy) = x
Now integrate (now we bring in the arbitrary constant)
x2
xy = 2 + C
or
x
C
y=2 + x
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
dy
d
xy´+ y = x dx + y = dx (xy) = x
which can be integrated directly.
ii) Converting xy´– 2y = x3 + 2 to standard form gives
2
2
y´– x y = x2 + x
The equation for the integrating factor then becomes
–8–
dI
2
dx = – x I
Solving this for I gives
 dI
 2dx
 I = – x


or
ln I = – 2 lnx = ln x– 2
So
I = x– 2 =
1
x2
Multiply the DE through by I to get
1 dy
2
d  1 
2
2 dx – 3 y = dx  2 y = 1 + 3
x
x
x
x 
Now we can integrate through to get
1
1
2 y=x– 2 +C
x
x
or
y = x3 + C x2 – 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
differentiated a x–2, so we turn the coefficent of dy/dx into this by
1 dy
2
dividing by x–3 to get 2 dx – 3 y which we then (hopefully) recognize
x
x
d  1 
as dx  2 y as we found using the integrating factor.
x 
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
–9–
y´(0) = 0
y´(0) = 1
Solution
i)
y´´– y´– 6y = 0
y(0) = 1
y´(0) = 0
Put y = ex to obtain the auxiliary equation
2 –  – 6 = ( – 3)( + 2) = 0
from which we obtain  = – 2, 3 and so the GS is
y = Ae3x + Be–2x
Applying the initial conditions y(0) = 1, y´(0) = 0 gives
A+B=1
3A – 2B = 0
which yield
2
3
A = 5 and B = 5
and so the particular solution is
2
3
y = 5 e3x + 5 e–2x
ii)
2y´´+ y´– 10y = 0
y(0) = 0
y´(0) = 1
Put y = ex to obtain the auxiliary equation
2 +  – 10 = ( – 2)(2 + 5) = 0
ie
5
 = 2, – 2
and so the GS is
y = Ae2x + Be–5x/2
Applying the initial conditions y(0) = 0, y´(0) = 1 gives
– 10 –
A+B=0
5
2A – 2 B = 1
or
4A – 5B = 2
which yield
2
2
A = 9 and B = –9
and so the particular solution is
2
2
y = 9 e2x – 9 e–5x/2
2.
Solve the following boundary value problems
i)
y´´+ 4y´+ 13y = 0
y(0) = 0
y(/2) = 1
ii)
y´´– 4y´+ 4y = 0
y(0) = 0
y(1) = 1
y´´+ 4y´+ 13y = 0
y(0) = 0
y(/2) = 1
Solution
i)
The auxiliary equation is
2 + 4 + 13 = 0
The solution of this quadratic is found to be
 = – 2  3j
So the GS is
y = e–2x(A cos 3x + B sin 3x)
in 'real' form. The BCs give
y(0) = A = 0
 3

y2 = e– B sin  2  = – e– B = 1
 
 
so
B = – e
– 11 –
and the particular solution is
y = e–2x( – e sin 3x)
= – e – 2x sin 3x
ii)
y´´– 4y´+ 4y = 0
y(0) = 0
y(1) = 1
The AE is
2 – 4 + 4 = ( – 2)2 = 0
So the GS is
y = (Ax + B) e2x
The BCs give
y(0) = B = 0
y(1) = Ae2 = 1, so A = e–2
The required solution is therefore
y = e–2 x e2x = x e2(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)
y´´+ 4y´+ 3y = 2ex
ii)
y´´+ 4y = x + 1
y(0) = 0
y´(0) = 1
1

y(4 ) = 4
iii)
y´´+ y = sin 2x
y(0) = 0
y(0) = 0
y´´+ 4y´+ 3y = 2ex
y(0) = 0
y´(0) = 1
Solution
i)
y(0) = 0
We first find the complementary function by finding the GS of the
homogeneous equation:
y´´+ 4y´+ 3y = 0
The AE is
– 12 –
2 + 4 + 3 = ( + 1)( + 3) = 0
giving
 = – 1 and – 3
So the CF is
yc = A e –x + B e –3x
To find a particular integral we look for any solution of the
inhomogeneous equation
y´´+ 4y´+ 3y = 2ex
We note that the RHS 2ex is not contained in the CF, so we are safe in
trying a solution of the form
yp = Lex
Substituting into the equation gives
(L + 4L + 3L) ex= 2ex
From which
1
8L = 2 or L = 4
So a PI is
1
y p = 4 ex
The GS is therefore
1
y = yc + yp = A e –x + B e –3x + 4 ex
We now apply the ICs
1
y(0) = A + B + 4 = 0
1
y´(0) = – A – 3B + 4 = 1
– 13 –
Or
1
A+B=–4
3
A + 3B = – 4
giving
1
A = 0 and B = – 4
Hence the solution required is
1
1
1
y = – 4 e –3x + 4 ex = 4 (ex – e –3x)
ii)
y´´+ 4y = x + 1
y(0) = 0
1

y(4 ) = 4
The CF is the general solution of y´´+ 4y = 0, ie
yc = A cos 2x + B sin 2x
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
1
4L = 1 and 4M = 1, or L = M = 4
A PI is therefore
1
1
yp = 4 x + 4
The GS of the inhomogeneous equation is thus
1
1
y = yc + yp = A cos 2x + B sin 2x + 4 x + 4
Applying the BCs gives
– 14 –
1
1
y(0) = A + 4 = 0 or A = – 4
and
1 1




y4 = A cos 2 + B sin 2 + 16 + 4 = 4
 
ie


B + 16 = 0 or B = – 16
The required solution is therefore
1
1
1

y = – 4 cos 2x – 16 sin 2x + 4 x + 4
iii)
y´´+ y = sin 2x
y(0) = 0
y(0) = 0
The CF is
yc = A cos x + B sin x
For the PI we can on this occasion use yp = L sin 2x, since there is no y´
term in the differential equation, and substituting into the equation gives
– 4L sin 2x + L sin 2x = sin 2x
from which
1
L=–3
and so the PI is
1
yp = – 3 sin 2x
and the GS is
1
y = yc + yp = A cos x + B sin x – 3 sin 2x
The ICs give
y(0) = A = 0
2
2
2
y(0) = B cos 0 – 3 cos 0 = B – 3 = 0 so B = 3
– 15 –
The required solution is therefore
2
1
y = 3 sin x – 3 sin 2x
2.
Solve the initial value problem
y´´– 4y´ + 3y = 3x
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 e3x + B ex
For the PI we try
yp = Lx + M
in the equation to get
– 4L + 3Lx + 3M = 3x
From this we get
4
L = 1 and 3M – 4 = 0, or M = 3
and a PI is
4
yp = x + 3
The GS is therefore
4
y = yc + yp = A e3x + B ex + x + 3
Applying the ICs gives
4
y(0) = A + B + 3 = 0
– 16 –
y´(0) = 0
and
y´(0) = 3A + B + 1 = 0
giving
1
3
A = 6 and B = – 2
So the required solution is
1
3
4
y = 6 e3x – 2 ex + x + 3
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
dm
dm
dt m or dt =– 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– t
where m0 is an arbitrary constant.
2.
Solve the following differential equations subject to the conditions given:
i)
ii)
iii)
iv)
v)
vi)
y´= x
y´= cos x
xy´= x2 + 1
y´´= 4
y´´= x2 – 1
y´´= cos x
y(0) = 1
y() = 0
y(1) = 0
y(0) = 1
y(0) = 0
– 17 –
y´(0) = 2
y (2) = 1
y(0) = 0 y() = 1
vii)
viii)
y´= 3y2
y´= sec y
y(0) = 1
y(0) = 
Solution
i)
y´= x
y(0) = 1
This is a case of direct integration

x2
y =  x dx + C = 2 + C

The IC gives
y(0) = C = 1
so the solution required is
x2
y= 2 + 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´= x2 + 1
y(1) = 0
After dividing through by x this again yields direct integration
– 18 –
x2 + 1
1
y´= x = x + x
and integration gives
x2
y = 2 + ln x + C
The IC gives
1
1
y(1) = 2 + ln 1 + C = 0 or C = – 2
and the particular solution is
x2
1
y = 2 + ln x – 2
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
y = 2x2 + Cx + D
The ICs give
y´(0) = C = 2
y(0) = D = 1
So the solution is
y = 2x2 + 2x + 1
v)
y´´= x2 – 1
y(0) = 0
Again integrating twice gives
x4
x2
y = 12 – 2 + Cx + D
The BCs give
y(0) = D = 0
– 19 –
y (2) = 1
2
5
y(2) = – 3 + 2C = 1, so C = 6
and the solution is finally
x4
x2 5
y = 12 – 2 + 6 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=
cos 
–1
=


and the solution is
y = – cos x –
vii)
y´= 3y2
1
x+1

y(0) = 1
By turning both sides upside down we obtain a direct integration with
respect to y
dy
y´= 3y2 = dx
so
dx
1
=
dy 3y2
Integrating with respect to y gives
1
x = – 3y + C
The IC y(0) = 1 now gives
– 20 –
1
1
0 = – 3 + C, so C = 3
and the solution is therefore
1
1 1
1
x = – 3y + 3 = 3 1 – y


rearranging:
1
3x – 1 = – y
so
1
y = 1 – 3x
viii)
y´= sec y y(0) = 
Again turning both sides upside down we have
dy
1
dx = sec y = cos y
so
dx
dy = 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–1 x
3.
Find the general solution of the differential equations y´= f(x, y) where f(x,
y) is given by
– 21 –
i)
iv)
vii)
x)
Solution
i)
xy2
ex+y
2x
5 – sin y
y
ii) x
iii) x sec y
v) 10 – 2y
vi) e2x – 3y
viii) y lnx
ix)
(x – y)/x
y(x + 2y)/[x(2x + y)] xi) 3(y2 – 3y + 2)
The equation y´= xy2 is separable, and we can write
 dy
1 
x2
 2 = – y =  x dx + C = 2 + C
y

Solving for y we thus get the GS
y=–
ii)
1
2
x
2 + C
=–
2
on redefinition of C
x +C
2
dy y
dx = x is also separable, giving
 dy
 dx
 y = ln y =  x = ln x + C = ln(Cx)


and so
y = Cx
iii)
dy
x
=
x
sec
y
=
dx
cos y is again separable, and gives


 cos y dy =  x dx


So
x2
sin y = 2 + C
and the GS is
– 22 –
2
x
–1

y = sin


+
C
2

dy
iv) dx = ex+y = ex ey is separable
 –y

 e dy =  ex dx + C


So
– e– y = e x + C
e–y = C – ex
– y = ln(C – ex)
Giving the GS
 1 
y = ln
x
C – e 
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)
dy
dx = 10 – 2y is separable – and also linear. The easiest way to
tackle it is clearly by separation of variables however.


dy
 10 – 2y =  dx + C


So, integrating
1
– 2 ln (10 – 2y) = x + C
or
ln(10 – 2y) = C – 2x
Exponentiating gives
– 23 –
10 – 2y = eC – 2x
from which we find, on redefining C
1
y = 2 (Ce– 2x – 10)
vi)
dy
2x – 3y
= e2x e– 3y separates to give
dx = e
 3y

 e dy =  e2x dx + C


Integrating
1 3y
e2x
e
=
3
2 +C
Rearranging
e
3y
3e2x
= 2 +C
Taking logs
3e2x

3y = ln 2 + C


Finally giving the solution

1 3e2x
y = 3 ln 2 + C


dy
2x
vii) dx = 5 – sin y


 5 – sin y dy = 5y + cos y =  2x dx + C = x2 + C


So the solution is
5y + cos y = x2 + C
Note that in this case we cannot solve explicitly for y, so we leave the
solution as it is, in implicit form
– 24 –
dy
viii) dx = y lnx
yields, on using the standard integral for the natural
log
 dy
 y


= ln y =  ln x dx + C = x ln x – x + C

So
y = ex ln x – x + C = Cex ln x – x (x > 0)
= C xx e– x
ix)
dy
x–y
=
(x
–
y)/x
=
dx
x
y
= 1 – x is homogeneous, so we put v =
y
x or y = xv to get
dy
dv
=
v
+
x
dx
dx = 1 – v
So
dy
xdx = 1 – 2v
Therefore, separating the variables,
 dv
 1 – 2v

 dx
=  x +C

So integrating both sides
ln(1 – 2v) = ln x + C = ln (Cx)
Taking anti-logs
1 – 2v = Cx
Or
1
y
v = 2 (1 – Cx) = x
So finally
x
y = 2 (1 – Cx)
– 25 –
x)
dy
dx =
y(x
+
2y)/[x(2x
+
y)]
=
(y/x)(1 + 2y/x)
is
2 + y/x
homogeneous and substituting y = xv gives
dy
dv v(1 + 2v)
dx = v + x dx = 2 + v
and so
dv
v(1 + 2v)
v(v – 1)
x dx = 2 + v
–v= v+2
Separating the variables gives
 (v + 2)dv
 v(v – 1)

 dx
=  x +C

We can integrate the left-hand side using partial fractions
  3
2
 v – 1 – v dv = ln (Cx)

 
Therefore
(v – 1)3
3 ln(v – 1) – 2 ln v = ln 
2  = ln Cx
 v 
Removing the logs gives
(v – 1)3
= Cx
v2
y2
y2
y  3
2
(v – 1) = x – 1 = C v x = C 2 x = C x


x
3
which simplifies finally to
(y – x)3 = Cx2 y2
xi)
dy
2
dx = 3(y – 3y + 2) is separable:
– 26 –
again

dy
 2
 y – 3y + 2

= 3

dx + C = 3 x + C
The LHS can be integrated using partial fractions

  1
dy
1 
 (y – 1)(y – 2) =  y – 2 – y – 1 dy


 
y – 2
= ln (y – 2) – ln (y – 1) = ln y – 1 = 3x + C


So, removing logs
y–2
3x
y – 1 = Ce
4.
Solve the equations
i)
y´= e2x – y
iv)
xy´= 3y – 2x
vi)
(x – 1)y´= 3x2 – y
ii) y´+ 2y = 3ex
iii)
2
v) (x – 1)y´+ 2y = 0
vii) xy´– 2y = x3e–2x
y´+ xy = x3
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)
dy
y´= dx = e2x – y rearranges into the standard form
dy
2x
dx + y = e
Now multiply through by an integrating factor I:
dy
I dx + Iy = Ie2x
Put
dI
dx = I
Solve this separable equation for I
– 27 –
 dI

 I =  dx


giving
ln I = x or I = ex for the integrating factor
Multiply through by the integrating factor to obtain the derivative of a
product
dy
d
d
ex dx + exy = dx (Iy) = dx (exy) = exe2x = e3x
Integrating this directly now gives

1
ex y =  e3x dx + C = 3 e3x + C

So, dividing through by ex
1
y = Ce–x + 3 e2x
ii)
The IF for y´+ 2y = 3ex is e2x and multiplying through by it gives
dy
d
e2x dx + 2e2x y = dx (e2xy) = 3 e3x
Therefore, integrating:
e2x y = e3x + C
or
y = ex + C e–2x
iii)
For y´+ xy = x3 the IF is exp(x2/2), so
dy
d
exp(x2/2) dx + x y exp(x2/2) = dx (exp(x2/2) y) = x3 exp(x2/2)
Integrating both sides gives
– 28 –

exp(x2/2) y =  x3 exp(x2/2) dx + C

x2
To integrate the RHS put u = 2 , so du = xdx and
 3

 x exp(x2/2) dx =  x2 exp(x2/2) (xdx)








=  2u exp u du = 2 u eu –  eu du




on integrating by parts
= 2(ueu – eu) = 2eu(u – 1) = exp(x2/2) (x2 – 2)
So
exp(x2/2) y = exp(x2/2) (x2 – 2) + C
or
y = x2 – 2 + Cexp(– x2/2)
iv)
xy´= 3y – 2x rearranges to the standard form
3
y´ – x y = – 2
The IF is
1
x3
and so
1 dy
3
d  y
2
3 dx – 4 y = dx  3 = – 3
x
x
x
x 
Therefore
y
1
+C
3 =
x
x2
or
y = x + C x3
– 29 –
v) (x2 – 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
d
(x2 – 1)y´+ 2y = dx ((x2 – 1)y) = 0
which integrates to
(x2 – 1)y = C
or
y=
vi)
C
x –1
2
(x – 1)y´= 3x2 – y becomes
d
(x – 1)y´ + y = dx ((x – 1)y) = 3x2
Integrating gives
(x – 1) y = x3 + C
or
x3 + C
y= x–1
vii) xy´– 2y = x3e–2x rearranges to
2
y´– x y = x2e–2x
The IF is found to be
1
giving
x2
1
2
d 1 
–2x
= dx  2 y
2 y´– 3 y = e
x
x
x 
So
1
1 –2x
+C
2 y=–2 e
x
and hence the GS is
x2 –2x
y = Cx – 2 e
2
5.
Solve the following initial value problems
– 30 –
i)
ii)
iii)
iv)
y´– 3y = e5x
xy´– 2y = x2
xy´+ 2y = x2
sin x
xy´+ 3y = 2
x
y(0) = 0
y(1) = 2
y(1) = 0
y´– 3y = e5x
y(0) = 0
y() = 0
Solution
i)
The IF is e–3x:
d
e–3x y´– 3e–3x y = e2x = dx (e–3x y)
So
1
e–3x y = 2 e2x + C
or
1
y = 2 e5x + C e3x
Now applying the ICs gives
1
y(0) = 0 = 2 + C
1
so C = – 2 and therefore the solution is:
1
1
y = 2 (e5x – e3x) = 2 e3x (e2x – 1)
ii)
xy´– 2y = x2
y(1) = 2
The standard form is
2
y´– x y = x
The IF is
1
:
x2
1
2
d 1  1
2 y´– 3 y = dx  2 y = x
x
x
x 
Therefore
– 31 –
1
y = ln x + C
x2
or
y = x2 ln x + C x2
The ICs now give y(1) = C = 2, so finally the solution becomes
y = x2 (ln x + 2)
iii)
xy´+ 2y = x2
y(1) = 0
An ‘obvious’ multiplication by x gives
d
x2 y´+ 2xy = dx (x2 y) = x3
So, integrating
x4
x y= 4 +C
2
or
x2 C
y= 4 + 2
x
1
The IC y(1) = 0 now gives 4 + C = 0
1
So C =  4 and the solution is
x2
1
y= 4  2
4x
iv)
xy´+ 3y =
sin x
x2
y() = 0
Multiplying through by x2 gives (The 3 is the hint here – it comes from
differentiating x3)
d
x3 y´+ 3x2 y = dx (x3 y) = sin x
So
x3 y = – cos x + C
– 32 –
y=–
cos x
C
+ 3
3
x
x
Now y() = 0 gives – (– 1) + C = 0 or C = – 1, so the required solution is
y=–
6.
cos x
1
1
– 3 = – 3 (cos x + 1)
3
x
x
x
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)
Solution
i)
y´´– 9y = 0
vi) y´´+ y = 0
y´´+ y´– 2y = 0
Substituting y = ex gives the AE
2 +  – 2 = ( – 1)( + 2) = 0
So
 = 1, – 2
and therefore the GS is
y = Aex + Be–2x
ii)
y´´– 4y´+ 4y = 0
Substituting y = ex gives the auxiliary equation
2 – 4 + 4 = ( – 2)2 = 0
So
 = 2 (twice)
and therefore the GS is
y = (Ax + B)e2x
iii) y´´+ 4y´+ 5y = 0
Substituting y = ex gives the AE
– 33 –
2 + 4 + 5 = 0
So
 =
–4
16 – 20
– 4  2j
=
=–2j
2
2
and therefore the GS is
y = e–2x (Acos x + B sin x)
iv)
y´´+ 4y = 0
Substituting y = ex 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 = Ae3x + Be–3x
vi)
y´´+ y = 0
The AE is
2 + 1 = 0
So
 = j
and therefore the GS is
y = Acos x + B sin x
– 34 –
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)
2
b) x + 1
c) e–2x
d)
2 sin x
Solution
a) i)
y´´+ y´– 2y = 2
The CF, ie the GS of the homogeneous equation, is from Q 6 i)
yc = Aex + 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
y = yc + yp = Aex + Be–2x – 1
a) ii)
y´´– 4y´+ 4y = 2
From 6 ii) the GS to y´´– 4y´+ 4y = 0 gives the CF as
yc = (Ax + B)e2x
Again using y = L as a trial solution for the PI gives for a PI:
2 1
yp = 4 = 2
So the GS is
1
y = yc + yp = (Ax + B)e2x + 2
– 35 –
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
2
yp = 5
So the GS is
2
y = yc + yp = e–2x (Acos x + B sin x) + 5
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
1
yp = 2
So the GS is
1
y = yc + yp = Acos 2x + B sin 2x + 2
a) v) y´´– 9y = 2
The CF is
yc = Ae3x + Be–3x
A PI is
– 36 –
2
yp = – 9
So the GS is
2
y = yc + yp = Ae3x + Be–3x – 9
a) vi)
The CF is
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
yc = Aex + 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
1
– 2L = 1 or L = – 2
and
L – 2M = 1, so M =
L–1
3
=
–
2
4
Therefore
1
3
yp = – 2 x – 4
and the GS of the equation is
1
3
y = yc + yp = Aex + Be–2x – 2 x – 4
– 37 –
b) ii)
y´´– 4y´+ 4y = x + 1
yc = (Ax + B)e2x
Again using y = Lx + M as a trial solution gives for a PI:
1
1
yp = 4 x + 2
So the GS is
1
1
y = yc + yp = (Ax + B)e2x + 4 x + 2
b) iii)
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
1
1
L = 5 and M = 25
1
1
yp = 5 x + 25
So the GS is
1
1
y = yc + yp = e–2x (Acos x + B sin x) + 5 x + 25
– 38 –
b) iv) y´´+ 4y = x + 1
yc = Acos 2x + B sin 2x
A PI is found to be
1
1
yp = 4 x + 4
So the GS is
1
1
y = yc + yp = Acos 2x + B sin 2x + 4 x + 4
b) v) y´´– 9y = x + 1
The CF is
yc = Ae3x + Be–3x
A PI is
1
1
yp = – 9 x – 9
So the GS is
1
1
y = yc + yp = Ae3x + Be–3x – 9 x – 9
b) vi)
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
– 39 –
yc = Aex + Be–2x
For a particular integral the trial yp = 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 – 2Lxe–2x
yp'' = –4Le–2x + 4Lxe–2x
so
yp'' + yp' –2 yp = –4Le–2x + 4Lxe–2x + Le–2x – 2Lxe–2x – 2Lxe–2x
= – 3Le–2x = e–2x
Hence
–
1
3L = 1 or L = – 3
So a PI is
1
yp = – 3 xe–2x
and the GS of the equation is
1
y = yc + yp = Aex + Be–2x – 3 x e–2x
c) ii)
y´´– 4y´+ 4y = e–2x
yc = (Ax + B)e2x
This time we can use yp = Le–2x as a guess for the PI giving in the
equation:
4Le–2x – 4(–2Le–2x) + 4Le–2x = e–2x
from which
1
16L = 1 or L = 16
and
1
yp = 16 e–2x
and the GS is
1
y = yc + yp = (Ax + B)e2x + 16 e–2x
– 40 –
y´´+ 4y´+ 5y = e–2x
c) iii)
yc = e–2x (Acos x + B sin x)
With the trial yp = Le–2x (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
yp = e–2x
So the GS is
y = yc + yp = e–2x (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
1
yp = 8 e–2x
So the GS is
1
y = yc + yp = Acos 2x + B sin 2x + 8 e–2x
c) v) y´´– 9y = e–2x
The CF is
yc = Ae3x + Be–3x
A PI is
1
yp = – 5 e–2x
So the GS is
– 41 –
1
y = yc + yp = Ae3x + Be–3x – 5 e–2x
y´´+ y = e–2x
c) vi)
yc = Acos x + Bsin x
A PI is
1
yp = 5 e–2x
So the GS is
1
y = yc + yp = Acos x + Bsin x + 5 e–2x
d) i) y´´+ y´– 2y = 2 sin x
yc = Aex + Be–2x
For a particular integral the trial yp = 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
1
3
L = – 5 and M = – 5
giving a PI
1
3
yp = – 5 cos x – 5 sin x
– 42 –
and the GS of the equation is
1
3
y = yc + yp = Aex + Be–2x – 5 cos x – 5 sin x
d) ii)
y´´– 4y´+ 4y = 2 sin x
yc = (Ax + B)e2x
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
8
L = 25
6
M = 25
so
8
6
yp = 25 cos x + 25 sin x
and the GS is
8
6
y = yc + yp = (Ax + B)e2x + 25 cos x + 25 sin x
d) iii)
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
1
1
yp = – 4 cos x + 4 sin x
So the GS is
– 43 –
1
1
y = yc + yp = e–2x (Acos x + B sin x) – 4 cos x + 4 sin x
d) iv) y´´+ 4y = 2 sin x
yc = Acos 2x + B sin 2x
A PI is found to be
2
yp = 3 sin x
So the GS is
2
y = yc + yp = Acos 2x + B sin 2x + 3 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 = Ae3x + Be–3x
A PI is
1
yp = – 5 sin x
So the GS is
1
y = yc + yp = Ae3x + Be–3x – 5 sin x
d) vi)
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)
– 44 –
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
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
y = Aex + Be–2x – 1
y(0) = 0 gives
A+B–1=0
y'(0) = 0 gives
A – 2B = 0
Solving these give
2
1
A=3
B=3
so the required solution is
2
1
y = 3 ex + 3 e–2x – 1
a) ii)
y´´– 4y´+ 4y = 2 y(0) = y'(0) = 0
The GS is
– 45 –
1
y = (Ax + B)e2x + 2
1
1
y(0) = 0 givesB + 2 = 0 or B = – 2
y'(0) = 0 gives A + 2B = 0 or A = – 2B = 1
So the solution is
1
 1
y = x – 2 e2x + 2


a) iii)
y´´+ 4y´+ 5y = 2
y(0) = y'(0) = 0
The GS is
2
y = e–2x (Acos x + B sin x) + 5
The ICs give in this case
2
A=–5
4
and B = 2A = – 5
So the solution is
4
2
 2
y = – e–2x 5 cos x + 5 sin x + 5


a) iv) y´´+ 4y = 2
y(0) = y'(0) = 0
The GS is
1
y = Acos 2x + B sin 2x + 2
The ICs give
1
A = – 2 and B = 0
So the solution is
1
y = 2(1 – cos 2x)
a) v)
y´´– 9y = 2
y(0) = y'(0) = 0
– 46 –
The GS is
2
y = Ae3x + Be–3x – 9
The ICs give, respectively
2
A+B=9
A–B=0
from which
1
A= B = 9
giving a particular solution of
1
y = 9 (e3x + e–3x – 2)
a) vi)
The GS is
y´´+ y = 2
y(0) = y'(0) = 0
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
y = Aex + Be–2x – 1
y(0) = 0 gives
A+B–1=0
y(1) = 0 gives eA + 2e–2B – 1 = 0
or
– 47 –
A+B=1
A + e–3 B = e–1
Subtracting to remove A gives
B=
e–1 – 1
e–3 – 1
=
e2(e – 1)
e2
=
e3 – 1
e2 + e + 1
Then
A=1–B=
e+1
e +e+1
2
- all excellent practice in algebra!! The required solution is finally
e+1
e2
x
y= 2
e + 2
e–2x – 1
e +e+1
e +e+1
a) ii)
y´´– 4y´+ 4y = 2 y(0) = y(1) = 0
The GS is
1
y = (Ax + B)e2x + 2
1
y(0) = 0 gives B = – 2
1
y(1) = 0 gives (A + B)e2 + 2 = 0 from which
1
A = 2 (1 – e–2)
So the solution is
1
1
1
y =  2 (1 – e–2)x – 2 e2x + 2


a) iii)
y´´+ 4y´+ 5y = 2
y(0) = y(1) = 0
The GS is
2
y = e–2x (Acos x + B sin x) + 5
The BCs give
– 48 –
2
A+5 =0
2
e–2 (Acos 1 + B sin 1) + 5 = 0
from which we find
2
2 cos 1 – e2
A = – 5 and B = 5  sin 1 


and so
 2
 2
2 cos 1 – e2
y = e–2x – 5 cos x + 5  sin 1  sin x + 5




a) iv) y´´+ 4y = 2
y(0) = y(1) = 0
The GS is
1
y = Acos 2x + B sin 2x + 2
The BCs give
1
1 cos 2 – 1
A = – 2 and B = 2  sin 2 


So the solution is
1
1 cos 2 – 1
1
y = – 2 cos 2x + 2  sin 2  sin 2x + 2


a) v) y´´– 9y = 2
The GS is
y(0) = y(1) = 0
2
y = Ae3x + Be–3x – 9
The BCs give, respectively
2
A+B=9
2
Ae3 + Be–3 = 9
or
2e–3
A + Be–6 = 9
A tour de force in algebra should then give you
– 49 –
2 e3(e3 – 1)
2 e3
B=9 6
=9 3
e –1
e +1
2 e3 – 1
2 1
A=9 6  =9 3
e +1
e – 1
giving a solution of
2 1
2 e3
2
y= 9 3
e3x + 9 3
e–3x – 9
e +1
e +1
a) vi)
The GS is
y´´+ y = 2
y(0) = y(1) = 0
y = Acos x + Bsin x + 2
 cos 1 – 1
The BCs give A = – 2 and B = 2  sin 1 


So
 cos 1 – 1
y = – 2 cos x + 2  sin 1  sin x + 2


– 50 –
Download