MATH 307 Introduction to Differential Equations Autumn 2017 Midterm Exam Monday November 6 2017 Name: Student ID Number: I understand it is against the rules to cheat or engage in other academic misconduct during this test. (SIGN HERE) Question 1 8 Question 2 5 Question 3 5 Question 4 4 Question 5 5 Question 6 6 Question 7 5 Total 38 There are 7 questions. Make sure your exam contains all these questions. You are allowed to use a scientific calculator (no graphing calculators) and one two-sided hand-written 8.5 by 11 inch page of notes. You must show your work on all problems. The correct answer with no supporting work may result in no credit. Put a box around your FINAL ANSWER for each problem and cross out any work that you don t want to be graded. If you need more room, use the backs of the pages and indicate that you have done so. Any student found engaging in academic misconduct will receive a score of 0 on this exam. You have 50 minutes to complete the exam. 1
Problem 1 (1+4+3 pts). A tank originally contains 100 gal of fresh water. Then water containing 1/2 lb of salt per gallon is poured into the tank at a rate of 2 gal per min, and the mixture is allowed to leave at a rate of 3 gal per min. a. How many gallons of water are in the tank after t minutes? (You do not need to set up a DE to answer this question.) Sol. 100-t. b. Find the amount of salt in the tank after 10 minutes. Sol. If y(t) denotes the amount of salt in the tank after t minutes, we have i.e. The integrating factor is and the integrating factor equation becomes Integrating, we get so that The initial condition y(0) = 0 gives so that C = 0.00005. Finally, we get and y(10) = 8.55 dt = 1 2 (2) 3 y 100 t, dt + 3 100 t y = 1. µ(t) = e 3/(100 t) dt = (100 t) 3, d dt ((100 t) 3 y) = (100 t) 3. (100 t) 3 y = 0.5(100 t) 2 + C, y(t) = 0.5(100 t) + C(100 t) 3. 0 = 0.5(100) + C(100) 3, y(t) = 0.5(100 t) 0.00005(100 t) 3, 2
c. After 10 minutes, the process is stopped, and fresh water is poured into the tank at a rate of 2 gal per min, with the mixture also leaving at a rate of 2 gal per min. Find the amount of salt in the tank at the end of an additional 10 min. Sol. Let y(t) denotes this time to amount of salt in the tank t minutes after the process is stopped. Then we have dt = 2(0) 2 y 90, since after 10 minutes, the volume is 90 gal. Separating variables and integrating, we get i.e. 1 y = 1 45 dt y(t) = Ce t/45. The initial condition y(0) = 8.55 gives C = 8.55, so that Finally, we have y(10) 6.846. y(t) = 8.55e t/45. 3
Problem 2 (2+3 pts). a. Which of the following differential equations are exact? Circle the equation(s) that are exact. (It is possible that both are not exact or both are exact). y cos(x) + cos(y) + (sin(x) x sin(y))y = 0 x cos(y) + cos(x) + (sin(y) y cos(x))y = 0 Sol. Let us begin with the first DE. We have M y = cos x sin y and N x = cos x sin y. These are equal, so we know that the DE is exact. For the second DE, we have M y = x sin y and N x = y sin x. These are not equal, so the DE is not exact. b. Solve the following initial value problem: dx = 6x y 2y + x y(1) = 0 Sol. We can rearrange this differential equation into the form 6x y + ( 2y x) dx = 0. We have M y = 1 and N x = 1, so the DE is exact. Now we wish to find f = f(x, y) such that df f is equal to the left hand side of the above. That is, we want = 6x y, which dx x means f = 3x 2 xy + h(y) for some unknown function h. Differentiating this with respect to y we get f = x + y h (y), and we want this to be equal to the coefficient of in the DE, dx so we want x + h (y) = x 2y. From this we see that h (y) = 2y and so h(y) = y 2. Thus f = 3x 2 xy y 2, and the DE is equivalent to d dx (3x2 xy y 2 ) = 0. Integrating both sides gives 3x 2 xy y 2 = C and this is the general solution to the DE. Next we need to find C that satisfies the initial condition. Subbing x = 1 and y = 0 into the equation yields C = 3. Therefore the solution to the DE is 3x 2 xy y 2 = 3 4
Problem 3 (1+1+3 pts). Consider the following initial value problem. y = 2t y 2, y(0) = 1. (1) a. Which of the following best represents the direction field for (1)? Circle your answer (only one answer). (a) (b) (c) (d) b. On top of the direction field you circled for part a), draw a sketch of the solution to the initial value problem given in Equation (1). (It does not have to be very accurate, as long as the approximate shape is correct it s fine.) Sol. Drawn in blue above. (We don t need to solve the DE to draw a sketch, this is the whole point of a direction field.) 5
Problem 3 (continued) c. Find approximations to y(1), y(2), y(3) using Euler s method with step size h = 1 for the initial value problem Sol. We will use the equation y n+1 = y n + dt and and 1. dt = 1 at (0, 1) 2. t 1 = t 0 + h = 1 3. y 1 = y 0 + dt = 1 1 = 0. 1. dt = 2 at (1, 0) 2. t 2 = t 1 + h = 2 3. y 2 = y 1 + dt = 2 1. dt = 0 at (2, 2) 2. t 3 = t 2 + h = 3 3. y 3 = y 2 + dt = 2 So y(1) 0, y(2) 2, and y(3) 2. y = 2t y 2, y(0) = 1. (2) h. We have 6
Problem 4 (2+1+1 pts). a. Find and classify all equilibrium solutions to = dt (ey 1)(y 2 1). Sol. The phase diagram and sketch of the solutions are drawn below, together with the classification of the equilbrium solutions. Figure 2: Phase diagram for Problem 7. To get this picture, we make marks at the equilibrium solutions, where = 0. Then we figure out the sign of in between the equilibrium dt dt solutions. Figure 3: Sketch of possible solution behaviours for the differential equation of Problem 7. This can be done by using the phase diagram of Figure 2. There are 7 different solutions shown; the 3 equilbrium solutions and 4 other solutions lying in between the equilbirum solutions. b. Suppose y is a solution to the above differential equation, and suppose y(0) = 0.2. What is the value of lim t y(t)? (No working required) Sol. Limiting value is 0 c. Suppose y is a solution to the above differential equation, and suppose y(0) = 0.5. What is the value of lim t y(t)? (No working required) Sol. Limiting value is 0 7
Problem 5 ( 5 pts) Show that y 1 = 1 t is a solution of t 2 y + 3ty + y = 0, t > 0, AND use the method of reduction of order to find a second independent solution to this differential equation. Sol. Let y = vt 1, then y = v t 1 vt 2 and y = v t 1 2v t 2 + 2vt 3. Plugging this into the left hand side of the DE yields v t 2v + 2vt 1 + 3 v vt 1 + vt 1 (3) which simplifies to v t + v. (4) When v = 1, this is equal to 0, which shows that y 1 = t 1 is a solution to the DE. To find another solution, we just need to find another function v such that v t + v = 0. Make the substitution u = v, then we need to find u such that u t + u = 0 or dut + u = 0. dt This is a seperable DE: du dt t = u 1 u du = 1 t dt log u = log t + C u 1 = A t u = A t 1. This means that u = At 1, t > 0 is a solution. Therefore v = A log t + C, and so (taking A = 1, C = 0), y = vt 1 = log t is another solution to the original DE. t 8
Problem 6 (2+4 pts) a. Find the general solution to the differential equation y 4y + 4y = 0 Sol. The characteristic equation is r 2 4r + 4 = 0. There is only one root, r = 2. So the general solutions are y = C 1 e 2t + C 2 te 2t. b. Determine the best guess for the particular solution y p (t) to the following differential equation. (You do not need to solve for the coefficients.) Sol. y + 5y + 6y = 2e 2t + cos(2t) + t 2 + 1 The homogenous solution is C 1 e 3t + C 2 e 2t, as can be seen by using the characteristic equation r 2 + 5r + 6 = (r + 3)(r + 2) = 0. To guess the homogenous solution, we know from the principle of linearity, or the superposition principle, that it suffices to choose the correct guess for each of the 3 summands on the right hand side and then combine the guesses. The first term is 2e 2t, which suggests the guess Ae 2t. However, this is a homogenous solution, so we need to multiply it by t, giving the guess Ate 2t. The second term is cos(2t), and suggests the guess B cos(2t) + C sin(2t). The final term is a quadratic polynomial t 2 + 1, which suggests the guess Dt 2 + Et + F. Combining the guesses yields the final guess y p = Ate 2t + B cos(2t) + C sin(2t) + Dt 2 + Et + F. 9
Problem 7 (5 pts) Suppose y 1 (t) = e t2 solves y + p(t)y + q(t)y = t + 1 and y 2 (t) = t 3 solves y + p(t)y + q(t)y = 2t + 2. Show that y = t 3 2e t2 is a solution of y + p(t)y + q(t)y = 0. NO points for solving for p(t) or q(t). Sol. Notice that y = y 2 2y 1. Substituting this into the DE and expanding, we get y + p(t)y + q(t)y = (y 2 2y 1 ) + p(t)(y 2 2y 1 ) + q(t)(y 2 2y 1 ) (5) (expand) = y 2 2y 1 + p(t)y 2 2p(t)y 1 + q(t)y 2 2q(t)y 1 (6) (rearrange) = y 2 + p(t)y 2 + q(t)y 2 2 y 1 + p(t)y 1 + q(t)y 1 (7) 2t+2 t+1 = 0. (8) In the second last line we have used the fact that y 1 and y 2 solve the differential equations given in the problem statement. This shows that y = y 2 2y 1 solves the given differential equation. 10