Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Sheet 1 solutions: (partly produced by AIMS students ’08) Explicit solution of first order ordinary differential equations S1 General solutions for first order ODEs ex dy = dx 3 + 6ex This equation is a linear equation and it is solved using the separable method. (a) We are given: dy ex = dx 3 + 6ex Then ex dx 3 + 6ex dy = Integrating throughout, we obtain, Z Z dy = ex dx 3 + 6ex 1 ln |3 + 6ex | + K 6 which gives the general solution where K is constant. y(x) = x2 dy = (b) We are given: dx y This equation is a linear equation and it is solved using the separable method. x2 dy = dx y this implies y dy = x2 dx Integrating once yields, y2 x3 = +K 2 3 which gives our solution as, r y(x) = ± 2 ( x3 + K) 3 where K is a constant. dy + 3y = x + e−2x dx This equation is a linear equation. From, (c) We are given: dy + 3y = x + e−2x dx 1 (1) The integrating factor is R I(x) = e 3dx I(x) = Ke3x Multiplying equation (1) by e3x we obtain, e3x dy + 3e3x = xe3x + ex dx So, d 3x e y = xe3x + ex dx This implies that, Z 3x 3x e y= Let J(x) = R xe dx + Z ex dx (2) xe3x . We solve using integration by part. Let u = x and dv = e3x dx, du = dx and v = 13 e3x Z J(x) = (uv) − vdu Z 1 3x 1 = xe − e3x dx 3 3 1 3x 1 3x = xe − e + K 3 9 Replacing J in equation (2) we obtain, Z 1 3x 1 3x xe − e + K + ex dx e y = 3 9 1 1 e3x y = xe3x − e3x + ex + K 3 9 1 1 y(x) = x − + e−2x + Ke−3x 3 9 3x with K constant. dy = x cos(2x) − y dx This equation is a linear equation. By rearranging the equation, we obtain (d) We are given: x x dy + y = x cos(2x) dx which is equivalent to, d (xy) = x cos(2x) dx By integration, we obtain Z x cos(2x)dx xy = 2 (3) R Let I(x) = x cos(2x)dx, we solve I using integration by part. Let u = x and dv = cos(2x)dx, du = dx and v = 12 sin(2x). This implies that, Z 1 1 I(x) = x sin(2x) − sin(2x)dx 2 2 cos(2x) 1 +K I(x) = x sin(2x) + 2 4 Putting I into equation (3), we obtain cos(2x) 1 +K xy = x sin(2x) + 2 4 y(x) = 1 cos(2x) K sin(2x) + + if x 6= 0 and y(0) = 0 2 4x x where K is a constant. y 2 + 2xy dy = dx x2 This is a non-linear equation. Rearranging the equation we obtain, y dy y 2 = +2 dx x x (e) We are given: We solve the equation by changing the variables. y Let u = , this implies that, x du dy =u+x dx dx Then the equation (4) becomes, u+x du = u2 + 2u dx du = u2 + u dx By separating the variables we obtain, x 1 1 du = dx +u x 1 1 1 − du = dx u u+1 x u2 Integrating throughout we obtain, ln |u| − ln |u + 1| = ln |x| + ln |K| ln | Hence | u | = ln |Kx| u+1 u | = |Kx| u+1 3 (4) And But u = u = Kx u+1 y , it follows that, x y = Kx y+x 1 Kx2 , x 6= y(x) = 1 − Kx K where K is an arbitrary constant. dy =0 dx This equation is a non-linear equation. Let a(x, y) = x2 y + y and b(x, y) = xy 2 − x. Checking for exactness we have, (f) We are given: xy 2 − x + (x2 y + y) ∂a ∂b = 2xy = ∂x ∂y Therefore, the equation is an exact equation and the function Ψ exists and satisfies ∂Ψ ∂Ψ = a(x, y) and = b(x, y) ∂y ∂x From ∂Ψ = b(x, y) = xy 2 − x ∂x By integration we obtain, Ψ(x, y) = So x2 y 2 x2 − + Φ(y) 2 2 ∂Ψ = x2 y + Φ0 (y) ∂y But ∂Ψ = x2 y + y ∂y By comparison Φ0 (y) = y which implies that, Φ(y) = y2 +K 2 Hence x2 y 2 x2 y 2 − + +K 2 2 2 Then our solution is given as Ψ(x, y) = constant. This implies that, Ψ(x, y) = C + x2 1 + x2 1 C + x2 2 y(x) = ± 1 + x2 y2 = 4 S2 Initial value problems a) We are given: (sin(x) + x2 ey − 1) dy + y cos(x) + 2xey = 0, y(0) = 0 dx It is a non-linear equation. Let a(x, y) = sin(x) + x2 ey − 1 and b(x, y) = y cos(x) + 2xey . Checking for exactness we have, ∂a ∂b = 2xey + cos(x) = ∂x ∂y So ∂b ∂a = ∂x ∂y Therefore, the equation is an exact equation and the function Ψ exists and satisfies ∂Ψ ∂Ψ = a(x, y) and = b(x, y) ∂y ∂x From ∂Ψ = sin(x) + x2 ey − 1 ∂y Thus Ψ(x, y) = y sin(x) + x2 ey − y + Φ(x) and ∂Ψ = y cos(x) + 2xey + Φ0 (x) ∂x On the other hand, ∂Ψ = y cos(x) + 2xey ∂x Hence Φ0 (x) = 0 and Φ(x) = K and Ψ(x, y) = y sin(x) + x2 ey − y + K But Ψ(x, y) = C So y sin(x) + x2 ey − y + K = C y sin(x) + x2 ey − y = K Applying the condition y(0) = 0, we obtain K = 0 which implies that, y sin(x) + x2 ey − y = 0 y(sin(x) − 1) + x2 ey = 0 b) We are given: dy + y = y 4 , y(0) = 1 dt 5 This is a Bernoulli equation. Multiplying throughout by y −4 we get, y −4 Let u = y −3 . It follows that, dy + y −3 = 1 dx (5) dy du = −3y −4 . So dt dt dy 1 du = − y4 dt 3 dt Substituting this result to the equation (5) we have, − 1 du +u = 1 3 dt du = 3(u − 1) dt 1 du = 3dt u−1 By integrating we obtain, ln |u − 1| = 3t + K So |u − 1| = Ke3t u − 1 = Ke3t But u = y −3 , it follows that y −3 − 1 = Ke3t By using the condition y(0) = 1 we obtain, K = 0 and y(x) = 1. c) The equation is the same as that of (b). Referring to our general solution y −3 − 1 = Ke3t , and applying the condition y(0) = 2, we obtain K = − 87 and y= 1 7 1 − e3t 8 1/3 , t 6= 1 8 ln( ) 3 7 S3 Exact Equations Give the equation for the circle, parabola and hyperbola in the xyplane and derive an exact differential equation for each. 1. The equation of a circle is given as: x2 + y 2 = r2 . Let Ψ(x, y) = x2 + y 2 , then for the circle is: ∂Ψ ∂x = 2x and 2y ∂Ψ dy = 2. So the exact differential equation dy + 2x = 0 dx 6 2. The equation of a parabola is given as: y = ax2 + bx + c, a 6= 0. Let Ψ(x, y) = y − ax2 + bx. Then ∂Ψ ∂Ψ = −2ax + b and =1 ∂x dy Hence the exact differential equation for parabola is: dy − 2ax + b = 0 dx where a and b are constants. 3. The equation of hyperbola is given as: ∂Ψ 2x = 2 ∂x a x2 y 2 x2 y 2 − = 1. Let Ψ(x, y) = − 2, a2 b2 a2 b and 2y ∂Ψ =− 2 dy b Then the exact differential equation for the hyperbola is: − dy 2y dy 2x + 2 = 0 ⇔ a2 y − b2 x = 0 2 b dx a dx S4 We write θr for the temperature of the room (assumed constant), θc0 for the initial temperature of the coffee, θc (t) for the temperature of the coffee at time t, θm0 for the initial temperature of the milk, θm (t) for the temperature of the milk at time t, a a for the fraction of coffee, b for the fraction of milk, so that a + b = 1. Newton’s law of cooling says that the any substance (coffee, milk, coffee with milk) changes temperature θ according to dθ = −k(θ − θr ), dt for some constant k. So θ(t) = θr + (θ0 − θr )e−kt The first person first mixes coffee and milk, giving ‘coffee with milk’ at temperature θ1,0 = aθc0 + bθm0 Then the ‘coffee with milk’ cools down according to Newton’s law of cooling and reaches the temperature θ1 (T ) = θr + (aθc0 + bθm0 − θr )e−kT after T =5 minutes. For the second person, the coffee first cools down and reaches θ2c (T ) = θr + (θc0 − θr )e−kT 7 while the milk warms up to reach θ2m (T ) = θr + (θm0 − θr )e−kT at T = 5 minutes. Then coffee and milk are mixed, to give a mixture with temperature θ2 (T ) = aθ2c (T ) + bθ2m (T ) = (a + b)θr + (aθc0 + bθm0 − (a + b)θr )e−kT (6) However, since a + b = 1, we conclude θ1 (T ) = θ2 (T ) so that the two friends drink coffee of exactly the same temperature. 5. Consider the following mathematical theory of epidemics. Assume that there is a community of N members with I infected and U uninfected individuals. U + I = N . U we get, Defining the ratios x = NI and y = N x+y =1 (7) and dx = βxy dt where β is a real and positive constant of proportionality. (a) Using equations (7) and (8) we obtain dx = βx(1 − x) dt Then Integrating once yields, dx = βdt x(1 − x) 1 1 + dx = βdt x 1−x x | = βt + K 1−x x | | = Ceβt 1−x ln | Hence x(t) = Ceβt 1 + Ceβt where C is a constant (b) Given that x(0) = x0 C x0 We have x(0) = = x0 , then C = and therefore, 1+C 1 − x0 x(t) = x0 eβt (1 − x0 ) + x0 eβt 8 (8) (c) Given x0 > 0, we want to show that lim x(t) = 1 t→∞ It follows that, x0 eβt t→∞ (1 − x0 ) + x0 eβt lim x(t) = lim t→∞ lim x(t) = lim t→∞ t→∞ x0 eβt lim x(t) = lim t→∞ But t→∞ x eβt 0 1−x0 x0 eβt +1 1 1−x0 x0 eβt +1 1 − x0 = 0, β > 0 t→∞ x0 eβt lim So lim x(t) = 1 t→∞ Interpretation: From our solution we observe that as the time increases, the entire population is likely to be infected by the epidemic. (d) Criticism to the model • The model does not take into account death (of either infected or uninfected people) and birth. • The model does not take into account recovery of infected people, and possible immunity of recovered people. • The model assumes that there are no preventive measures. 9