ODE Assign 2 Sol

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

MTH 102, ODE: Assignment-2

1. Find general solution of the following differential equations:

(T)(i) (x + 2y + 1) − (2x + y − 1)y 0 = 0 (ii) y 0 = (8x − 2y + 1)2 /(4x − y − 1)2

Solution:

(i) Use transformation x = X + h, y = Y + k such that h + 2k + 1 = 2h + k − 1 = 0.


Thus h = 1, k = −1 and the ODE becomes dY /dX = (X + 2Y )/(2X + Y ). Further
substitution of vX = Y leads to separable form Xdv/dX = (1−v 2 )/(2+v). Hence,
3 dv 1 dv dX |1 + v|
+ = =⇒ 3
= CX 2 =⇒ |X + Y | = C|X − Y |3
2 (1 − v) 2 (1 + v) X |1 − v|
Substituting X and Y we find |x + y| = C|x − y − 2|3 .
(ii) Substituting 4x − y = v leads to the separable form dv/dx = 3(1 − 4v)/(v − 1)2 .
This can be written as
(v − 1/4 − 3/4)2 1 3 9 1
dv = −12 dx =⇒ v − − + = −12 dx
v − 1/4 4 2 4 4v − 1
Or

8v 2 −28v+9 ln |4v−1| = −192x+C =⇒ 8(4x−y)2 −28(4x−y)+9 ln |16x−4y−1|+192x = C

2. Find the solution of the initial value problem


2x4 p √
xy 0 = y + cos(x2 ), y( π/2) = π.
y

Solution: The given ODE is equivalent to

y 0 = y/x + 2x2 /(y/x) cos(x2 ).

Substituting y = xv, we find

vv 0 = 2x cos(x2 ) =⇒ v 2 = 2 sin(x2 ) + A =⇒ y 2 = 2x2 sin(x2 ) + Ax2

Using initial condition we find A = 0. Hence, solution is y 2 = 2x2 sin(x2 )

3. Reduce the differential equation


 
0 ax + by + m
y =f , ad − bc 6= 0
cx + dy + n
to a separable form. Also discuss the case of ad = bc.
Solution: Use transform x = X + h, y = Y + k where h, k satisfies ah + bk + m =
ch + dk + n = 0 (such choice of h, k is possible since ad − bc 6= 0). We get
 
0 aX + bY
Y =f .
cX + dY
Let vX = Y . Then Y 0 = dY /dX = v + Xv 0 ODE reduces to

dv dX
a+bv
 = ,
f c+dv
−v X

which is in seperable form.


If ad = bc, then ax + by = λ(cx + dy). Use substitution w = cx + dy to get w0 = c + dy 0 .
Substituting in the given equation,

w0 − c
 
λw + m
=f = g(w) =⇒ w0 = c + dg(w),
d w+n

which is an ODE in separable form.

4. Show that the following equations are exact and hence find their general solution:
2 2
(T)(i) (cos x cos y − cot x) = (sin x sin y)y 0 (ii) y 0 = 2x(ye−x − y − 3x)/(x2 + 3y 2 + e−x )

Solution:
(i) Comparing the given ODE with with M dx + N dy = 0 with y 0 = dy/dx, we have
M = (cos x cos y − cot x), N = − sin x sin y. Clearly ∂M/∂y = ∂N/∂x. Hence the ode
is exact.
Since the ODE is exact, we must have
∂u ∂u
M dx + N dy = du = dx + dy
∂x ∂y

for some u(x, y). Now ∂u


R
∂x
= M implies u = M dx = sin x cos y − ln | sin x| + f (y). Since
0
∂u/∂y = N , we get f = 0 and hence f = C. Thus the solution is sin x cos y−ln | sin x| =
C.
(ii) Comparing the given ODE with with M dx + N dy = 0 with y 0 = dy/dx, we have
2 2
M = 2x(y + 3x − ye−x ) and N = x2 + 3y 2 + e−x . Clearly ∂M/∂y = ∂N/∂x and so the
ode is exact.
Since the ODE is exact, we must have
∂u ∂u
M dx + N dy = du = dx + dy
∂x ∂y
2
for some u(x, y). Now ∂u M dx = x2 y + 2x3 + ye−x + f (y). Since
R
∂x
= M implies u =
∂u/∂y = N , we get f 0 = 3y 2 and hence f (y) = y 3 + C. Thus the general solution is
2
x2 y + 2x3 + ye−x + y 3 = C. (Implicit solution.)

