MIDTERM 1 PRACTICE PROBLEM SOLUTIONS Problem 1. Give an example of: (a) an ODE of the form y (t) = f(y) such that all solutions with y(0) > 0 satisfy y(t) = +. lim t + (b) an ODE of the form y (t) = f(y) such that all solutions are linear with slope 7. (c) an ODE of the form y (t) = f(y) with equilibria at y = 1, 2, 3, 4 no other equilibria, such that the equilibrium at y = 2 is unstable (d) an ODE of the form y (t) = f(y) with a stable equilibrium at y = 1 a semistable equilibrium at y = 2 (e) an ODE of the form y (t) = f(y) such that all solutions satisfying y(0) > 0 become singular (i.e. approach ± ) at some 0 < t < +. Solution 1. Notice that this question is asking for ODE s of the form y (t) = f(y), i.e. autonomous first order. We discussed such ODE s in the first week of class, especially in the context of population dynamics. For example, y = sin(y) is autonomous, but y = t 2 is not. (a) One of the first ODE s we saw is the equation of normal reproduction, y = ry for any r > 0. This has exponentially growing solutions of the form y(t) = y 0 e rt, where we set y 0 = y(0) to be the initial value. In particular, if y 0 > 0, then lim t y 0 e rt =. That is, all solutions with positive initial value grow to positive infinity. (b) If we take y = 7, then the solutions (obtained simply by integrating) are y(t) = y 0 + 7t, with is a linear function with y-intercept given by y 0 slope 7. Note that the ODE y = 7 literally just specifies that the solution has constant slope 7. (c) Consider y = (y 1)(y 2)(y 3)(y 4). The equilibrium solutions occur when y = 0 for all t, which can be found by setting the right h side equal to zero, i.e. (y 1)(y 2)(y 3)(y 4) = 0, so they occur exactly at y = 1, 2, 3, 4. To check what kind of equilibrium we get at y = 2, notice that for y just slightly below 2, the sign of y is (+)( )( )( ), i.e. its negative. That means that solutions slightly below y = 2 will get moved further down away from y = 2. Similarly, for y slightly above 2, the sign of y is (+)(+)( )( ), i.e. its positive. This means that solutions slightly above y = 2 get moved further up away from y = 2. Therefore solutions close to y = 2 get repelled away from that equilibrium on either side, so it is unstable as desired. (d) This time we can start with the guess y = (y 1)(y 2), but the same analysis as in the previous part will show that y = 1 is a stable equilibrium y = 2 is unstable. To rectify the the latter equilibrium, we try instead y = (y 1)(y 2) 2. This time, for y slightly below 1, the sign of y is ( )( )(+), i.e. positive, the sign of y slightly above 1 is ( )(+)(+), i.e. negative. So y = 1 is a stable 1
2 MIDTERM 1 PRACTICE PROBLEM SOLUTIONS equilibrium as desired. As for y = 2, the sign slightly below is ( )(+)(+), i.e. negative, the sign slightly above y = 2 is ( )(+)(+), i.e. negative. This means that solutions below y = 2 get repelled away from y = 2, whereas solutions above y = 2 get brought back down towards y = 2. This exactly means that y = 2 is a semistable equilibrium, as desired. (e) We saw an ODE with this property in the first lecture, which we called the explosion equation. Namely, it was y = ky 2 for k > 0. Notice that if y 0 > 0, then it s easy to see that y(t) > 0 for all time, since y 0 hence y is always increasing. One of the points we emphasized with this example is that the solutions grow to infinity, which we could see from the slope field picture, but we could not tell without solving whether or not this happens in finite time. We solved this equation using the fact that it s separable as follows: dy y 2 = k 1/y(t) + 1/y 0 = kt k 0 y(t) = (1/y 0 kt) 1, i.e. y 0 y(t) =. 1 kty 0 So indeed, the solution explodes when the denominator reaches zero, which happens when t = 1/(ky 0 ). Problem 2. Consider the ODE dy ) ( 1 y ) ( 1 y ) b c (1 dt = r y a for a > b > c > 0 r > 0 constants. (a) Find the equilibrium values (i.e. solutions y const) classify them as stable, unstable, or semistable. (b) Suppose that y(t) is a solution satisfying the initial condition y(0) = y 0 > 0. Does there exist a t 1 > 0 such that y(t 1 ) is one third of the initial value y 0? Note: the answer may depend on y 0 the other constants. You do not need to find t 1. Solution 2. (a) To find the equilibrium values, we set the expression ( r 1 y ) ( 1 y ) ( 1 y ) a b c to zero solve for y, obtaining y = a, b, c as the equilibrium values. We follow a similar method to Problem 1 above. It might be slightly easier to think about signs if we write y as r abc (a y) (b y) (c y) If y is slightly below c, the sign of y is ( )(+)(+)(+), i.e. it s negative. Since the sign of y changes each time we cross an equilibrium value, the sign of y is negative for y < c, positive for c < y < b, negative for b < y < a, positive for y > a. This means that the equilibria at c, b, a are unstable, stable, unstable respectively.
MIDTERM 1 PRACTICE PROBLEM SOLUTIONS 3 (b) A plot might be helpful for this part. If y 0 < c, then the solution y(t) is decreasing there is no equilibrium under y 0, which means that y(t) starts at y 0 decreases without bound. In particular, at some t is will reach the value y 0 /3. If c < y 0 < b, y(t) is increasing asymptotically approaching the equilbrium at y = b. In particular, y(t) never gets below y 0, so no such t 1 can exist. If b < y 0 < a, y(t) is decreasing asymptotically approaching the equilibrium at y = b. So it will reach y 0 /3 at some point provided that a > y 0 > 3b. Finally, if y 0 > a, then y(t) is always increasing, so no such t 1 can exist. Problem 3. Find the general solution to the ODE where k is a real-valued constant. y 6y + 9y = e kt + sin(3t), Solution 3. Firstly, the characteristic equation is r 2 6r + 9 = 0, so there is a repeated root at r = 3. Let s first find a particular solution to y 6y + 9y = sin(3t). We should guess y(t) = A sin(3t)+b cos(3t) (warning: you might be tempted to include a t 2 here since 3 is a repeated root, but for the sin(3t) term we would only do that if 3i were a repeated root). So we have y = 3A cos(3t) 3B sin(3t) y = 9A sin(3t) 9B cos(3t). Plugging these into the ODE y 6y + 9y = sin(3t), we get 9A sin(3t) 9B cos(3t) 18A cos(3t) + 18B sin(3t) + 9A sin(3t) + 9B cos(3t) = sin(3t), i.e. sin(3t)( 9A + 18B + 9A) + cos(3t)( 9B 18A + 9B) = sin(3t), i.e. 18B = 1 18A = 0, so B = 1/18 A = 0. Therefore a particular solution to the ODE y 6y + 9y = sin(3t) is given by (1/18) cos(3t). Now we solve the equation y 6y + 9y = e kt. Our guess depends on whether or not k is a root of the characteristic polynomial. If k 3, then we guess y(t) = Ce kt. This gives y = Cke kt y = Ck 2 e kt, plugging these into y 6y + 9y = e kt gives i.e. Ck 2 6Ck + 9C = 1, which gives Ck 2 e kt 6Cke kt + 9Ce kt = e kt, C = (k 2 6k + 9) 1. 1 This gives the particular solution k 2 6k + 9 ekt. Combining with this the general homogenous solution the particular solution for the inhomogeneous term sin(3t), we get the general solution for the original ODE of the form: y(t) = C 1 e 3t + C 2 te 3t + (1/18) cos(3t) + 1 k 2 6k + 9 ekt.
4 MIDTERM 1 PRACTICE PROBLEM SOLUTIONS If, on the other h, k = 3, then we should guess y(t) = Ct 2 e 3t. Then y = 2Cte 3t + 3Ct 2 e 3t y = 2Ce 3t + 6Cte 3t + 6Cte 3t + 9Ct 2 e 3t, plugging these into the ODE y 6y + 9y = e 3t yields C ( 2e 3t + 6te 3t + 6te 3t + 9t 2 e 3t 6(2te 3t + 3t 2 e 3t ) + 9t 2 e 3t) = e 3t, i.e. C = 1/2. This gives the particular solution y(t)(1/2)t 2 e 3t. Combining this with our other discoveries, we get the general solution for the original ODE of the form: y(t) = C 1 e 3t + C 2 te 3t + (1/18) cos(3t) + (1/2)t 2 e 3t. Problem 4. Find a fundamental set of solutions to the ODE t 2 y = 2y t > 0. Compute the Wronskian of your solutions verify that it is nonzero for all t > 0. Hint: consider solutions of the form t k. Solution 4. We guess y(t) = t k. Then y (t) = kt k 1 y (t) = k(k 1)t k 2. Plugging these into the ODE yields k(k 1)t k = 2t k, i.e. k(k 1) = 2, so k = 2 or k = 1. Then y 1 (t) = t 2 y 2 (t) = t 1 form a fundamental set of solutions. Indeed, since y 1 = 2t y 2 = t 2, the Wronskian is W (y 1, y 2 )(t) = (t 2 )( t 2 ) (2t)(t 1 ) = 1 2 = 3, which is independent of t nonzero for all t. Problem 5. Find the general solution (in implicit form) to the ODE (3x 2 y + 2xy + y 3 ) + (x 2 + y 2 )y = 0. Hint: look for an integrating factor depending only on x. Solution 5. We multiply both sides by µ(x), which gives (3x 2 y + 2xy + y 3 )µ(x)dx + (x 2 + y 2 )µ(x)dy = 0. Set M(x, y) = (3x 2 y + 2xy + y 3 )µ(x) N(x, y) = (x 2 + y 2 )µ(x). Since M N continuously differentiable for all (x, y), we just need this new ODE to be closed, i.e. y M = x N, i.e. (3x 2 + 2x + 3y 2 )µ(x) = (2x)µ(x) + (x 2 + y 2 )µ (x). After canceling the 2xµ(x) terms dividing by x 2 + y 2 on both sides, we get µ (x) = 3µ(x), which has the solution µ(x) = e 3x. Now we seek ψ(x, y) such that x ψ(x, y) = (3x 2 y + 2xy + y 3 )e 3x
MIDTERM 1 PRACTICE PROBLEM SOLUTIONS 5 y ψ(x, y) = (x 2 + y 2 )e 3x. From the second equation, we integrate to find ψ(x, y) = (x 2 y + y 3 /3)e 3x + h(x) for some unknown function h(x). Now, after computing x ψ, the first equation becomes (2xy)e 3x + (x 2 y + y 3 /3)3e 3x + h (x) = (3x 2 y + 2xy + y 3 )e 3x. We see that h(x) = 0 works, so ψ(x, y) = (x 2 y + y 3 /3)e 3x, the solutions to the ODE are implicitly given by (x 2 y + y 3 /3)e 3x = C. Problem 6. (a) Suppose we are given some continuous functions p(t), q(t), g(t) on an open interval I, suppose that y 1 (t) is a function satisfying y 1 +p(t)y 1 +q(t)y 1 = 0. Suppose that v(t) is a function such that y(t) = v(t)y 1 (t) is a solution of the ODE y + p(t)y + q(t)y = g(t). Find a first order ODE satisfied by the first derivative of v. (b) Find the general solution to the ODE y + p(t)y + q(t)y = g(t) in terms of y 1. Your answer can be left in terms of definite integrals of the form t t 0 h(s)ds, where t 0 is a point in I. Solution 6. This problem is precisely the method of reduction of order. We worked through this example in class as an alternative to variation of parameters. Namely, instead of the usual Lagrangian trick for the unknown functions u 1, u 2, we tried setting u 2 = 0 found that the ODE reduced to another second order ODE which is really a first order ODE. Let s see how this goes. (a) Set y(t) = v(t)y 1 (t). We have y = v y 1 + vy 1 y = v y 1 + v y 1 + v y 1 + vy 1 = v y 1 + 2v y 1 + vy 1. Since y is supposed to solve the inhomogenous equation y + py + qy = g, this means we have v y 1 + 2v y 1 + vy 1 + p(v y 1 + vy 1) + qvy 1 = g. Notice that three of these terms give v(y 1 + py 1 + qy 1), this is zero since y 1 satisfies the homogeneous ODE y 1 + py 1 + qy 1 = 0. So we have v y 1 + 2v y 1 + pv y 1 = g, which is indeed a first order linear ODE for v. To make this more explicit, by defining a new variable w(t) := v (t), we see that w satisfies the ODE y 1 w + (2y 1 + py 1 )w = g
6 MIDTERM 1 PRACTICE PROBLEM SOLUTIONS (b) Since the above ODE is first order linear, we have the formula for the solution. Let s first write the ODE as w + 2y 1 + py 1 w = g/y 1, y 1 or simply as w (t) + P (t)w(t) = G(t), where for notational convenience we set P (t) := 2y 1 (t) + p(t)y 1(t) y 1 (t) G(t) := g(t)/y 1 (t). The solution is then given by w(t) = 1 ( t ) µ(s)g(s)ds + C 1, µ(t) t 0 with µ(t) = exp( t t 0 P (s)ds. Now since w(t) = v (t), we get v(t) by integrating, i.e. v(t) = t t 0 w(s)ds + C 2. Finally, this means that that the general solution to the original ODE y + py + qy = g is given by y(t) = v(t)y 1 (t), with v(t) as above. Notice that we have two arbitrary constants C 1, C 2, as we would expect for the general solution. The significance of this problem is that we can explicitly solve the general second order linear inhomogeneous ODE given only one homogeneous solution y 1, whereas the variation of parameters method actually requires two solutions y 1, y 2 as input.