Math 53, Spring 2008 Midterm I Solutions Here are some general guidelines and reminders that should be helpful for future exams in this class, or other math classes. • Be sure to check your work whenever possible! If you claim a function solves a given differential equation, take a minute to substitute it into your equation, and double check it. • Even if a problem is mostly computational, it is often a good idea to include brief English phrases in your solution. This can make it easier for whomever is grading to understand what you intend your computations to be showing. When what you are computing is clearly stated to the grader, it is also more likely that you will receive partial credit for solutions containing computational errors. • If a problem asks you to explain your answer, your solution should always contain English sentences! • You should always clearly label your solution and any important steps along the way (e.g. eigenvalues/eigenvectors in problems 6 and 7, etc.). 1. Find the solution to the initial value problem y 0 = 2e−y t, y(1) = 0 and state the domain of definition (or interval of validity) of the solution. Solution. This is a separable equation since the right hand side factors into a function of y and a function of t. Multiplying both sides of the equation by ey gives ey y 0 = 2t, and integrating this gives ey = t2 + c. Substituting in the initial condition t = 1, y = 0 here gives us that c = 0, so we have that ey = t2 . Finally, solving this for y we get that y = log t2 for our solution. To determine the domain of definition, we first note that 2e−y t is defined and continuous everywhere, so we don’t expect any vertical tangent lines. We only have to check where the solution we found is defined. The function log x is only defined for positive values of x, so log t2 is defined when t2 > 0, or when t 6= 0. Since our initial time, 1, is positive, the domain of definition of our solution to the initial value problem is all t > 0. 2 2. Solve the initial value problem y 0 + 2ty = 2t, y(0) = 5. Solution 1. This equation is linear, so we can solve it by introducing an integrating factor. The integrating factor is R 2 e 2t dt = et . 2 Multiplying both sides of the equation by et gives 2 2 2 et y 0 + 2tet y = 2tet d t2 2 e y = 2tet , dt and integrating both sides gives us 2 2 et y = et + c. 2 We multiply both sides by e−t to solve for y, and find that 2 y = 1 + ce−t is the general solution to the equation. Substituting initial values t = 0 and y = 5, we find that c = 4, so 2 y = 1 + 4e−t solves our initial value problem. Solution 2. This equation is also separable: we can rewrite it as y 0 = 2t − 2ty = 2t(1 − y). Diving both sides by 1 − y (and remembering that we may need to later check what happens when y = 1), we get (1 − y)−1 y 0 = 2t. Integrating both sides we find − log |1 − y| = t2 + c, and solving for y gives log |1 − y| = −t2 − c 2 −c ⇐⇒ |1 − y| = e−t 2 ⇐⇒ 1 − y = ±e−c e−t 2 ⇐⇒ y = 1 ± e−c e−t . 3 Considering our initial condition tell us, we must choose the + sign and c = − log 4 so we once again find 2 y = 1 + 4e−t . (Note that this solution stays away from y = 1 so we don’t need to be concerned about having divided by 1 − y earlier.) 4 3. Find the general solution to the differential equation y 0 = 1 + y + t + ty. Solution 1. The equation is separable: we can factor the right hand side to get y 0 = 1 + t + (1 + t)y = (1 + t)(1 + y). Dividing by 1 + y and integrating gives (1 + y)−1 y 0 = 1 + t ⇐⇒ log |1 + y| = 12 t2 + t + c, and solving for y, we get 2 /2+t+c |1 + y| = et 2 /2+t = ec et 2 /2+t ⇐⇒ 1 + y = ±ec et 2 /2+t ⇐⇒ y = −1 ± ec et . Note that the term ±ec can take on any nonzero value as c varies over R, and that we also have the constant solution y = −1. Therefore, the general solution to the equation is given by 2 y = −1 + Cet /2+t where C is any real constant. Solution 2. The equation is linear, so we can solve it by introducing an integrating factor. Rewriting it as y 0 − (1 + t)y = 1 + t an integrating factor will be given by R e −(1+t) dt = e−t 2 /2−t . Multiplying both sides of the rewritten equation by the integrating factor gives d −t2 /2−t 2 (e y) = (1 + t)e−t /2−t , dt which integrates to give 2 /2−t e−t Z y= 2 /2−t (1 + t)e−t 2 /2−t dt = −e−t + c, where we have integrated the right hand side using the substitution u = −t2 − t. Solving for y, we find that the general solution to our equation is 2 /2+t y = −1 + cet where c is any real constant. 5 4. Consider the differential equation y 0 = y cos y. (a) Describe the behavior as t → ∞ of a solution having the initial value y(0) = 1. (Do not attempt to solve the ODE explicitly.) Solution. The equation here is autonomous, that is, it is of the form y 0 = f (y) where f has no explicit t-dependence. Equilibrium solutions are found for any y value which solves y cos y = 0. This is true when y = 0 or when cos y = 0, i.e. when y = π2 + kπ for any integer k. Since, 1 ∈ (0, π2 ), and y cos y > 0 for all y ∈ (0, π2 ), the solution satisfying the initial condition y(0) = 1 will always be increasing, and will limit to π2 as t → ∞. (b) Assume that the above differential equation comes from a physical model, and you have experimental data indicating that y(0) satisfies, − 12 < y(0) < 12 . i. Could y(100) = 1? Explain your answer. Solution. Again, since y cos y > 0 whenever y ∈ (0, π2 ), solutions having initial values y(0) ∈ (0, π2 ) will always be increasing, and will limit to the equilibrium solution π2 as t → ∞. Since 21 < π2 , any solution starting with initial value y(0) ∈ (0, 12 ) will limit to π2 as t → ∞. Therefore a solution with initial value in the interval (− 21 , 12 ) could indeed satisfy y(100) = 1. ii. Could y(100) = −2? Explain your answer. Solution. We have just argued that any solution that starts with initial value y(0) ∈ (0, π2 ) will limit to π2 as t → ∞, and we know that the solution with initial value y(0) = 0 is the equilibrium solution y(t) = 0. If y ∈ (− π2 , 0), then y cos y < 0, so any solution with initial value y(0) ∈ (− π2 , 0) will always be decreasing, and will limit to the equilibrium solution − π2 as t → ∞. Therefore, for initial values in the interval (− 21 , 21 ), there are three possibilities. • y(0) ∈ (0, 12 ) in which case y is always increasing and limits to π2 . • y(0) = 0 in which case y is the equilibrium solution y(t) = 0. • y(0) ∈ (− 21 , 0) in which case y is always decreasing and limits to − π2 . Thus it is not possible that y(100) = −2 if y(0) ∈ (− 12 , 12 ). 6 (c) Continuing with part (b), now assume your experimental data indicates that y(0) satisfies, −1 < y(0) < − 12 . i. Could y(100) = 41 ? Explain your answer. Solution. Note that both − 12 and −1 lie in the interval (− π2 , 0). We argued in the previous part that any solutions with initial value lying in this interval are always decreasing and limit to − π2 as t → ∞. Therefore solutions with initial value in this interval could never satisfy y(t) = 41 for any value of t. ii. Could y(100) = − 21 ? Explain your answer. Solution. Again, any solutions with initial value lying in the interval (−1, − 21 ) are always decreasing and limit to − π2 as t → ∞. In particular, if y(0) ∈ (−1, − 12 ), we know that y(t) < − 21 for all t > 0, so y(100) = − 12 is not possible. 7 5. Find 2 distinct solutions to the following equation which share the same initial value. y 0 = (y − 1)1/3 Solution. The existence and uniqueness theorem of first order ODE’s says that you get a unique solution to the initial value problem y 0 = f (t, y) y(t0 ) = y0 for any point (t0 , y0 ) at which both f and ∂f ∂y are continuous. In this particular case, f (t, y) = 1/3 (y − 1) is continuous everywhere, but the partial derivative fy (t, y) = 31 (y − 1)−2/3 is not defined along the line y = 1. Therefore, if we are looking for an initial value admitting nonunique solutions, we should choose that initial value to be of the form y(t0 ) = 1. With this in mind, we first note that the constant function y(t) = 1 is a solution. Indeed, y 0 (t) = 0 for all t, and (y(t) − 1)1/3 = (1 − 1)1/3 = 0 as well so this is a solution. To find other solutions, we observe that this equation is separable. Dividing both sides by (y − 1)1/3 gives (y − 1)−1/3 y 0 = 1, and integrating gives 3 (y − 1)2/3 = t + c. 2 Plugging in an initial condition of the form y(t0 ) = 1 gives c = −t0 so we get 3 (y − 1)2/3 = t − t0 . 2 Solving for y then gives us y−1=± 2 3 (t 3/2 − t0 ) . or y =1± 2 3 (t − t0 ) 3/2 . Note that these solutions are only define for t > t0 , but since y(t0 ) = 1 and y 0 (t0 ) = 0, we can extend the solutions to be defined for all t by piecing them together with the equilibrium solution y = 1 to get ( 1 for t ≤ t0 y(t) = 2 3/2 1 ± 3 (t − t0 ) for t ≥ t0 If we choose any 2 of the solutions we have found, we can find values of t where both solutions satisfy y(t) = 1; for instance the constant solution y1 (t) = 1, and the solution ( 1 for t ≤ 0 y2 (t) = 2 3/2 1 − 3t for t ≥ 0 satisfy y1 (t) = y2 (t) for all t ≤ 0. 8 6. Find the solution to the initial value problem x0 = 4x + 5y x(0) = 4 0 y = −x + 2y y(0) = 2. x Solution. Defining x = , we first rewrite the system in vector form y 4 5 x0 = x. −1 2 4 We then look for eigenvectors/eigenvalues of the matrix A = −1 characteristic polynomial and looking for zeroes: 4 − λ 5 det(A − λI) = −1 2 − λ to give 5 2 by computing its = (4 − λ)(2 − λ) − 5(−1) = λ2 − 6λ + 13. The quadratic formula then tells us the zeroes of λ2 − 6λ + 13 are p 6 ± 36 − (4)(13) = 3 ± i2. λ= 2 To find an eigenvector with eigenvalue 3 + i2 we row-reduce A − (3 + 2i)I to find 1 1 + 2i 1 − 2i 5 ∼ 0 0 −1 −1 − 2i which is equivalent to the system x1 = (−1 − i2)x2 , so the 3 + i2-eigenspace is spanned by −1 − i2 v= . 1 To find the general solution, we find the real and imaginary parts of e(3+2i)t v: −1 −2 (3+2i)t −1 − i2 3t e = e [cos 2t + i sin 2t] +i 1 1 0 −1 −2 −2 −1 3t 3t =e cos 2t − sin 2t + ie cos 2t + sin 2t 1 0 0 1 so the general solution is given by −1 −2 −2 −1 3t 3t x(t) = c1 e cos 2t − sin 2t + c2 e cos 2t + sin 2t . 0 1 1 0 9 Applying the initial condition, we get −2 −1 4 + c2 = x(0) = c1 0 1 2 which we can solve to give c1 = 2 and c2 = −3. Therefore the solution to the initial value problem is given by −2 −1 −1 −2 3t 3t cos 2t + sin 2t cos 2t − sin 2t − 3e x(t) = 2e 0 1 1 0 4 cos 2t + 7 sin 2t . = e3t 2 cos 2t − 3 sin 2t 10 7. Find the solution to the initial value problem −6 3 0 x = x, −3 4 3 x(0) = . −7 Solution. We first compute the eigenvalues/eigenvectors of the matrix. The characteristic polynomial is −6 − λ 3 = (−6 − λ)(4 − λ) − 3(−3) −3 4 − λ = λ2 + 2λ − 15 = (λ + 5)(λ − 3) so the eigenvalues are 3 and −5. We next look for eigenvectors: −6 3 −1 3 1 −3 − (−5)I = ∼ −3 4 −3 9 0 0 3 spans the λ = −5 eigenspace, and so v1 = 1 3 −1 −9 3 −6 3 ∼ − (3)I = 0 0 −3 1 −3 4 1 spans the λ = 3 eigenspace. Therefore, the general solution to the system is so v2 = 3 3t 1 −5t 3 . + c2 e x(t) = c1 e 3 1 The initial condition, then gives us 1 3 3 , + c2 = x(0) = c1 3 1 −7 which we solve for c1 and c2 : 3 1 3 1 3 ∼ 1 3 −7 0 −8 −7 1 3 −7 1 0 2 24 ∼ 0 1 −3 ∼ 0 1 −3 , so c1 = 2 and c2 = −3. Therefore, the solution to the initial value problem is −5t 3 3t 1 x(t) = 2e − 3e . 1 3 11