5. Show that if the differential equation is of the form

xa y b (my dx + nx dy) + xc y d (py dx + qx dy) = 0,


where a, b, c, d, m, n, p, q ∈ R (mq 6= np) are constants, then there exits suitable h, k ∈ R
such that xh y k is an integrating factor. Hence find a general solution of (x1/2 y − xy 2 ) +
(x3/2 + x2 y)y 0 = 0.
Solution:
Multiplying by xh y k we find M = mxa+h y b+k+1 + pxh+c y d+k+1 and N = nxa+h+1 y b+k +
qxc+h+1 y d+k . Using the condition for exactness, we get

nh − mk = m(b + 1) − n(a + 1)
qh − pk = p(d + 1) − q(c + 1)

Since np 6= mq, we can solve for h, k.


The given ODE can be written as x1/2 (ydx + xdy) + xy(−ydx + xdy) = 0. Hence,
a = 1/2, b = 0 and c = d = 1 and m = n = q = 1, p = −1. The equations for h and k
becomes
h − k = −1/2 h + k = −4 =⇒ h = −9/4, k = −7/4.
The given ODE becomes (x−7/4 y −3/4 − x−5/4 y 1/4 )dx + (x−3/4 y −7/4 + x−1/4 y −3/4 )dy = 0.
Here M = x−7/4 y −3/4 −x−5/4 y 1/4 and hence u = M dx = −4x−3/4 y −3/4 /3+4x−1/4 y 1/4 +
R

f (y). Since ∂u/∂y = N , we find f 0 = 0 and hence f = C. Thus the solution is


x−3/4 y −3/4 − 3x−1/4 y 1/4 = C.

6. (T) Given that the equation (3y 2 − x) + 2y(y 2 − 3x)y 0 = 0 admits an integrating factor
which is a function of (x + y 2 ). Hence solve the differential equation.
Solution:
Assume that F (x + y 2 ) is an integrating factor. Multiplying by F (x + y 2 ) we find
M = (3y 2 − x)F (x + y 2 ) and N = 2y(y 2 − 3x)F (x + y 2 ). Using the condition of
exactness ∂M/∂y = ∂N/∂x, we get

6yF (x + y 2 ) + (3y 2 − x)F 0 (x + y 2 ).2y = −6yF (x + y 2 ) + 2y(y 2 − 3x)F 0 (x + y 2 ).

Simplifying,
dF 1
z = −3F =⇒ F = 3 , z = x + y 2 .
dz z
Hence
3y 2 − x 4y 2 − t 2y 2 1
Z Z Z
u= M dx = dx = dt = − + + f (y),
(x + y 2 )3 t3 t2 t
by substituting t = x + y 2 . Hence
x − y2
u= + f (y).
(x + y 2 )2
Since ∂u/∂y = N , we find f 0 = 0 and hence f =constant. Hence the solution is
x − y2
=C
(x + y 2 )2
7. Consider first order ODE M (x, y)dx + N (x, y)dy = 0 with M, N are C 1 functions on R2 .
Show that
(T)(i). If ( ∂M − ∂N
R
∂y ∂x
)/N = f (x) depends on x only then, exp( f (x)dx) is an integrating
factor for the given ODE.
(ii). If ( ∂M − ∂N
R
∂y ∂x
)/M = g(y) depends on y only then, exp(− g(y)dy) is an integrating
factor for the given ODE.
R

Solution: (i) Let µ = e f (x)dx
. Then ∂y
(µM ) = µ ∂M
∂y
and

∂ ∂N ∂µ ∂N ∂N ∂M ∂(µM )
(µN ) = µ +N =µ + N µf = µ( + Nf) = µ =
∂x ∂x ∂x ∂x ∂x ∂y ∂y
(ii) Similarly.


8. Find integrating factor and solve the following.


