SMA 208: Ordinary differential equations I Second order differential equations Lecturer: Dr. Philip Ngare (Contacts: pngare@uonbi.ac.ke, Tue 12-2 PM) School of Mathematics, University of Nairobi April 5, 2013 P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 1 / 40
Second order differential equations A second order ordinary differential equation has the form d 2 y dt 2 where f is some given function. dy = f (t, y, dt ) (1) Equation (1) is said to be linear if the function f has the form f (t, y, dy dy dt ) = g(t) p(t) dt q(t)y, that is, if f is linear in y and y. We not that g, p and g depends on t but not on y. Equation (1) can further be written as y + p(t)y + q(t)y = g(t) (2) or P(t)y + Q(t)y + R(t)y = G(t). (3) If equation(1) is not of the form (2) or (3), then it is called nonlinear. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 2 / 40
Initial value problem and Second order homogeneous differential equations Equation (1), (2) or (3) together with a pair of initial conditions y(t 0 ) = y 0, y (t 0 ) = y 0, where y 0 and y 0 are given numbers. We observe that the initial conditions for a second order equation prescribe not only a particular point (t 0, y 0 ) through which the graph of the solution must pass, but also the slope y 0 of the graph at that point. A second order linear equation is said to be homogeneous if the term g(t) in (2) and G(t) in (3) is zero for all t. Otherwise, the equation is called nonhomogeneous. As a result, the term g(t) in (2) or G(t) in (3) is sometimes called the nonhomogeneous term. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 3 / 40
Theorem (Existence and uniqueness of Linear second order ODEs) Suppose the coefficients p(t), q(t) and the driving term g(t) are continuous on t-interval I, then, for each t 0 in I and each set of values of y 0 and y 0, the IVP y + p(t)y + q(t)y = g(t), y(t 0 ) = y 0, y (t 0 ) = y 0 has a uniqueness solution y(t) and this solution lies on the t-interval I. Example Find the largest interval in which the solution of the initial value problem (t 2 3t)y + ty (t + 3)y = 0, y(1) = 2, y (1) = 1 is certain to exist. Solution We note that in this case p(t) = 1/(t 3), q(t) = (t + 3)/t(t 3) and g(t) = 0. The only points of discontinuity are t = 0 and t = 3. Therefore, the longest open interval, containing the initial point t = 1, in which all the coefficients are continuous is 0 < t < 3. This is the longest interval in which theorem above guarantees that the solution exists. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 4 / 40
Theorem (Superposition Principle) If y 1 (x) and y 2 (x) are both solutions of Linear homogeneous equation P(x) d 2 y dx 2 + Q(x)dy + R(x)y = 0 (4) dx and c 1 and c 2 are any constants, then the function y(x) = c 1 y 1 (x) + c 2 y 2 (x) is also a solution of equation (4) Proof. Given that y 1 and y 2 are solution of equation (4), we have P(x)y 1 + Q(x)y 1 + R(x)y 1 = 0 and P(x)y 2 + Q(x)y 2 + R(x)y 2 = 0. Therefore using basic rules of differentiation, we have P(x)y + Q(x)y + R(x)y = P(x)(c 1 y 1 + c 2 y 2 ) + Q(x)(c 1 y 1 + c 2 y 2 ) + R(x)(c 1 y 1 + c 2 y 2 ) = c 1 [P(x)y 1 + Q(x)y 1 + R(x)y 1 ] + c 2 [P(x)y 2 + Q(x)y 2 + R(x)y 2 ] = c 1 (0) + c 2 (0) = 0. QED. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 5 / 40
Example Solve the equation y y = 0, y(0) = 2, y (0) = 1. Solution We should notice that y 1 (t) = e t and y 2 (t) = e t satisfy the above equation. Similarly the function y = c 1 y 1 (t) + c 2 y 2 (t) = c 1 e t + c 2 e t satisfies the above equation for any values of c 1 and c 2. Suppose we seek for a solution of the above equation that also satisfies the initial conditions y(0) = 2, y (0) = 1. That is we seek the solution that passes through the point (0, 2) and at that point has the slope 1. First, we set t = 0 and y = 2 in the above equation, gives c 1 + c 2 = 2. Next, we differentiate y = c 1 e t + c 2 e t. Then setting t = 0 and y = 1, we obtain c 1 c 2 = 1. Solving the simultaneous equation: c 1 + c 2 = 2, c 1 c 2 = 1, we find that c 1 = 1 2, c 2 = 3 2. Hence y = 1 2 et + 3 2 e t is the solution of the initial value problem. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 6 / 40
Example Find the solution of ay + by + cy = 0, with arbitrary (real) constant coefficients. Solution Based on our experience with previous example, we suppose that y = e rt, where r is a parameter to be determined. Then it follows that y = re rt and y = r 2 e rt. Substituting these expressions into ay + by + cy = 0, we obtain (ar 2 + br + c)e rt = 0 or since e rt 0, ar 2 + br + c = 0. ar 2 + br + c = 0 is called the characteristic equation or auxiliary equation for the differential equation ay + by + cy = 0. The significance of characteristic equation lies in the fact that if r is root of the polynomial equation ar 2 + br + c = 0, then y = e rt is a solution of the differential equation ay + by + cy = 0. Assuming the solutions for the characteristic equations are real and different i.e r 1 and r 2 such that r 1 r 2, then y = c 1 e r 1t + c 2 e r 2t is the required solution. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 7 / 40
Real and different roots of characteristic equations The characteristic equation, ar 2 + br + c = 0, has two roots which may be real and different, real but repeated or complex conjugates. In this section we assume that the roots of the characteristic equation are real and different. Example Find the solution of the initial value problem y + 5y + 6y = 0, y(0) = 2, y (0) = 3. Solution We assume that y = e rt and it follows that r must be a root of characteristic equation r 2 + 5r + 6 = (r + 2)(r + 3) = 0. Thus the possible values of r are r 1 = 2 and r 2 = 3. The general solution is y 1 = c 1 e 2t + c 2 e 3t. Using the initial conditions, c 1 and c 2 must satisfy: c 1 + c 2 = 2 and c 1 3c 2 = 3 = c 1 = 9, c 2 = 7. Hence y = 9e 2t 7e 3t. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 8 / 40
Example Find the solution of the initial value problem 2y 3y + y = 0, y(0) = 2, y (0) = 1 2. Then determine the maximum value of the solution and also find the point where the solution is zero. Solution The characteristic equation is 2r 2 3r + 1 = 0, with roots r = 1 2, 1. Therefore the general solution is y = c 1 e t/2 + c 2 e t. In order to satisfy the initial conditions, we require c 1 + c 2 = 2 and c 1 /2 + c 2 = 1 2 = c 1 = 3 and c 2 = 1. Thus the specific solution is y(t) = 3e t/2 e t. To find the stationary point, set y = 3e t/2 /2 e t = 0 = t 1 = ln(9/4). The maximum value is then y(t 1 ) = 9/4. To find x-intercept, we solve the equation 3e t/2 e t = 0 = t 2 = ln 9 2.1972. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 9 / 40
Example Solve the initial value problem 4y y = 0, y(0) = 2, y(0) = β. Then find β so that the solution approaches zero as t. Solution The characteristic equation is 4r 2 1 = 0, with roots r = ±1/2. The general solution is y = c 1 e t/2 + c 2 e t/2, with derivatives y = c 1 e t/2 /2 + c 2 e t/2 /2. In order to satisfy the initial conditions, we require c 1 + c 2 = 2 and c 1 + c 2 = β. The specific solution is y(t) = (1 β)e t/2 + (1 + β)e t/2. It is evident that as t, y(t) 0 as long as β = 1. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 10 / 40
Questions 1 Find the solution of the initial value problem 4y 8y + 3y = 0, y(0) = 2, y (0) = 1 2. 2 Find the solution of the given initial value problem. Sketch the graph of the solution and describe its behavior as t increases 2y + y 4y = 0, y(0) = 0, y (0) = 1. 3 Determine the longest interval in which the given initial value problem is certain to have a unique twice differentiable solution. (a) ty + 3y = t, y(1) = 1, y (1) = 2. (b) t(t 4)y + 3ty + 4y = 2, y(3) = 0, y (3) = 1. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 11 / 40
Substitution methods (A) Equation with the dependent variable missing For a second order differential equation of the form y = f (t, y ), the substitution v = y, v = y leads to a first order equation of the form v = f (t, v). If this equation can be solved for v, then y can be obtained by integrating dy/dt = v. We note that one arbitrary constant is obtained in solving the first order equation for v, and a second is introduced in the integration for y. Example Use substitution method above to solve the given equation 1 ty + y = 1, t > 0. 2 2t 2 y + (y ) 3 = 2ty, t > 0. 3 y + y = e t. 4 (1 + t 2 )y + 2ty + 3t t = 0, y(1) = 2, y (1) = 1. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 12 / 40
Solution (1) ty + y = 1, t > 0 Set v = y and v = y, substituting into the ODE, tv + v = 1. The equation is linear and can be written as (tv = 1). Hence the general solution is v = 1 + c 1 /t y = t + c 1 ln t + c 2. (2) 2t 2 y + (y ) 3 = 2ty, t > 0 = y = 1 + c 1 /t and Setting v = y and v = y, transforms the equation to 2t 2 v + v 3 = 2tv. This is a Bernoulli equation, with n = 3. Substituting w = v 2 yields t 2 w + 1 = 2tw = t 2 w + 2tw = 1 = w = (t + c 1 )/t 2. Hence v = ±t/ t + c 1 that is y = ±t/ t + c 1 = y(t) = ± 2 3 (t 2c 1) t + c 1 + c 2. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 13 / 40
(B) Equation with the independent variable missing If a second order differential equation has the form y = f (y, y ), then the independent variable t does not appear explicitly, but only through the dependent variable y. Let v = y, then we obtain dv/dt = f (y, v). Moreover, if we think of y as the independent variable, then by chain rule dv/dt = (dv/dy)(dy/dt) = v(dv/dy). Hence v(dv/dt) = f (y, v). Provided that v(dv/dt) = f (y, v) can be solved, we obtain v as a function of y. A relation between y and t results from solving dy/dt = v(y). Example In each problem below use this method to solve the given differential equations 1 y + y = 0 2 y + y(y ) 3 = 0 3 y + (y ) 2 = 2e y P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 14 / 40
Solution (1) y + y = 0 Let y = v and y = vdy/dy. Then vdv/dy + y = 0 is the transformed equation for v = v(y). vdv/dy + y = 0 = vdv = ydy = v 2 = y 2 + c 1 = y = ± c 1 y 2. y = ± c 1 y 2 is separable with solution arcsin(y/ c 1 ) = ±t + c 2 or y(t) = d 1 sin(t + d 2 ). (2) y + y(y ) 3 = 0 Let y = v and y = vdy/dy. Then vdv + yv 3 = 0 is the differential equation for v = v(y). The above equation is separable with v 2 = ydv = v = [y 2 /2 + c 1 ] 1. That is y = [y 2 /2 + c 1 ] 1. y = [y 2 /2 + c 1 ] 1 is also separable with (y 2 /2 + c 1 )dy = dt. The solution is defined implicitly by y 3 /6 + c 1 y + c 2 = t. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 15 / 40
Fundamental solutions of Linear Homogeneous Equations The Wronskian Consider a second order homogeneous equation L[y] = y + p(t)y + q(t)y = 0, y(t 0 ) = y 0, y (t 0 ) = y 0. Assume that y 1 and y 2 its two solutions, then as stated previous y = c 1 y 1 + c 2 y 2 is a solution as well. The initial conditions require c 1 and c 2 to satisfy the equations. c 1 y 1 (t 0 ) + c 2 y 2 (t 0 ) = y 0 c 1 y 1(t 0 ) + c 2 y 2(t 0 ) = y 0 Solving for c 1 and c 2, we find that c 1 = y 0 y 2 (t 0 ) y 0 y 2 (t 0) y 1 (t 0 ) y 2 (t 0 ) y 1 (t 0) y 2 (t 0), c 2 = y 1 (t 0 ) y 0 y 1 (t 0) y 0 y 1 (t 0 ) y 2 (t 0 ) y 1 (t 0) y 2 (t 0) Both c 1 and c 2 have similar denominator, namely, the Wronskian determinant or simple Wronskian, W = y 1 (t 0 ) y 2 (t 0 ) y 1 (t 0) y 2 (t 0) = y 1(t 0 )y 2 (t 0) y 1 (t 0)y 2 (t 0 ). P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 16 / 40
Theorem If y 1 and y 2 are two solutions of L[y] = y + p(t)y + q(t)y = 0 and if there is a point t 0 where the Wronskian W = y 1 (t 0 )y 2 (t 0) y 1 (t 0)y 2 (t 0 ) 0. Then the family of solutions y = c 1 y 1 (t) + c 2 y 2 (t) with arbitrary coefficients c 1 and c 2 includes every solution of equation L[y] = y + p(t)y + q(t)y = 0. Example Suppose that y 1 (t) = e r 1t and y 2 (t) = e r 2t are two solutions of an equation of the form L[y] = y + p(t)y + q(t)y = 0. Show that they form a fundamental set of solutions if r 1 r 2. Solution We calculate the Wronskian of y 1 and y 2 : W = e r 1 t r 1 e r 1 t e r 2 t r 2 e r 2 t = (r 2 r 1 ) exp[(r 1 + r 2 )]t Since the exponential function is never zero, and since r 2 r 1 0 by the statement of the problem, it follows that W is nonzero for every value of t. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 17 / 40
Theorem Consider the differential equation L[y] = y + p(t)y + q(t)y = 0, whose coefficients p and q are continuous on some open interval I. Choose some points t 0 in I. Let y 1 be the solution of L[y] = y + p(t)y + q(t)y = 0 that also satisfies the initial conditions y(t 0 ) = 1, y (t 0 ) = 0 and let y 2 be another solution that satisfies the initial condition y(t 0 ) = 0, y (t 0 ) = 1. Then y 1 and y 2 form a fundamental set of solution of L[y] = y + p(t)y + q(t)y = 0. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 18 / 40
Example Given y + 4y + 3y 0, t 0 = 1, find the fundamental set of solutions specified by the theorem above. Solution The general solution is y = c 1 e 3t + c 2 e t. W (e 3t, e t ) = 2e 4t and hence the exponentials form a fundamental set of solutions. The fundamental solutions must also satisfy the conditions y 1 (1) = 1, y (1) = 0, y 2 (1) = 0, y 2 (1) = 1. For y 1, the initial condition require c 1 + c 2 = e, 3c 1 c 2 = 0. The coefficients are c 1 = e 3 /2, c 2 = 3e/2. For y 2 the initial conditions require c 1 + c 2 = 0, 3c 1 c 2 = e. The coefficients are c 1 = e 3 /2, c 2 = e/2. Hence the fundamental solutions are {y 1 = 1 2 e 3(t 1) + 3 2 e (t 1), y 2 = 1 2 e 3(t 1) + 1 2 e (t 1) }. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 19 / 40
Questions 1 Show that y 1 (t) = t 1/2 and y 2 (t) = t 1 form a fundamental set of solutions of 2t 2 y + 3ty y = 0, t > 0. 2 Given y y = 0, t 0 = 0, find the fundamental set of solutions. 3 If the Wronskian W of f and g is 3e 4t and if f (t) = e 2t, find g(t). P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 20 / 40
Exact second order homogeneous equation The equation P(x)y + Q(x)y + R(x)y = 0 is said to be exact if it can be written in the form [P(x)y ] + [f (x)y] = 0, where f (x) is to be determined in terms of P(x), Q(x) and R(x). The latter equation can be integrated once immediately resulting in a first order linear equation for y that can be solved as before. By equating the coefficients of the preceding equations and then eliminating f (x), show that the necessary and sufficient condition for exactness is P (x) Q (x) + R(x) = 0. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 21 / 40
Example Determine whether the given equation is exact. If so solve the equation 1 y + xy + y = 0 2 y + 3x 2 y + xy = 0 3 x 2 y + xy y = 0, x > 0 Solution 1 P = 1, Q = x, R = 1. We have P Q + R = 0. The equation is exact. Note that (y ) + (xy) = 0. Hence y + xy = c 1. This equation is linear, with integrating factor µ = e x2 /2. Therefore the general solution is y(x) = c 1 exp(x 2 /2) x x 0 exp(u 2 /2)du + c 2 exp( x 2 /2). 2 P = 1, Q = 3x 2, R = x. Note that P Q + R = 5x, and therefore the differential equation is not exact. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 22 / 40
Solution (3) P = x 2, Q = x, R = 1. We have P Q + R = 0. The equation is exact. Write the equation as (x 2 y ) (xy) = 0. Integrating, we find that x 2 y xy = c. Divide both sides of the ODE by x 2. The resulting equation is linear, with integrating factor µ = 1/x. Hence (y/x) = cx 3. The solution is y(t) = c 1 x 1 + c 2 x. Questions Determine whether the given equation is exact. If so solve the equation x 2 y + 4xy + 2y = 0. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 23 / 40
Non-Exact second order homogeneous equation If a second order linear homogeneous is not exact, it can be made exact by multiplying by an appropriate integrating factor µ(x). We require that µ(x) be such that µ(x)p(x)y + µ(x)q(x)y + µ(x)r(x)y = 0 can be written in the form [µ(x)p(x)y ] + [f (x)y] = 0. By equating coefficients in these two equations and eliminating f (x), show that the function µ must satisfy Pµ + (2P Q)µ + (P Q + R)µ = 0. This equation is know as the adjoint of the original equation. In general, the problem of solving the adjoint differential equation is as difficult as that of solving the original equation, so only occasionally is it possible to find an integrating factor for a second order equation. Example Find the adjoint of the given differential equation. 1 x 2 y + xy + (x 2 v 2 )y = 0 Bessel s equation. 2 y xy = 0 Airy s equation. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 24 / 40
Solution 1 P = x 2, Q = x, R 2 = x 2 v 2. Hence the coefficients are 2P Q = 3x and P Q + R = x 2 + 1 v 2. The adjoint of the original differential equation is given by x 2 µ + 3xµ + (x 2 + 1 v 2 )µ = 0. 2 P = 1, Q = 0, R = x. Hence the coefficients are given by 2P Q = 0 and P Q + R = x. Therefore the adjoint of the original equation is µ xµ = 0. Questions 1 Find the adjoint of the given differential equation: (1 x 2 )y 2xy + α(α + 1)y = 0 Legendre s equation. 2 For the second order linear equation P(x)y + Q(x)y + R(x)y = 0, show that the adjoint of the adjoint equation is the original equation. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 25 / 40
Repeated Roots of characteristic equation Consider an equation ay + by + cy = 0 (5) where the characteristic equation ar 2 + br + c = 0 has discriminant b 2 4ac is zero. It follows that r 1 = r 2 = b/2a and it is obvious that both roots yield the same solution y 1 (t) = e bt/2a but it is not obvious how to find a second solution. Assume that the general solution is of the form y = v(t)e bt/2a, substituting back to equation ( (8), we obtain ) av (t) + ( b + b)v (t) + b 2 4a b2 2a + c v(t) = 0. We note) that coefficients of v (t) = 0, coefficients of v(t) is c = 0 because b 2 4ac = 0 = v (t) = 0. Therefore ( b 2 4a v(t) = c 1 t + c 2 = y = v(t)e bt/2a = c 1 te bt/2a + c 2 e bt/2a. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 26 / 40
Example 1 Find the solution of the initial value problem y y + 0.25y = 0, y(0) = 2, y (0) = 1 3. 2 Consider the initial value problem 4y + 12y + 9y = 0, y(0) = 1, y (0) = 4 (a) Solve the initial value problem and plot its solution for 0 t 5. (b) Determine where the solution has the value zero. (c) Determine the coordinate (t 0, y 0 ) of the minimum point. (d) Change the second initial condition of y (0) = b and find the solution as a function of b. Then find the critical value of b that separates solutions that always remain positive from those that eventually becomes negative. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 27 / 40
Solution 1 The characteristic equation is r 2 r + 0.25 = 0, so the roots are r 1 = r 2 = 1/2. The general solution of differential equation is y = c1 e t/2 + c 2 tc t/2. The initial conditions requires y(0) = c1 = 2 and y (0) = 1 2 c 1 + c 2 = 1 3 = c 2 = 2 3. Thus y = 2e t/2 2 3 tet/2. 2 (a) The characteristic equation is 4r 2 + 12r + 9 = 0, with the double root r = 3/2. The general solution is y(t) = c 1 e 3t/2 + c 2 e 3t/2. Invoking the initial conditions c 1 = 1 and c 2 = 5/2. Hence the specific solution is y(t) = e 3t/2 5/2te 3t/2. (b) The solution crosses the x-axis at t = 0.4. (c) The solution has a minimum at the point (16/15, 5e 8/5 /3). (d) Given that y (0) = b, we have 3/2 + c 2 = b or c 2 = b + 3/2. Hence the solution is y(t) = e 3t/2 + (b + 3/2)te 3t/2. Since the second term dominates, the long- term solution depends on the sign of the coefficient b + 3/2. The critical value is b = 3/2. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 28 / 40
Questions 1 Solve the initial value problem. Sketch the graph of the solution and describe its behavior for increasing t. 9y 12y + 4y = 0, y(0) = 2, y (0) = 1. 2 Consider the initial value problem y y + 0.25y = 0, y(0) = 2, y (0) = b. Find the solution as a function of b and then determine the critical value of b that separates solutions that grows positively from those that eventually grows negatively. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 29 / 40
Complex roots of the characteristic equation Consider ay + by + cy = 0 and suppose that the discriminant b 2 4ac is negative, then the roots of ar 2 + br + c = 0 are conjugate complex numbers which can be denoted by r 1 = λ + iµ, r 2 = λ iµ, where λ and µ are real. y 1 (t) = exp[(λ + iµ)t], y 2 (t) = exp[(λ iµ)t]. We recall, Taylor series e t = n=0 tn n!, < t < = e it = (it) n n=0 n! = n=0 + i n=1 ( 1) n t 2n (2n)! = cos t + i sin t (Euler s formula) = e (λ+iµ)t = e λt.e iµt = e λt (cos µt + i sin µt) = e λt cos µt + ie λt sin µt. ( 1) n 1 t 2n 1 (2n 1)! Consequently, if the roots of the characteristic equation are complex numbers λ ± iµ, with µ 0, then the general solution is y = c 1 e λt cos µt + c 2 e λt sin µt where c 1 and c 2 are arbitrary constants. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 30 / 40
Example 1 Find the general solution of y + y + y = 0. 2 Find the solution of the initial value problem 16y 8y + 145y = 0, y(0) = 2, y (0) = 1. Solution 1 The characteristic equation is r 2 + r + 1 = 0 and its roots are r = 1±(1 4)1/2 2 = 1 2 ± i 3 2. Thus λ = 1/2 and µ = 3/2, so the general solution is y = c 1 e t/2 cos( 3t/2) + c 2 e t/2 sin( 3t/2.) 2 The characteristic equation is 16r 2 8r + 145 = 0 and its roots are r = 1/4 ± 3i. Thus the general solution of the differential equation is y = c 1 e t/4 cos 3t + c 2 e t/4 sin3t. Applying initial conditions y(0) = c 1 = 2, y (0) = 1/4c 2 + 3c 2 = 1 = c 2 = 1/2. Therefore, y = 2e t/4 cos 3t + 1/2e t/4 sin 3t as a solution of IVP. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 31 / 40
Questions 1 Find the general solution of y + 9y = 0. 2 Find the solution of the given IVP. Sketch the graph of the solution and describe its behavior for increasing t: y 2y + 5y = 0, y(π/2) = 0, y (π/2) = 2. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 32 / 40
Change of variables Often a differential equation with variable coefficients y + p(t)y + q(t)y = 0 (6) can be put in a more suitable form for finding a solution by making a change of the independent and/or dependent variables. We would like to determine conditions on p and q such that (6) can be transformed into an equation with constant coefficient by a change of the independent variable. Let x = u(t), it can be shown that dy dt = dy dx dt dt, d 2 y = ( d2 dt 2 dt )2 d2 y + d2 x dy dx 2 dt 2 dx. Substituting the above values back to equation (6) it becomes ( ) dx 2 d 2 y 2 dt dx 2 + (d x dt 2 + p(t)dx dt )dy dx + q(t)y = 0. (7) P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 33 / 40
In order for equation (7) to have constant coefficient, the coefficients of d2 y and of y must be proportional. If q(t) > 0, then we can dx 2 choose the constant of proportionality to be 1, hence x = u(t) = [q(t)] 1/2 dt. Consequently, the coefficients of dy dx is also a constant, provided that the expression q (t)+2p(t)q(t) is constant. 2[q(t)] 3/2 Example Try to transform the following equation into one with constant coefficient by the method above. Hence solve the equation. 1 y + 3ty + t 2 y = 0 < t <. 2 ty + (t 2 1)y + t 3 y = 0, 0 < t <. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 34 / 40
1 p(t) = 3t and q(t) = t 2. We have x = tdt = t 2 /2. Furthermore q (t)+2p(t)q(t) 2[q(t)] 3/2 = (1 + 3t 2 )/t 2. The ratio is not constant, and therefore the equation the equation cannot be transformed. 2 p(t) = t 1/t and q(t) = t 2. We have x = tdt = t 2 /2. Furthermore q (t)+2p(t)q(t) 2[q(t)] 3/2 = 1. The ratio is constant and therefore the equation can be transformed. The transformed equation is d 2 y + dy dx 2 dx + y = 0. The characteristic equation is r 2 + r + 1 = 0, with roots r = 1 2 ± i 3 2. The general solution is y(x) = c 1 e x/2 cos 3x/2 + c 2 e x/2 sin 3x/2. Since x = t 2 /2, the solution in the original variable t is y(t) = e t2 /4 [c 1 cos( 3t 2 /4) + c 2 sin( 3t 2 /4)]. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 35 / 40
Euler Equations An equation of the form t 2 y + αty + β = 0, are real constants is called an Euler equation. t > 0 where α and β We realize that the substitution x = ln t transforms an Euler equation into an equation with constant coefficient. Example Use the idea above to solve the given equation for t > 0 1 t 2 y + 4ty + 2y = 0 2 t 2 y + 3ty + 1.25y = 0 3 t 2 y 4ty 6y = 0 P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 36 / 40
Solution 1 p(t) = 4/t and q(t) = 2/t 2. We have x = 2 t 1 dt = 2 ln t. Furthermore q (t)+2p(t)q(t) = 3 2[q(t)] 3/2 2. The ratio is constant and therefore the equation can be transformed to d2 y + 3 dx 2 dy 2 dx + y = 0. The characteristic equation is 2r 2 + 3r + 2 = 0, with roots r = 2, 1/ 2. The general solution is y(x) = c 1 e 2x + c 2 e x/ 2. Since x = 2 ln t, y(t) = c 1 e 2 ln t + c 2 e ln t = c 1 t 2 + c 2 t 1. 2 p(t) = 3/t and q(t) = 1.25/t 2. We have x = 1.25 t 1 dt = 1.25 ln t. Furthermore, q (t)+2p(t)q(t) = 4 2[q(t)] 3/2 5. The ratio is constant and therefore the equation can be transformed. In fact, we obtain d2 y dx 2 + 4 5r 2 + 4r + 5 = 0, with roots r = 2 1 5 ± i dy 5 dx + y = 0, the characteristic equation 5. The general solution is y(t) = c 1 e 2x/ 5 cos x/ 5 + c 2 e 2x/ 5. Since 2x/ 5 = ln t, y(t) = c 1 e ln t cos(ln t) + c 2 e ln t sin(ln t) = t 1 [c 1 cos(ln t) + c 2 sin(ln t)]. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 37 / 40
Reduction of order Suppose we know on solution y 1 (t), not everywhere zero of y + p(t)y + q(t)y = 0 (8) To find a second solution, let y = v(t)y 1 (t) then y = v (t)y 1 (t) + v(t)y 1 (t), y = v y 1 (t) + 2v (t)y 1 (t) + v(t)y (t). Substituting for y, y and y in equation (8), the coefficient of v above is zero. Hence, the above equation becomes y 1 v + (2y 1 + py 1)v = 0. This is a first order equation for the function v and can be solve for v then for y = v(t)y 1 (t). This procedure is called the method of reduction of order. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 38 / 40
Example Given that y 1 (t) = t 1 is a solution of 2t 2 y + 3ty y = 0, a second linear independent solution. t > 0, find Solution We set y = v(t)t 1, then y = v t 1 vt 2, y = v t 1 2v t 2 + 2vt 3. Substituting and collecting terms, 2tv v = 0. Separating variables and solving for v (t), we find that v (t) = ct 1/2 then v(t) = 2/3ct 3/2 + k = y = 2/3ct 1/2 + kt 1 where c and k are arbitrary. Neglecting the arbitrary multiple constants, we have y 2 (t) = t 1/2. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 39 / 40
Questions Use the method of reduction of order to find a second solution of the given differential equation (i) t 2 y 4ty + 6y = 0, t > 0,, y 1 (t) = t 2. (ii) t 2 y t(t + 2)y + (t + 2)y = 0, t > 0, y 1 (t) = t. (iii) (x 1)y xy + y = 0, x > 1, y 1 (x) = e x. P. Ngare (University of Nairobi) SMA 208: Ordinary differential equations I April 5, 2013 40 / 40