University of Aberdeen Department of Mathematical Sciences: Dy DX X y
University of Aberdeen Department of Mathematical Sciences: Dy DX X y
dy x2
= given that y = 2 when x = 0.
dx y
(b)
dy y
= 2 given that y = 1 when x = 1.
dx x
(c)
dy
= (y + 1) sin x given that y = 0 when x = 0.
dx
(d)
dy
= (y + 1)x sin x given that y = 0 when x = 0.
dx
(e)
dy
x3 = y 2 + 3xy 2 given that y = 1 when x = 1.
dx
Z Z
1. (a) Separating the variables, we have y dy = x2 dx and so 12 y 2 = 13 x3 + C. Putting in
the given conditions shows that C = 2.
Z Z
dy dx 1
(b) Separating the variables, we have = 2
and so ln y = C . Putting in the
y x x
1
given conditions gives C = 1. So y = exp 1 .
x
Z Z
dy
(c) Separating the variables, we have = sin x dx and so ln(y + 1) = C cos x.
y+1
Putting in the given conditions gives C = 1. So y = exp(1 cos x) 1.
(d) Separating the variables, we have
Z Z
dy
= x sin x dx and so ln(y + 1) = C x cos x + sin x
y+1
(Use parts to deal with the right hand integral.) Putting y = 0 and x = 0 shows that C = 0.
So y = exp(sin x x cos x) 1.
(e) Separating the variables, we have
Z Z
dy 1 + 3x 1 1 3
2
= dx and so = 2 +C
y x3 y 2x x
Putting in the given conditions shows that C = 5/2. From this we get
2x2
y=
1 + 6x 5x2
2. (a) Divide through by x2 to get the equation into its standard form. This shows the integ-
rating factor to be
Z
dx
exp = exp(ln x) = x.
x
Multiplying through the standard form of the equation by this produces
dy ln x
x +y = ,
dx x
and hence
d ln x
(xy) = .
dx x
So
Z
ln x
xy = dx.
x
Solutions to Algebra Sheet 6: Solving Differential Equations 4.10.04 page 2
1
xy = (ln x)2 + C.
2
Now put in the given condition that y = 1 when x = 1 to get C = 1, and divide through by
x to get y.
(b) Divide through by x2 to get the standard form. The integrating factor is
Z
dx
exp = exp( ln x) = exp(ln(x1 )) = x1 .
x
x(x3 1)
Since C turns out to be 1, the final answer is y = .
x+1
(d) To find the integrating factor you have to integrate 2 cot x. This is 2 ln(sin x), which
equals ln(sin2 x). So the integrating factor is sin2 x, and we have
d
y sin2 x = x cos x
dx
What then emerges is y sin2 x = x sin x + cos x + C, and C is 0.
(e) The integrating factor is ex producing
d
(y ex ) = x2 ex
dx
and the final answer y = x2 2x + 2 + ex .
1 1
3. (a) This is separable and the integrals are easy. The answer is y = 2 2 3 .
x x
(b) Again separable. Integrating gives 2 y + 1 = x + C, and C turns out to be 1.
(c) An easy one for an integrating factor, assuming that is that you dont notice that once
you have taken the 2y over to the left hand side the equation is already in the form you need.
d
(y(2x + 1)) = 2x
dx
Solutions to Algebra Sheet 6: Solving Differential Equations 4.10.04 page 3
The integration and putting in of the given values produces (2x + 1)y = x2 + 1.
(d) This separates to give
dy dx
=
1 + y2 1 x2
Therefore arctan y = arcsin x + C. arctan(1) = /4, and arcsin(1) = /2, and so C = /4.
Now take tangents to get
y = tan arcsin(x)
4
.
4. We seek a solution of the form y = emx . Then y 0 = memx and y 00 = m2 em x. Thus (m2 +
6m + 8)em x = 0 and since em x 6= 0 we must have m2 + 6m + 8 = 0. Solving we see that
(m + 4)(m + 2) = 0 and so m = 4 or m = 2. This gives solutions of the form
y = Ae4x + Be2x
for arbitrary constants A and B. Since this is a second order equation and we have a solution
with two arbitrary constants, it must be the general solution.
Since y(0) = A + B = 3 and y 0 (0) = 4A 2B = 8 we have A = 1 and so B = 2. Thus the
required solution is y = e4x + 2e2x .
We see that y(x) 0 as x .
5. We seek a solution of the form y = emx . Then y 0 = memx and y 00 = m2 em x. Thus (m2 +
2m 3)em x = 0 and since em x 6= 0 we must have m2 + 2m 3 = 0. Solving we see that
(m 1)(m + 3) = 0 and so m = 1 or m = 3. This gives solutions of the form
y = Aex + Be3x
for arbitrary constants A and B. Since this is a second order equation and we have a solution
with two arbitrary constants, it must be the general solution.
Since y(0) = A + B = 0 and y 0 (0) = A 3B = 4 we have A = 1 and so B = 1. Thus the
required solution is y = ex e3x .
We see that y(x) as x .
6. We seek a solution of the form y = emx . Then y 0 = memx and y 00 = m2 em x. Thus (m2 +
2m + 1)em x = 0 and since em x 6= 0 we must have m2 + 2m + 1 = 0. Solving we see that
(m + 1)(m + 1) = 0 and so m = 1. This is the equal roots case and so we know the
gerneral solution is of the form
y = (A + Bx)ex
for arbitrary constants A and B. Since this is a second order equation and we have a solution
with two arbitrary constants, it must be the general solution.
Solutions to Algebra Sheet 6: Solving Differential Equations 4.10.04 page 4
7. We seek a solution of the form y = emx . Then y 0 = memx and y 00 = m2 em x. Thus (m2 + 2m +
5)em x = 0 and since em x 6= 0 we must have m2 + 2m + 5 = 0. Solving using the quadratic
formula we have complex roots 1 2j. This gives solutions of the form
for arbitrary constants A and B. Since this is a second order equation and we have a solution
with two arbitrary constants, it must be the general solution. We rewrite in a more useful
form, obseving that e2j = cos 2x + j sin 2x while e2jx = cos 2x j sin 2x.
Thus the general solution is of the form
where we have written C = A + B and D = j(A B). Note we can also write this in the
form
y = Aex cos(2x + )
8. We seek a solution of the assocaited homegeneous equation of the form y = emx . In this case,
y 0 = memx and so y 00 = m2 emx . Thus since emx 6= 0, we must have
2 4 16 4.13
m + 4m + 13 = 0, m= = 2 3j.
2
We thus obtain a general solution y = A exp(2x + 3jx) + B exp(2x 3jx). Combining the
sine and cosine terms together, this can be rewritten (with different values of A and B) as
y = e2x (A cos 3x + B sin 3x). Since it has two arbitrary constants, this is the general solution.
Now seek a solution of the form y = ax2 + bx + c of the inhomogeneous equation
d2 y dy
2
+4 + 13y = 5x2 x.
dx dx
Then y 0 = 2ax + b and so y 00 = 2a. Thus
These have a solution with a = 2, b = 1 and c = 0 and we have found a particular integral.
Thus the general solution of the inhomogeneous equations is
d2 y dy
2 2
9 35y = 0 .
dx dx
The auxiliary equation is 2m2 9m 35 = 0. This has roots
r r
81 + 280 361 9 19
m=9 =9 = = 7 or 2.5
4 4 4
y = C sin 2x + D cos 2x
Therefore
dy
= 2C cos 2x 2D sin 2x
dx
and
d2 y
= 4C sin 2x 4D cos 2x
dx2
Therefore
d2 y dy
2 9 35y = 8C sin 2x 8D cos 2x 18C cos 2x + 18D sin 2x 35C sin 2x 35D cos 2x
dx2 dx
Therefore
So
43 18
C= and D=
2173 2173
Therefore the general solution of the given equation is
1 1
y = Ae7x + Be2.5x + sin 2x + cos 2x .
39 26