(T) (i) 2 sin(y 2 ) + xy cos(y 2 )y 0 = 0.
(ii) xy − (x2 + y 4 )y 0 = 0.
Solution:
(i) Comparing with M dx + N dy = 0, we have M = 2 sin(y 2 ), N = xy cos(y 2 ). Then
∂M
∂y
= 4y cos(y 2 ) and ∂N
∂x
= y cos(y 2 ). So ( ∂M
∂y
− ∂N
∂x
)/N = 3/x which is a function of x
R 3
only. So an integrating factor is exp(3/x)dx = x .
Multiplying by x3 , we have exact equation M dx + N dy = 0 with M = 2x3 sin(y 2 ), N =
x4 y cos(y 2 ). If we assume that the M dx + N dy = du(x, y), then,
x4 sin(y 2 )
Z
u = M dx = + f (y)
2
Since ∂u/∂y = N , we find f 0 = 0 and hence f =constant. Hence the solution is
x4 sin(y 2 )
= A or x4 sin(y 2 ) = C.
2

(ii) Comparing with M dx + N dy = 0, we have M = xy, N = −(x2 + y 4 ). Then


∂M
∂y
= x, ∂N
∂x
= −2x. So ( ∂M − ∂N )/M = 3x/xy = 3/y which is a function of y only. So
R ∂y ∂x
an integrating factor is exp(−3/y)dy = 1/y 3 .
Multiplying by 1/y 3 , we find M = x/y 2 and
x2
Z
u = M dx = 2 + f (y)
2y
Since ∂u/∂y = N , we find f 0 = −y and hence f = −y 2 /2 + A Hence the solution is
x2 y2
− =B implies x2 − y 4 = Cy 2 .
2y 2 2
9. (T) Show that the set of solutions of the homogeneous linear equation, y 0 + P (x)y = 0
on an interval I = [a, b] form a vector subspace W of the real vector space of continuous
functions on I. What is the dimension of W ?
Solution:
The zero function 0(x) ≡ 0 satisfies y 0 + P (x)y = 0. Hence, W is nonempty. Let
u(x), v(x) ∈ W are two arbitrary solutions of y 0 + P (x)y = 0. Consider w(x) = αu(x) +
v(x), where α is a real number. Now, w0 + P (x)w = 0 ⇒ w(x) ∈ W and hence W is
R
a subspace. We also note that any solution is of the form y = Ce− P (x)dx . Thus W is
R
spanned by e− P (x)dx and so dim(W )=1.
(Remark: Solutions of non-homogeneous or non-linear equations may not form a vector
space. )

10. Solve the linear first order linear IVP y 0 + y tan x = sin 2x, y(0) = 1.
[ Recall: For y 0 + p(x)y = r(x), the left hand side becomes exact if we multiply by
d
R
µ(x) = exp( p(x)dx)). We get dx (µ(x)y) = µ(x)r(x). Integrating, general solution is
Z
−1
y(x) = µ(x) µ(x)r(x)dx + c.

]
Solution: Comparing with y 0 + p(x)y = r(x), we get p(x) = tan x, r(x) = sin 2x.
Then,
Z Z Z
p(x)dx = ln(sec x), µ(x) = sec x, µ(x)r(x)dx = sec x 2 sin x cos xdx = −2 cos x+c.

So general solution is y(x) = c cos x − 2 cos2 x. Initial condition gives c = 3. 

11. (T) Let φi be a solution of y 0 + ay = bi (x) for i = 1, 2. Show that φ1 + φ2 satisfies


