solutionsproblemshee..

2326 Problem Sheet 1. Solutions1
First Order Differential Equations
Question 1: Solve the following, given an explicit solution if possible:
2y
1. y 0 − x = 4x3 , y(1) = 3, (F)
The given equation is a first order linear equation with integrating factor:
Z 2
µ(x) = exp −
= exp(−2 ln x) = x−2
x
Multiplying the ODE by this factor we get:
(yx−2 )0 = 4x ⇒ yx−2 = 2x2 + C ⇒ y = 2x4 + Cx2
Imposing the initial condition y(1) = 3
3 = 2 + C ⇔ C = 1 ⇒ y(x) = 2x4 + x2
2. y 0 − t2 y 2 = 0
This equation can be solved using separation of variables. The solution is
y(t) = 3/(−t3 + 3C), for some constant C.
3. x2 y 0 = x ln y − y 0
We can rewrite the equation as follows:
(x2 + 1)y 0 = x ln y ⇒
1
y0
= 2
ln y
x +1
By separation of variables
Z
Z
Z
1
1
x
1
dx ⇒
dy =
= ln(1 + x2 ) + C
2
ln y
ln y
2
x +1
The solution is left implicitly since we do not know any method to solve
R 1
dy.
ln y
1
Esther Vergara Diaz, [email protected], see also http://www.maths.tcd.ie/~evd
1
4. xy 0 = y(ln x − ln y).
y
We have to make the substitution v = x , which implies v 0 x + v = y 0 :
xy 0 = y(ln x − ln y) ⇒ y 0 =
y x
ln
x y
The solution is
y(x) =
xe−1
C
,
ex
for some constant C
x
5. y 0 = 1 e+ y , y(0) = 1. Using separation of variables, we get
y(x) = −1 −
√
1 + 2ex + 2C
6. P 0 = aP − bP 2 , a and b constants.
Using separation of variables, and assuming the independent variable is x,
we have:
P0
=1⇒
aP − bP 2
Z
1
dP =
aP − bP 2
Z
dx
We need to use partial fraction decomposition in the left hand side of the
equation:
A
1
B
A(a − bP ) + BP
+
=
2 =
P
a − bP
P (a − bP )
aP − bP
1 and
Equating coefficients, we get Aa = 1 and B − Ab = 0 then A = a
B = ab . Then
Z
Z
Z
1
1
1
b
1
1
1
dP +
dP = ln |P | − ln |a − bP |
2 dP =
a
P
a
a − bP
a
a
aP − bP
so
ln |
P
P
| = ax + C ⇒ |
| = Aeax ,
a − bP
a − bP
for some constant A. We can leave it in its implicit form.
2
7. y 0 = y(1 − y) cos x, (F) Using separation of variables, we get the following
implicit result:
y + y 2 = ex + C
for some constant C. Imposing the initial condition
2=1+C ⇒C =1
Thus
y(x) + y(x)2 = ex + 1
8. xyy 0 + 4x2 + y 2 = 0, y(2) = −7 , (F)
Dividing both sides by x2 and rewriting the equation a little, we get:
y 2
y 0
y = −4 −
x
x
y
Let v(x) = x or vx = y, recall that both v and y are functions of x, we get
can differentiate this equation to get
v0x + v = y0
The ODE is rewritten as
v(v 0 x + v)y 0 = −4 − v 2
We rewrite the equation so we can use separation of variables:
Z
Z
v
1
4 + 2v 2
0
2
0
vxv = −4 − 2v ⇒ xv = −
⇒
dx
2 dv = −
v
x
4 + 2v
Then:
1
1
1
D
ln(4 + 2v 2 ) = − ln x + C ⇒ ln(4 + 2v 2 ) 4 = ln x−1 + C ⇒ (4 + 2v 2 ) 4 =
4
x
So
4 + 2v 2 =
A
B
B
2
2
2
4 ⇒ v = 4 − 2 ⇒ y = 2 − 2x
x
x
x
3
We do not take square roots since this will get two solutions. We leave the
solution written implicitly. Now we impose the initial condition, y(2) = −7:
49 = y 2 (2) =
B
− 2 · 22 ⇔ B = 228
22
Then,
y = ±(
228
2 12
2 − 2x )
x
But since the initial condition was negative, we can ignore positive square
root:
228
2 12
2 − 2x )
x
y=(
y
9. y 0 − t + 1 = t, (F)
The given equation is a first order linear equation with integrating factor:
Z
µ(t) = exp −
1
t+1
= exp(− ln(t + 1)) =
1
t+1
Multiplying the ODE we get:
⇒
1
y
t+1
0
=
−1
t
=1+
1+t
1+t
y
= t − ln(1 + t) + A ⇒ y(t) = t(t + 1) − (t + 1) ln(t + 1) + A(t + 1)
t+1
10. y 0 + x−1 y = xy 2
The solution is
y(x) =
1
,
(−x + C)x
for some constant C.
11. (1 + x3 )y 0 = 3x2 y + x2 + x5
We rewrite it as
y0 −
3x2
x2 + x5
y
=
1 + x3
1 + x3
4
2
2
5
and observe that it is linear with P (x) = − 3x 3 and Q(x) = x + x3 .
1+x
1+x
R
2
3
− 3x dx
The integral factor is µ(x) = e 1+x3 = e− ln(1+x ) = 1 3 . Multiplying
1+x
the equation by µ(x), we get:
0
x2 + x 5
1 6x2 + 6x5
1
x2 + x5
=
=
y
=
6 1 + 2x3 + x6
1 + x3
(1 + x3 )2
1 + 2x3 + x6
Integrating at both sides of the equation:
y
1
x3 + 1
3
=
ln(x
+
1)
+
C
⇒
y(x)
=
(ln(x3 + 1) + D),
3
3
1 + x3
where D = 3C.
y0
Using separation of variables after writing the equation as y = −x2 cos x,
we get the
Z
ln |y| = −
x2 cos xdx = −x2 sin x + 2 sin x − 2x cos x + C
or
y(X) = Ae−x
2
sin x+2 sin x−2x cos x
for some constant A
12. y 0 =
y2 + 1
y , y(1) = 2, (F)
We rewrite the equation as follows:
y0y
=1
y2 + 1
and use separation of variables:
Z
Z
y
1
dy = dx = x + C ⇒ ln(y 2 + 1) = x + C
2
2
y +1
√
ln(y 2 + 1) = 2x + D ⇒ y 2 = Ee2x − 1 ⇒ y = ± Ee2x − 1
Imposing the initial condition we observe that the negative square root can
be ignored and
4 = Ee2 − 1 ⇔
5
3
=E
e2
So the solution is
r
y(x) =
3 2x
e −1
e2
Question 2:
(a) Show that the initial value problem ty 0 = 3y, y(0) = 1, has no solutions.
Solving the equation using the method of separation of variables:
y(t) = Ct3
Imposing the initial value we see that 1 = y(0) = C03 which is a contradiction,
so this IVP does not have solution.
(b) Show that the initial value problem ty 0 = 3y, y(0) = 0 has infinitely many
solutions By separation of variables y(t) = Ct3 , but all those curves go through
zero, thus, y(0) = C0 = 0, for every C, so there are infinitely many solutions.
(c) Show that the initial value problem ty 0 = 3y, y(3) = 5 has a unique
solution.
5 , so the unique solution is
In this case y(t) = Ct3 ⇒ 5 = C33 ⇒ C = 27
y(t) =
5 3
t.
23
Question 3: Classify the following ODEs (linear, homogenous, order).
1. s2 x0 (s) + s4 x(s) = s,
2. t2 y 00 (t) + y(t)y 0 (t) = 1,
first order linear nonhomogeneous ode.
second order nonlinear nonhomeneous ode.
3. xy 000 (x) + sin xy(x) = 0, third order linear homogeneous ode.
4. xy 00 (x) + ex y 0 (x) = 0, second order linear homogeneous ode.
2
5. y 0 (t)y 0000 (t) + et y(t)2 = sin t, fourth order nonlinear nonhomegeneous ode.
6
Question 4: (F)
(a) Show that if y 0 = G(ax + by), then the change of variable w = ax + by
reduce the equation to a separable one.
0
If w = ax + by, then w0 = a + by 0 or y 0 = w − a .
b
We can rewrite the ODEs in terms of w:
w0 − a = G(w) ⇒ w0 = G(w)b + a which can be solve by separation of
b
variables:
Z
Z
1
dw = dx = x + C
G(w)b + a
(b) Consider the following change of variables w = 4x − y to solve the following
differential equation:
y 0 − (4x − y + 1) = 0
If w = 4x − y, then
0
0
0
Z
0
−w −4 = y ⇒ −w −4−w−1 = 0 ⇒ w = −(w+5) ⇒
1
dw =
w+5
ln(w + 5) = −x + C ⇒ w + 5 = De−x ⇒ w = De−x − 5
But w = 4x − y, then we can rewrite the solution in terms of y :
y(x) = −De−x + 5 + 4x
(F) To hand in on February, 3d.
7
Z
dx = −x+C