# Be sure this exam has 5 pages including the cover

```Be sure this exam has 5 pages including the cover
The University of British Columbia
MATH 215/255
Midterm Exam I – October 2014
Name
Signature
Student Number
Section Number
This exam consists of 4 questions worth 40 marks. No notes nor calculators.
Problem
1.
max score
8
2.
12
3.
10
4.
10
total
40
score
1. Each candidate should be prepared to produce his library/AMS card upon request.
2. Read and observe the following rules:
No candidate shall be permitted to enter the examination room after the expiration of one half hour, or to leave
during the first half hour of the examination.
Candidates are not permitted to ask questions of the invigilators, except in cases of supposed errors or ambiguities
in examination questions.
CAUTION - Candidates guilty of any of the following or similar practices shall be immediately dismissed from the
examination and shall be liable to disciplinary action.
(a) Making use of any books, papers or memoranda, other than those authorized by the examiners.
(b) Speaking or communicating with other candidates.
(c) Purposely exposing written papers to the view of other candidates. The plea of accident or forgetfulness
3. Smoking is not permitted during examinations.
October 2014
Math 215/255 Midterm 1
(8 points) 1. (a) Solve y 0 = xy, y(1) = 1.
(4pt)
Since y(1) = 1, then y(x) 6≡ 0. So we have
Z
Z
1
dy = x dx.
y
That is, ln |y| =
x2
+ C. So we have
2
y = Ce
x2
2
.
1
Since y(1) = 1, that is, 1 = Ce 2 , then
1
C = e− 2 .
So the solution is given by:
y(x) = e
x2 −1
2
.
(b) Use Euler’s method to approximate y(3) with step size h = 1.
(4pt)
Let f (x, y) = xy, x0 = 1 and y0 = y(x0 ) = y(1) = 1, then
x1 = x0 + h
= 2
y1 = y0 + f (x0 , y0 )h
= 1+1&middot;1&middot;1
= 2
x2 = x0 + 2h
= 3
y2 = y1 + f (x1 , y1 )h
= 2+2&middot;2&middot;1
= 6.
Page 2 of 5
October 2014
Math 215/255 Midterm 1
Page 3 of 5
(12 points) 2. Newton’s law of cooling states that the rate of change in temperature of a body is equal to
the temperature difference between the body and its surrounding environment, multiplied by
a heat loss parameter. We place a body of initial temperature T0 in an environment of
temperature 10 ◦ C, with heat loss parameter h = −2.
(a) Find a general expression for the temperature of the body at any given time, in the case
where T0 = 50 ◦ C. Describe the long-term behavior of the solution.
(4pt)
We write T = T (t) for the temperature at time t and we solve
dT
= −2(T − 10).
dt
By separation of variables, we have
dT
= −2dt.
T − 10
Integrating on both sides, we obtain
ln |T − 10| = −2t + C
Since we started with a temperature &gt; 10, we have T &gt; 10 (at least for small t) and therefore
ln(T − 10) = −2t + C
⇒
T = 10 + De−2t
where D = eC . Substituting the temperature at t = 0, we obtain
50 = 10 + D
⇒
D = 40.
Finally, the general form of the temperature is
T (t) = 10 + 40e−2t .
The temperature tends to 10 ◦ C at infinity.
(b) Find a general expression for the temperature of the body at any given time in the case
where T0 = 5 ◦ C. Describe the long-term behavior of the solution.
(4pt) Proceeding as before, but using T0 &lt; 10, we obtain
ln(10 − T ) = −2t + C
⇒
T = 10 − De−2t .
Substituting the temperature at t = 0, we have 5 = 10 − D, therefore D = 5 and the general
solution is T (t) = 10 − 5e−2t , which converges to 10 at infinity.
(c) Find the critical point of the autonomous differential equation you just solved, and based
on questions (a) and (b) argue whether it is stable or unstable.
(4pt) The critical points of the autonomous differential equation
dT
= −2(T − 10)
dt
are those such that −2(T − 10) = 0, therefore there is only one critical point Tenv = 10. Since
the solutions found in (a) and (b) converge to 10 for initial values of T below and above 10,
the critical point Tenv = 10 is stable.
October 2014
Math 215/255 Midterm 1
Page 4 of 5
(10 points) 3. Find an integrating factor &micro;(x) so that the following equation is exact:
&micro;(x)y + &micro;(x)(x2 y − x)
dy
= 0,
dx
y|x=1 = 3.
Solve y as an implicit function of x.
(a) To be exact, we need (&micro;(x)y)y = [&micro;(x)(x2 y − x)]x , i.e.,
&micro; = &micro;0 (x2 y − x) + &micro;(2xy − 1).
Thus
x(xy − 1)&micro;0 + 2(xy − 1)&micro; = 0.
As xy − 1 6= 0 near (1, 3), &micro; satisfies the separable equation
x&micro;0 + 2&micro; = 0.
Thus,
d&micro;
&micro;
= − 2dx
x . After integration, ln |&micro;| = −2 ln x + C. We can choose C = 0 and
&micro;(x) = e−2 ln x = x−2 .
Alternative solution using the formula. With M = y and N = x2 y − x, we have
My − Nx
1 − (2xy − 1)
2
=
=− ,
N
x(xy − 1)
x
and
R
− x2 dx = −2 ln x + C. We can choose C = 0 and
&micro; = e−2 ln x = x−2 .
(b) With &micro; = x−2 , the ODE becomes an exact equation
y
1 dy
+ (y − )
= 0.
2
x
x dx
Its potential function φ(x, y) satisfies
Z
y
y
dx = − + h(y),
φ=
2
x
x
and we have
1
1
y − = φy = − + h0 (y).
x
x
Thus h0 (y) = y and
1
h(y) = y 2 − c.
2
The solution y(x) satisfies
y 1
− + y 2 = c.
x 2
Using the condition y(1) = 3, we get c = −3 + 9/2 = 3/2. Thus
−
y 1 2 3
+ y = .
x 2
2
Remark: This is revised from problem 2 of April 2012 final exam of MATH 215. The final
answer can be also written as
xy 2 − 2y − 3x = 0.
October 2014
Math 215/255 Midterm 1
Page 5 of 5
(10 points) 4. Let α be a constant. Solve y 00 − 2y 0 + α(2 − α)y = 0 for y(0) = 0 and y 0 (0) = 2. (Hint: You
need to consider two cases which depend on α.)
The characteristic equation of y 00 − 2y 0 + α(2 − α)y = 0 is:
r2 − 2r + α(2 − α) = 0.
Solve r2 − 2r + α(2 − α) = 0, we get
and r2 = 2 − α.
r1 = α,
We have the following two cases:
I. If r1 = r2 , that is, α = 2 − α, then α = 1. So the solution is like:
y(x) = C1 ex + C2 xex .
Since y(0) = 0, then C1 = 0, that is, y(x) = C2 xex . Then
y 0 (x) = C2 ex + C2 xex .
Since y 0 (0) = 2, that is, C2 = 2. So the solution is given by:
y(x) = 2xex .
II. If r1 6= r2 , that is, α 6= 2 − α, then α 6= 1. So the solution is like:
y(x) = C1 eαx + C2 e(2−α)x .
Then
y 0 (x) = C1 αeαx + C2 (2 − α)e(2−α)x .
Since y(0) = 0 and y 0 (0) = 2, then
C1 + C2 = 0,
and C1 α + C2 (2 − α) = 2.
Since α 6= 1, then we get
C1 = −
1
,
1−α
and C2 =
1
.
1−α
Therefore, the solution is given by:
y(x) =
h
i
1
&middot; −eαx + e(2−α)x .
1−α
In summary, we have

 2xex ,
if α = 1,
h
i
1
y(x) =
αx
(2−α)x
&middot; −e + e
, if α 6= 1.

1−α
```