y 0 + ay = b1 (x) + b2 (x).
Solve y 0 + y = x + 1, y 0 + y = cos 2x. Hence solve y 0 + y = 1 + x/2 − cos2 x
Solution:
Verification is easy.
For y 0 + y = x + 1, y1 = C 0 e−x + x and for y 0 + y = cos 2x is y2 = C 00 e−x + (cos 2x +
2 sin 2x)/5.
R
(Integrating by parts xex dx = xex − ex . Also
eax
Z
ax
e cos bxdx = 2 (a cos bx + b sin bx).
a + b2
)
Now y 0 + y = 1 + x/2 − cos2 x = 1+x
2
− cos22x . Since, the equation is linear, the solution
of y 0 + y = 1 + x/2 − cos2 x is y = (C 0 + C 00 )e−x + x/2 − (cos 2x + 2 sin 2x)/10 =
Ce−x + x/2 − (cos 2x + 2 sin 2x)/10.
12. Using appropriate substitution, reduce the following differential equations into linear
form and solve:
(T) (i) y 2 y 0 + y 3 /x = x−2 sin x (T) (ii) y 0 sin y + x cos y = x (iii) y 0 = y(xy 3 − 1)
Solution:
[Recall that Bernoulli equation is of the form y 0 + P (x)y = Q(x)y n . To solve it, we have
to change variable to z = y 1−n . Then it reduces to linear ODE z 0 + (1 − n)P (x)z =
(1 − n)Q(x).
d dy
More generally, for dy (f (y)) dx + P (x)y = Q(x), substite v = f (y) to reduce it to linear
dv
dx
+ P (x)v = Q(x). Bernoulli equation is a special case with f (y) = y 1−n .]

(i) Substitute u = y 3 and the ODE transform to linear form u0 + 3u/x = 3x−2 sin x.
Using integrating factor x3 , we write
d
(ux3 ) = 3x sin x =⇒ ux3 = 3(−x cos x + sin x) + C
dx
Thus, the solution is x3 y 3 + 3(x cos x − sin x) = C.
(ii) Substitute − cos y = u which leads to the linear form u0 − xu = x. Using integrating
2
factor e−x /2 , we write
d 2 2 2 2 2
(ue−x /2 ) = xe−x /2 =⇒ ue−x /2 = −e−x /2 + C =⇒ u = −1 + Cex /2
dx
2 /2
Hence, the solution is cos y = 1 − Cex .
(iii) u = 1/y 3 leads to u0 − 3u = −3x. Using integrating factor e−3x , we write
d 1 + 3x −3x 1 + 3x
(ue−3x ) = −3xe−3x =⇒ ue−3x = e + C =⇒ u = + Ce3x .
dx 3 3
Hence, the solution is 1/y 3 = Ce3x + x + 1/3.

13. (T) A radioactive substance A decays into B, which then further decays to C.
a) If the decay constants of A and B are respectively λ1 and λ2 , and the initial amounts
are respectively A0 and B0 , set up an ODE for determining B(t), the amount of B
present at time t, and solve it. (Assume λ1 6= λ2 .)
b) Assume λ1 = 1, λ2 = 2. When B(t) reaches a maximum?
Solution: dA/dt = −λ1 A and

dB/dt = rate at which B produced by decay of A− rate at which B is lost by decay of B to C

= λ1 A − λ2 B.

From the first equation A = A0 e−λ1 t . So we get dB/dt + λ2 B = λ1 A0 e−λ1 t . This is a


linear first order ODE with initial condition B(0) = B0 . Solving, we get

B(t) = 1/(λ2 − λ1 )[λ1 A0 e−λ1 t + (B0 − λ1 A0 )e−λ2 t ].


For λ1 = 1, λ2 = 2, we have B(t) = A0 e−t + (B0 − A0 )e−2t . For maximum, we solve
0 = B 0 (t) = −A0 e−t − 2(B0 − A0 )e−2t . This gives et = 2(A0 − B0 )/A0 . We must get
time t ≥ 0, i.e, et ≥ 1, for A0 ≥ 2B0 and in this case t = ln( 2(A0A−B
0
0)
). Otherwise B is
maximum initially at t = 0.

14. According to Newton’s Law of Cooling, the rate at which the temperature T of a body
changes is proportional to the difference between T and the external temperature. At
time t = 0, a pot of boiling water is removed from the stove. After five minutes, the
water temperature is 80C. If the room temperature is 20C, when will the water have
cooled to 60C?
Solution: By Newton’s cooling law dT dt
= k(T − 20) where k is the constant of pro-
portionality. Solving it we get T (t) = cekt + 20. The initial condition T (0) = 100 gives
c = 80. Thus T (t) = 80ekt + 20.
Now after 5 minutes, the temperature of water is 80C. So T (5) = 80 gives k = 1/5 ln(3/4)
Now the time t to cooled down the water to 60 is given by T (t) = 60, implies kt = ln(1/2),
t = 5 ln(2)/ ln(4/3) (≈ 12) minutes.

You might also like