Mat202 MT1 Spring19

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Wed 20th Mar, 2019 Boğaziçi University Solutions

at 2:52pm Math 202 First Midterm Test

Question: 1 2 3 4 Total
Points: 15 15 15 15 60
Score:

[15] 1. Solve the initial value problem ty 0 + (3t + 1)y = e−3t for t > 0 subject to y(2) = 0.

−3t
Solution: First dividing by t we get: y 0 + 3t+1
t
y = e t for t 6= 0. Now we find an integrating
factor µ(t) by:
 ˆ 3t + 1 
µ(t) = exp dt = exp(3t + ln |t| + c) = Cte3t ,
t
where the constant C = 1 can be assumed without loss of generality.
Now multiply the DE by µ:
te3t y 0 + (3t + 1)e3t y = 1
so that the left hand side has become a total derivative. In other words, we have to solve:
d 3t
(te y) = 1,
dt
which gives te3t y = t + c or equivalently:
 c
y = e−3t 1 + .
t

Finally, the initial condition yields e−6 (1 + 2c ) = 0 which is satisfied for c = −2. Thus, the
unique solution is:
−3t
 2
y=e 1− .
t

Page 1 of 5
B.G., F.Ö. Math 202 First Midterm Solutions Solutions

[15] 2. Solve the initial value problem by finding an integrating factor:

x2 + y 2 − 5 − (y + xy)y 0 = 0, y(0) = 1.

Solution: Rewriting the DE as (x2 + y 2 − 5)dx − (y + xy)dy = 0 we set:

M (x, y) = x2 + y 2 − 5 and N (x, y) = −y(1 + x).

Calculating ∂y M = 2y and ∂x N = −y we observe that

∂y M − ∂x N 3y 3
= =−
N −y(1 + x) 1+x

is a function of x only. Hence an integrating factor µ = µ(x) exists and is found by:
ˆ ∂ M − ∂ N  ˆ 3  1
y x
µ(x) = exp dx = exp − = .
N 1+x (1 + x)3

We now multiply the DE by this factor:

x2 + y 2 − 5 −(y + xy) x2 + y 2 − 5 −y
dx + dy = 0 = dx + dy.
(1 + x)3 (1 + x)3 (1 + x)3 (1 + x)2

This equation being exact, there exists F (x, y) such that:

x2 + y 2 − 5 y
∂x F = and ∂y F = − .
(1 + x)3 (1 + x)2

We need to anti-differentiate one of these equations first, and choose the simpler one for that
purpose. That is the second equation. We find:

y2
F (x, y) = − + g(x).
2(1 + x)2

By differentiating this F with respect to x and satisfying the first equation:

y2 0 x2 + y 2 − 5 y2 x2 − 5 0 x2 − 5
∂x F = + g (x) = = + =⇒ g (x) = .
(1 + x)3 (1 + x)3 (1 + x)3 (1 + x)3 (1 + x)3

To find g we use the change of variable 1 + x = t:


ˆ ˆ ˆ 2
x2 − 5 (t − 1)2 − 5 t − 2t − 4 2 2
g(x) = 3
dx = 3
dt = 3
dt = ln |t| + + 2 + c.
(1 + x) t t t t

Choosing c = 0 without loss of generality and reinstating the original variable x:

y2 2 2
F (x, y) = − 2
+ ln(1 + x) + + ,
2(1 + x) 1 + x (1 + x)2

Page 2 of 5
B.G., F.Ö. Math 202 First Midterm Solutions Solutions

where we also used |1 + x| = 1 + x near the initial point 0.


Solutions of the DE are the level sets of F because the given equation is now dF = 0. So:

y2 2 2
− 2
+ ln(1 + x) + + =C
2(1 + x) 1 + x (1 + x)2

represents all possible solutions.


Using the initial condition y = 1 when x = 0 we find C = − 21 + 2 + 2 = 27 . The unique solution
of the IVP is:
y2 2 2 7
− 2
+ ln(1 + x) + + 2
= .
2(1 + x) 1 + x (1 + x) 2

Page 3 of 5
B.G., F.Ö. Math 202 First Midterm Solutions Solutions

[15] 3. Find the general solution of y 00 − 4y 0 + 5y = sin x by using the method of undetermined coeffi-
cients.

Solution: We first the complementary solution by solving the associated homogeneous DE:
y 00 − 4y 0 + 5y = 0. The characteristic equation is r2 − 4r + 5 = 0. The discriminant equals
16 − 20 = −4 < 0, so there are two complex conjugate roots:
4 ± 2i
r1,2 = = 2 ± i.
2
We detect two linearly independent solutions as y1 = e2x cos x and y2 = e2x sin x, and hence
yc = c1 e2x cos x + c2 e2x sin x.
For a particular solution we set h(x) = sin x and observe that h0 , h00 would produce only sin x
and cos x. A reasonable form yp can be initially written as yp = A cos x + B sin x. Then we
check for any possible intersections with yc . Neither cos x nor sin x belongs to yc , so our initial
guess indeed is the correct form. We now compute:

yp0 = −A sin x + B cos x and yp00 = −A cos x − B sin x,

which we plug in the non-homogeneous DE to find the constants A, B. That is:

− A cos x − B sin x − 4(−A sin x + B cos x) + 5(A cos x + B sin x)


= (4A − 4B) cos x + (4A + 4B) sin x = sin x.

This easily finds A = B = 18 . So yp = cos x


8
+ sin x
8
.
The general solution of the DE is:
cos x sin x
y = yc + yp = c1 e2x cos x + c2 e2x sin x + + .
8 8

Page 4 of 5
B.G., F.Ö. Math 202 First Midterm Solutions Solutions

00 et/2
0
[15] 4. Find the general solution of 4y − 4y + y = .
1 + t2

Solution: We start with the complementary solution. The characteristic equation is 4r2 −
4r + 1 = 0. The discriminant is 16 − 16 = 0, so r = 1/2 is the double root. So two linearly
independent solutions of the corresponding homogeneous equation are y1 = et/2 and y2 = tet/2 .
We have to use the variation of parameters to find a particular solution. To this end we write
yp = v1 (t)et/2 + v2 (t)tet/2 and find v10 and v20 as the unique solution of the 2 × 2 system:
 t/2   0 " #
e tet/2 v1 0
et/2 = et/2 .
2
et/2 + 2t et/2 v20 4(1+t2 )

Important: In the above matrix system, notice carefully that we first divided the DE by 4 so
as to leave y 00 with coefficient 1. This is essential to apply the method in its present form.
The two equations we have to solve are:

v10 et/2 + v20 tet/2 = 0,


et/2 et/2
v10 + v20 et/2 (1 + 2t ) = .
2 4(1 + t2 )

Using the first one in the second equation we easily find:


1 1
v20 = which means v2 (t) = arctan t,
4(1 + t2 ) 4

ignoring the integration constant (without loss of generality).


Putting this v20 in to the first equation:

t ln(1 + t2 )
v10 = − so that v1 (t) = − ,
4(1 + t2 ) 8

again ignoring the integration constant as above.


Consequently we arrive at the following general solution:

et/2 ln(1 + t2 ) tet/2 arctan t


y = yc + yp = c1 et/2 + c2 tet/2 − + .
8 4

Page 5 of 5

You might also like