SOLUTION TO MIDTERM FOR MATH263, MAY 2013 Jan Feys All questions are marked out of 10. The partial mark distribution is approximate. Question 1 Find the solution to the initial value problem 2 cos (t) y0 + y = , t t2 y(π) = 0, t > 0. Make a plot of your solution in the ty-plane. Solution: one partial mark for identifying p(t) = 2/t and g(t) = cos (t)/t2 . One partial mark for writing that the equation is solved using an integrating factor. Two partial marks for writing the integrating factor Z p(t)dt = t2 . µ(t) = exp One partial mark for multiplying with the ODE to get t2 y 0 + 2ty = cos (t). Two partial marks for writing the solution to be y(t) = 1 µ(t) Z µ(t)g(t)dt = sin(t) C + 2. t2 t Here C is an arbitrary constant of integration. This is the general solution. One partial mark for imposing the initial condition and finding C = 0. The IVP solution is therefore y(t) = sin(t) . t2 Now for the graph. One partial mark for drawing a sine with decreasing amplitude. Another partial mark for sketching an envelope that decreases like 1/t2 . Question 2 Consider the equation dy = y 2 (4 − y 2 ). dt 1 This equation has the form dy/dt = f (y) with f (y) = y 2 (4 − y 2 ). Assume as the initial condition that y(0) = y0 where −∞ < y0 < ∞. (i) Sketch the graph of f (y) versus y. (ii) Determine the critical points. (iii) Classify each one stable, unstable or semistable. (iv) Draw the phase line. (v) Sketch several graphs of solutions in the ty-plane. Solution: two partial marks for getting the graph of y 2 (4 − y 2 ) right. One partial marks for finding three critical points y = 0, y = −2 and y = 2. Two partial marks for finding that y = −2 is unstable, y = 0 is semistable and y = 2 is stable. Two more partial marks for having a correct drawing of the phase line. Now for the graph of the ty-plane. One partial mark for having the equilibrium solutions y = −2, 0, 2 drawn correctly. Two partial marks for having sketched solutions that have the asymptotic behaviour prescribed by the phase line. Question 3 Solve dy =0 dx by making the equation exact using an integrating factor. (x + 2) sin (y) + (x cos (y)) Solution: one partial mark for multiplying with an integrating factor µ(x, y) to obtain µ(x + 2) sin (y) + µx cos (y) dy = 0. dx Now M = µ(x + 2) sin (y), N = µx cos (y). One partial mark for the condition for exactness My = Nx reducing to µy (x + 2) sin (y) + µ(x + 2) cos (y) = µx x cos (y) + µ cos (y). As discussed, this PDE can usually be reduced by an ODE by setting µx = 0 or µy = 0. One partial mark for finding µy = 0 and dividing the equation by cos (y). One partial mark for concluding µ has to satisfy the ODE µ(x + 2) = µx x + µ. This is a separable equation. One partial marks for finding µ = xex . We can now multiply this onto the equation to get an exact ODE x(x + 2)ex sin (y) + x2 ex cos (y) 2 dy = 0. dx Two partial marks for integrating by parts Z ψ= Z M dx = x(x + 2)ex sin (y)dx = x2 ex sin (y) + h(y). Alternatively one can start by writing ψ = imposing ψy = N which leads to R N dy and work from there. One partial mark for x2 ex cos (y) + h0 (y) = x2 ex cos (y) so h(y) = C which we put to zero. One partial mark for finding ψ = x2 ex sin (y) so that the solution is given by x2 ex sin (y) = C. One partial mark for writing the explicit solution y = arcsin C x2 ex since this is a case where y can be isolated from the implicit solution. Question 4 Solve the initial value problem 4y 00 − y = 0, y(0) = 2, y 0 (0) = β. Here β is a real constant. Then find β such that the solution approaches zero as t → ∞. Solution: the proposed solution is y = ert . Two partial marks for finding the characteristic equation to be 4r2 − 1 = 0. One partial mark for finding that r1 = 1/2 and r2 = −1/2. One partial mark for stating that y1 (x) = et/2 and y2 (x) = e−t/2 . One partial mark for writing that thus the general solution is y(x) = c1 et/2 + c2 e−t/2 . Now we impose the initial conditions. One partial mark for finding c1 − c2 = 2β. c1 + c2 = 2, One partial mark for the answers c1 = 1 + β and c2 = 1 − β. One partial mark for the initial value problem solution y(x) = (1 + β)et/2 + (1 − β)e−t/2 . Two partial marks for concluding that, since the exponential in the first term blows up and the exponential in the second term goes to zero, we need β = −1 to have y(t) → 0 when t → ∞. 3 Question 5 Use the method of variation of parameters to find a particular solution of the differential equation t 4y 00 − 4y 0 + y = 16e 2 . Then check your answer by using the method of undetermined coefficients. Solution: It is important to first put the ODE into standard form by dividing by 4. Not doing so will give an incorrect answer by a factor of 4 for the method of variation of paramet ters. That will cost two partial marks. Write g(t) = 4e 2 . Both methods need the homogeneous solutions; two partial marks for finding y1 (t) = et/2 and y2 (t) = tet/2 . First the method of variation of parameters. One partial mark for finding the Wronskian to be W (y1 , y2 )(t) = et . One partial mark for finding u1 = − Z y2 (t)g(t) dt = −2t2 , W (y1 , y2 )(t) Z y1 (t)g(t) dt = 4t. W (y1 , y2 )(t) and one partial mark for u2 = One partial mark for the result t Y (t) = u1 (t)y1 (t) + u2 (t)y2 (t) = 2t2 e 2 . Now the method of undetermined coefficients. One partial mark for concluding from the table that t Y (x) = Ae 2 . One partial mark for realizing that et/2 is a homogeneous solution and even its multiple by t is a homogeneous solution. So the correct form is t Y (x) = At2 e 2 . Two partial marks for plugging this into the ODE and finding A = 2. Question 6 The differential equation (1 − x2 )y 00 − 2xy 0 + α(α + 1)y = 0 is known as Legendre’s equation. Here α is a real constant. 4 (i) Accurately classify this ordinary differential equation. (ii) Find the Wronskian of the solutions y1 (x) and y2 (x) without solving the equation. (iii) In all that follows, assume α = 0. We will solve the resulting second order equation by reducing it to a first order equation. Define u(x) = y 0 (x). Write down the differential equation for u(x) and solve it to find u(x). Then solve for y(x). (Hint: you will need to integrate using partial fractions.) Solution: One partial mark for classifying this ODE has a homogeneous linear second order equation. One additional partial mark for noting that it has variable coefficients, which distinguishes it from equations such as the one in question 4. To find the Wronskian, we need Abel’s theorem. Mentioning this is worth one partial mark. One partial mark for putting the ODE into standard form and finding that p(x) = −2x/(1−x2 ). One partial mark for finding W = C exp − Z p(x)dx = C exp − ln (1 − x2 ) = C . 1 − x2 Note that since the homogeneous solutions are only determined up to scalar multiples, so is the Wronskian. You can therefore set C = 1. Put α = 0 and u(x) = y 0 (x). One partial mark for writing the ODE for u(x) to be (1 − x2 )u0 (x) − 2xu(x) = 0. This equation is separable. One partial mark for finding u(x) = C . 1 − x2 Remark that this is the same result as the Wronskian, but here we can not put C = 1. Since u(x) = y 0 (x) now C y 0 (x) = . 1 − x2 This equation is solved by partial fractions. One partial mark for stating y 0 (x) = C A B = + 2 1−x 1−x 1+x and one partial mark for finding A = C/2 and B = C/2. One partial mark for integrating to the final answer C 1+x y(x) = ln +D 2 1−x where C and D are arbitrary constants. 5