You are on page 1of 6

ODE - SOLUTIONS OF ASSIGNMENT 1

Question (2). A thermometer, reading 10 C, is brought into a room whose temperature is 23 C. Two minutes later the thermometer reading is 18 C. Use Newtons Law of Cooling to model the change of the thermometer reading with time. How long will it take until the reading is practically 23 C, say, 22.8 C? Solution: (a) According to the Newtons Law of cooling, the ODE governing the rate of change of thermometer reading with time is given by dT = k(T (t) TA ), (1) dt where T (t) is the thermometer reading at time t, k is some constant and TA is the room temperature. Rearranging the ODE (1), we dT obtain T TA = kdt. Integrating both sides, we get ln|T TA | = kt + ln(c) = TA T = cekt . (2) We are given that T (0) = 10 C, T (2) = 18 C and that TA = 23 C. Substituting the value of TA in (2), we get 23 T (t) = cekt . Then, substituting T (0) = Thus, Equation (3) becomes 10 C (3) in (3), we get 2310 = c; so, c = 13. (4)

T (t) = 23 13ekt .

Finally, substituting T (2) = 18 C in (4), we obtain 18 = 23 13e2t 1 5 so that k = 2 ln( 13 ) 0.47776. Thus, at time t, the thermometer gives the reading T (t) = 23 13e0.47776t . (5) (b) We need to nd t such that T (t) = 22.8 C. From Equation (5), we get 2 ) = 0.47776t 22.8 = 23 13e0.47776t = ln( 130 2 1 ln( ) 8.7375 minutes. = t = 0.47776 130 C after about 8.74 minutes. So, the reading will be 22.8

Question (4). Solve the following ODEs:


1

ODE - SOLUTIONS OF ASSIGNMENT 1

(a) (b) (c) (d)

sin(y)cos(y) + xcos2 (y) dx + xdy = 0. ey sinh(x)dx + cosh(x)dy = 0. (x2 + y 2 )dx 2xydy = 0. cos(xy) + x dx + 1 + x cos(xy) dy = 0. y y

Solution: (a) The given ODE is sin(y)cos(y) + xcos2 (y) dx + xdy = 0. Let M (x, y) = sin(y)cos(y) + xcos2 (y) and N (x, y) = x. Then, M = sin2 (y) + cos2 (y) 2xcos(y)sin(y) y and Clearly M y calculate R = (7) (6)

N = 1. (8) x = N , thus the ODE (6) is not an exact ODE. We now x

1 M N N y x 1 sin2 (y) + cos2 (y) 2xcos(y)sin(y) 1 , = x which is not a function of x alone. So now we calculate M 1 N = M x y 1 = 1 + sin2 (y) cos2 (y) + 2xcos(y)sin(y) sin(y)cos(y) + xcos2 (y) = 2tan(y), which is a function of y alone. Thus the integrating factor is F (y) = e
tan(y)dy

= sec2 (y).

Multiplying Equation (6) by F (y) = sec2 (y) we get tan(y) + x dx + xsec2 (y)dy = 0. (9)

We can easily check that Equation (9) is an exact ODE and therefore there exists a function u of x and y such that u(x, y) = c = constant is an implicit solution to ODE (9) and hence to the ODE(6). Now since u = c is a solution to Equation (9), u = tan(y) + x x and u = xsec2 (y). y (10)

(11)

ODE - SOLUTIONS OF ASSIGNMENT 1

Integrating Equation (10) with respect to x we get u(x, y) = xtan(y) + x2 /2 + k(y), which when we dierentiate with respect to y we obtain u = xsec2 (y) + k (y). y

(12)

(13)

Then from (11) and (13) we get k (y) = 0 for all y which implies that k(y) = constant = C forall y. (14) Using (14) in (12) we obtain that u(x, y) = xtan(y) + x2 /2 + C. Hence xtan(y) + x2 /2 = c C = constant is a solutin to the given ODE (6). (b) The given ODE is ey sinh(x)dx + cosh(x)dy = 0. This implies that sinh(x)dx + cosh(x)dy = 0, since ey = 0 for all y. Thus we have tanh(x)dx = dy, which when we integrate gives y = ln(kcosh(x)), where k is a constant. Alternatively: The given ODE is exact and so can also be solved using the respective method to solve exact ODEs. (c) The given ODE is (x2 + y 2 )dx 2xydy = 0.

(15)

Let y = ux. Then y = u x + u. Using y = ux and y = u x + u in Equation (15) we get 1 u2 . 2u Now separating the variables and integrating both sides we obtain xu =

x(1 u2 ) = c,

(16)

where c is an arbitrary constant. Lastly, substituting the value of u = y/x in (16) we get x2 cx = y 2 . (d) The given ODE is x x dx + 1 + cos(xy) dy = 0 (17) y y Let M (x, y) = cos(xy) + x and N (x, y) = 1 + x cos(xy). Then y y cos(xy) + x M = xsin(xy) 2 y y (18)

ODE - SOLUTIONS OF ASSIGNMENT 1

and Clearly M y now calculate

cos(xy) N = xsin(xy). (19) x y = N , thus the ODE (17) is not an exact ODE. We x R =

1 M N N y x x + ycos(xy) = , y(y + xcos(xy)) which is not a function of x alone. So now we calculate M 1 N R = M x y 1 = , y which is a function of y alone. Hence the integrating factor is F (y) = e Multiplying ODE (17) with
1 dy y

= y. = y we get (20)

F (y)

(cos(xy) + x)dx + (y + xcos(xy))dy = 0.

We can easily check that Equation (20) is an exact ODE Therefore there exists a function u(x, y) such that u(x, y) = c = constant is an implicit solution to ODE (20) and hence to the ODE(17). Now since u = c is a solution to Equation (20), u = ycos(xy) + x (21) x and u = y + xcos(xy). (22) y Integrating Equation (21) with respect to x we get u(x, y) = sin(xy) + x2 /2 + k(y), which when we dierentiate with respect to y we obtain u = xcos(xy) + k (y). y Then from Equations (22) and (24) k (y) = y. Thus k(y) = y 2 + C, u(x, y) = sin(xy) + x2 /2 + y 2 /2 + C. Hence sin(xy) + x2 /2 + y 2 /2 = c C = constant is an implicit solution to the given ODE(17). (25) where C is an arbitrary constant. Lastly, using (25) in (23) we get

(23)

(24)

ODE - SOLUTIONS OF ASSIGNMENT 1

Question (6).

(a) Solve the ordinary dierential equation: y tan(x) = 2y 8.

(b) Sketch the family of solutions given by the general solution to the above ODE. (c) Give the particular solution to the above ODE such that y = 0 when x = /2. Solution: (a) The given ODE is y tan(x) = 2y 8. Rearranging the ODE (26), we obtain dy = cot(x)dx. 2(y 4) Integrating both sides, we get ln|y 4| = 2ln|sin(x)| + ln(c) = ln|(y 4)| = ln(csin2 (x)) = (y 4) = csin2 (x) = y = 4 csin2 (x), where c > 0 is the constant of integration. So, the general solution is y = 4 c sin2 (x) where c > 0 is a constant. (b) We need to plot the family y = 4 csin2 (x) for c > 0, which is same as plotting the family y = 4 + csin2 (x) for arbitrary constant c.
7 c = 3 c = 2 c = 1 c=0 c=1 c=2 c=3

(26)

1 10

10

ODE - SOLUTIONS OF ASSIGNMENT 1

(c) If y(/2) = 0, then 0 = 4 csin2 (/2) which implies that c = 4. Hence the particular solution is y = 4 4sin2 (x) = 4cos2 (x).