Lectures on Differential Equations Philip Korman Department of Mathematical Sciences University of Cincinnati Cincinnati Ohio 4522-0025 Copyright @ 2008, by Philip L. Korman
Contents First Order Equations 5. Integration by Guess-and-Check................. 5.2 First Order Linear Equations.................. 7.2. Background........................ 7.2.2 Integrating Factor.................... 9.3 Separable Equations....................... 3.3. Background........................ 3.3.2 The method........................ 3.4 Some Special Equations..................... 7.4. Homogeneous Equations................. 7.4.2 The Logistic Population Model............. 20.4.3 Bernoulli s Equation................... 2.4.4 Riccati s Equation.................... 22.4.5 Parametric Integration.................. 24.4.6 Some Applications.................... 25.5 Exact Equations......................... 26.6 Numerical Solution by Euler s method............. 3.7 Existence and Uniqueness of Solution.............. 32 2 Second Order Equations 35 2. Special Second Order Equations................. 35 2.. y is not present in the equation............. 36 2..2 x is not present in the equation............. 37 2.2 Linear Homogeneous Equations with Constant Coefficients.. 38 2.2. Characteristic equation has two distinct real roots.. 39 2.2.2 Characteristic equation has only one (repeated) real root............................ 4 2.3 Characteristic equation has two complex conjugate roots... 43 2.3. The Euler s formula................... 43 2
CONTENTS 3 2.3.2 The General Solution.................. 43 2.4 Linear Second Order Equations with Variable Coefficients.. 47 2.5 Some Applications of the Theory................ 50 2.5. Hyperbolic Sine and Cosine Functions......... 5 2.5.2 Different Ways to Write a General Solution...... 5 2.5.3 Finding the Second Solution............... 53 2.6 Non-homogeneous Equations. When the living is easy..... 54 2.7 Non-homogeneous Equations. When one needs something extra.................................. 58 2.8 Variation of Parameters..................... 60 2.9 Convolution Integral....................... 62 2.9. Differentiating Integrals................. 62 2.9.2 Yet Another Way to Compute a Particular Solution. 62 2.0 Applications of Second Order Equations............ 63 2.0. Vibrating Spring..................... 64 2.0.2 Meteor Approaching the Earth............. 67 2.0.3 Damped Oscillations................... 69 2. Further Applications....................... 70 2.. Forced and Damped Oscillations............ 70 2..2 Discontinuous Forcing Term............... 7 2..3 Oscillations of a Pendulum............... 72 2..4 Sympathetic Oscillations................. 73 2.2 Oscillations of a Spring Subject to a Periodic Force...... 75 2.2. Fourier Series....................... 75 2.2.2 Vibrations of a Spring Subject to a Periodic Force.. 78 2.3 Euler s Equation......................... 78 2.3. Preliminaries....................... 78 2.3.2 The Important Class of Equations........... 79 2.4 Linear Equations of Order Higher Than Two......... 82 2.4. Polar Form of Complex Numbers............ 82 2.4.2 Linear Homogeneous Equations............. 82 2.4.3 Non-Homogeneous Equations.............. 85 3 Using Infinite Series to Solve Differential Equations 87 3. Series Solution Near a Regular Point.............. 87 3.. Maclauren and Taylor Series.............. 87 3..2 A Toy Problem...................... 89 3..3 Using Series When Other Methods Fail........ 89 3.2 Solution Near a Mildly Singular Point............. 93 3.3 Moderately Singular Equations................. 98
4 CONTENTS 4 Laplace Transform 05 4. Laplace Transform And Its Inverse............... 05 4.. Review of Improper Integrals.............. 05 4..2 Laplace Transform.................... 06 4..3 Inverse Laplace Transform................ 07 4.2 Solving The Initial Value Problems............... 09 5 Systems of Differential Equations 4 5. The Case of Distinct Eigenvalues................ 4 5.. Review of Vectors and Matrices............. 4 5..2 Linear First Order Systems with Constant Coefficients 5 5.2 A Pair of Complex Conjugate Eigenvalues........... 9 5.2. Complex Valued Functions............... 9 5.2.2 General Solution..................... 20 5.3 Predator-Prey Interaction.................... 2
Chapter First Order Equations. Integration by Guess-and-Check Almost every problem in differential equation ends with computation of an integral. One even uses the term integration of differential equation instead of solution. We need to be able to compute integrals quickly. Recall the product rule (fg) = fg + f g. Example xe x dx. We need to find the function, whose derivative is xe x. If we try a guess: xe x, then its derivative (xe x ) = xe x + e x has an extra term e x. To remove this extra term, we subtract e x from the initial guess, i.e. xe x dx = xe x e x + c. By differentiation we verify that this is correct. Of course, integration by parts may also be used. Example x cos3x dx. Starting with the initial guess x sin3x, whose 3 derivative is x cos3x + 3 sin3x, we compute x cos3x dx = 3 x sin3x + cos3x + c. 9 5
6 CHAPTER. FIRST ORDER EQUATIONS We see that the initial guess is the product f(x)g(x), chosen in such a way that f(x)g (x) gives the integrand. Example xe 5x dx. Starting with the initial guess 5 xe 5x, we compute xe 5x dx = 5 xe 5x 25 e 5x + c. Example x 2 sin3x dx. The initial guess is 3 x2 cos 3x. Its derivative ( ) 3 x2 cos 3x = x 2 sin 3x 2 3 x cos3x has an extra term 2 x cos3x. To remove this term, we modify our guess: 3 3 x2 cos 3x + 2 x sin3x. Its derivate 9 ( 3 x2 cos3x + 2 ) 9 x sin3x = x 2 sin3x + 2 9 sin3x still has an extra term 2 sin 3x. So we make the final adjustment 9 x 2 sin3x dx = 3 x2 cos3x + 2 9 x sin3x + 2 27 cos3x + c. This is easier than integrating by parts twice. Example x x 2 + 4 dx. We begin by rewriting this integral as ( /2 x x 2 + 4) dx. One usually computes this integral by a substitution u = x 2 + 4, with du = 2x dx. Forgetting a constant multiple, the integral becomes u /2 du. Ignoring a constant multiple again, this evaluates to u 3/2. Returning to the ( 3/2. original variable, we have our initial guess x 2 + 4) Differentiation d ( 3/2 x 2 + 4) = 3x x dx 2 + 4 gives us the integrand with an extra factor of 3. To fix that, we multiply the initial guess by 3 : x x 2 + 4dx = 3 ( x 2 + 4) 3/2 + c.
.2. FIRST ORDER LINEAR EQUATIONS 7 Example (x 2 + )(x 2 dx. Instead of using partial fractions, let us + 4) try to split the integrand as x 2 + x 2 + 4. We see that this is off by a factor. The correct formula is (x 2 + )(x 2 + 4) = ( 3 x 2 + ) x 2. + 4 Then (x 2 + )(x 2 + 4) dx = 3 tan x 6 tan x 2 + c. Sometimes one can guess the splitting twice, as in the following case. Example x 2 ( x 2 ) dx. x 2 ( x 2 ) = x 2 + x 2 = x 2 + ( x)( + x) = x 2 + 2 x + 2 + x. Then x 2 ( x 2 ) dx = x 2 ln( x) + ln( + x) + c. 2.2 First Order Linear Equations.2. Background Recall from Calculus that In case g(x) is an integral, we have d dx eg(x) = e g(x) g (x). (2.) d dx e p(x)dx = p(x)e p(x)dx, because derivative of the integral is p(x).
8 CHAPTER. FIRST ORDER EQUATIONS Suppose we need to find the function y(x) so that y (x) = x. This is a differential equation, because it involves a derivative of the unknown function. This is a first order equation, as it only involves the first derivative. Solution is of course (2.2) y(x) = x2 2 + c, where c is an arbitrary constant. We see that differential equations have infinitely many solutions. The formula (2.2) gives us the general solution. Then we can select the one that satisfies an extra initial condition. For example, for the problem (2.3) y (x) = x y(0) = 5 we begin with the general solution given in formula (2.2), and then evaluate it at x = 0 y(0) = c = 5. So that c = 5, and solution of the problem (2.3) is y(x) = x2 2 + 5. The problem (2.3) is an example of an initial value problem. If the variable x represents time, then the value of y(x) at the initial time is prescribed to be 5. The initial condition may be prescribed at other values of x, as in the following example: y = y y() = 2e. Here the initial condition is prescribed at x =, e denotes the Euler number e 2.7. Observe that while y and y are both functions of x, we do not spell this out. This problem is still in the Calculus realm. Indeed, we are looking for a function y(x) who s derivative is the same as y(x). This is a property of the function e x, and its constant multiples. I.e. the general solution is y(x) = ce x,
.2. FIRST ORDER LINEAR EQUATIONS 9 and then the initial condition gives y() = ce = 2e, so that c = 2. The solution is then y(x) = 2e x. We see that the main thing is finding the general solution. Selecting c to satisfy the initial condition, is usually easy..2.2 Integrating Factor Let us find the general solution of the equation (2.4) y + p(x)y = g(x), where p(x) and g(x) are given functions. This is a linear equation, as we have a linear function of y and y. Because we know p(x), we can calculate the function µ(x) = e p(x)dx, and its derivative (2.5) µ (x) = p(x)e p(x)dx = p(x)µ. We now multiply the equation (2.4) by µ(x), giving (2.6) y µ + yp(x)µ = µg(x). Let us use the product rule and the formula (2.5) to calculate a derivative So, we may rewrite (2.6) in the form (2.7) d dx [yµ] = y µ + yµ = y µ + yp(x)µ. d [µy] = µg(x). dx This allows us to compute the general solution. Indeed, we know the function on the right. By integration we express µ(x)y(x) = µ(x)g(x) dx, and then solve for y(x).
0 CHAPTER. FIRST ORDER EQUATIONS In practice one needs to memorize the formula for µ(x) and the form (2.7). Computation of µ(x) will involve a constant of integration. We will always set c = 0, because the method works for any c. Example Solve y + 2xy = x y(0) = 2. Here p(x) = 2x and g(x) = x. Compute Equation (2.7) takes the form µ(x) = e 2xdx = e x2. d [ ] e x2 y = xe x2. dx Integrate both sides, and then perform integration by parts (or guess-andcheck) e x2 y = xe x2 dx = 2 ex2 + c. Solving for y y(x) = 2 + ce x2. From the initial condition y(0) = 2 + c = 2, i.e. c= 3 2. Answer: y(x) = 2 + 3 2 e x2. Example Solve y + t y = cos 2t y(π/2) =. Here the independent variable is t, y = y(t), but the method is of course the same. Compute µ(t) = e t dt = e ln t = t, and then d [ty] = t cos 2t. dt
.2. FIRST ORDER LINEAR EQUATIONS Integrate both sides, and perform integration by parts ty = t cos 2t dt = 2 t sin2t + cos 2t + c. 4 Divide by t y(t) = 2 sin2t + cos2t + c 4 t t. The initial condition gives y(π/2) = 4 π/2 + c π/2 =, i.e. c = π/2 + 4, and so the solution is (2.8) y(t) = 2 sin2t + cos 2t 4 t + π/2 + 4. t This function y(t) gives us a curve, called the integral curve. The initial condition tells us that y = when t = π/2, i.e. the point (π/2, ) lies on the integral curve. What is the maximal interval on which the solution (2.8) is valid? I.e. starting with the initial t = π/2, how far can we continue the solution to the left and to the right of the initial t? We see from (2.8) that the maximal interval is (0, ). At t = 0 the solution y(t) is undefined. Example Solve x dy dx + 2y = sin x y( π) = 2. Here the equation is not in the form (2.4), for which the theory applies. We divide the equation by x dy dx + 2 x y = sin x x. Now the equation is in the right form, with p(x) = x 2 before, we compute using the properties of logarithms µ(x) = e 2 x dx = e 2 lnx = e lnx2 = x 2. and g(x) = sinx x. As
2 CHAPTER. FIRST ORDER EQUATIONS And then d [ ] x 2 y = x 2 sin x dx x = x sinx. Integrate both sides, and perform integration by parts x 2 y = x sinx dx = x cos x + sin x + c, giving us the general solution The initial condition implies Solve for c: y(x) = cos x x + sin x x 2 + c x 2. y( π) = π + c π 2 = 2. c = 2π 2 + π. Answer: y(x) = cos x x + sinx + 2π2 +π. This solution is valid on the interval x 2 x 2 (, 0) (that is how far it can be continued to the left and to the right, starting from the initial x = π). Example Solve dy dx = y x y() = 0. We have a problem: not only this equation is not in the right form, it is a nonlinear equation, because y x is not a linear function of y, no matter what the number x is. We need a little trick. Let us pretend that dy and dx are numbers, and take reciprocals of both sides of the equation dx dy = y x, or dx dy + x = y. Let us now think of y as independent variable, and x as a function of y, i.e. x = x(y). Then the last equation is linear, with p(y) = and g(y) = y. We proceed as usual: µ(y) = e dy = e y, and d dy [ey x] = ye y.
.3. SEPARABLE EQUATIONS 3 Integrating or e y x = ye y dy = ye y e y + c, x(y) = y + ce y. To find c we need a initial condition. The original initial condition tells us that y = 0 for x =. For the inverse function x(y) this translates to x(0) =. So that c = 2. Answer: x(y) = y + 2e y. The rigorous justification of this method is based on the formula for the derivative of an inverse function, that we recall next. Let y = y(x) be some function, and y 0 = y(x 0 ). Let x = x(y) be its inverse function. Then x 0 = x(y 0 ), and we have dx dy (y 0) = dy dx (x 0)..3 Separable Equations.3. Background Suppose we have a function F(y), and y in turn depends on x, i.e. y = y(x). So that in effect F depends on x. To differentiate F with respect to x we use the Chain Rule from Calculus.3.2 The method d dx F(y(x)) = F (y(x)) dy dx. Suppose we are given two functions F(y) and G(x), and let us use the corresponding lower case letters to denote their derivatives, i.e. F (y) = f(y) and G (x) = g(x). Our goal is to solve the equation (i.e. to find the general solution) (3.9) f(y) dy dx = g(x). This is a non-linear equation, because f(y) is a general function of the unknown function y = y(x). We begin by rewriting this equation, using the upper case functions F (y) dy dx = G (x).
4 CHAPTER. FIRST ORDER EQUATIONS Using the Chain Rule, we rewrite the equation as d dx F(y) = d dx G(x). If derivatives of two functions are the same, these functions differ by a constant, i.e. (3.0) F(y) = G(x) + c. This is the desired general solution! If one is lucky, it may be possible to solve this relation for y as a function of x. If not, maybe one can solve for x as a function of y. If both attempts fail, one can use implicit plotting routine to draw the integral curves, i.e. solutions of (3.9). We now describe a simple procedure which leads from the equation (3.9) to its solution (3.0). Let us pretend that dy dx is not a notation for a derivative, but a ratio of two numbers dy and dx. Clearing the denominator in (3.9) f(y) dy = g(x) dx. We have separated the variables, everything involving y is now on the left, while x appears only on the right. Integrate both sides: f(y) dy = g(x) dx, which gives us immediately the solution (3.0). Example Solve dy dx = x( + y2 ). To separate the variables, we multiply by dx, and divide by ( + y 2 ) I.e. the general solution is dy + y 2 dy = which we can also put into the form x dx. arctany = 2 x2 + c, y = tan( 2 x2 + c).
.3. SEPARABLE EQUATIONS 5 Example 2 Solve ( ) xy 2 + x dx + e x dy = 0. This is an example of differential equation, written in differential form. (Dividing through by e x dx, we can put it into a familiar form dy dx = +x xy2 e, x although there is no need to do that.) By factoring we are able to separate the variables: e x dy = x(y 2 + ) dx; dy y 2 + = xe x dx; Answer: y(x) = tan ( xe x + e x + c ). tan y = xe x + e x + c. Recall that by the Main Theorem of Calculus d dx f(t) dt = f(x), for any constant a. The integral x a f(t) dt gives us an anti-derivative of f(x), i.e. we may write f(x) dx = x a f(t) dt+c. Here we can let c be an arbitrary constant, and a to be fixed, or the other way around. Example 3 Solve Separation of variables: dy dx = ex2 y 2 y() = 2. dy y 2 dy = e x2 dx gives on the right to an integral that cannot be evaluated in elementary functions. We shall change it to a definite integral as above. We choose a =, because the initial condition was given at x = : dy x y 2 dy = e t2 dt + c; x y = e t2 dt + c. When x = we have y = 2, which means that c = 2. Answer: y(x) = x et2 dt +. For any x the integral can be quickly computed by a numerical integration method, e.g. by the trapezoidal 2 method. x a
6 CHAPTER. FIRST ORDER EQUATIONS Problem Set I. Integrate by Guess-and-Check:. xe 5x dx 2. x sin3x dx 3. xe 2 x dx 4. x 2 cos 2x dx. 5. 7. e 2x sin3x dx x x 2 + dx 6. (Hint: Look for the anti-derivative in the form Ae 2x sin3x + Be 2x cos3x.) x (x 2 + )(x 2 + 2) dx II. Find the general solution of the linear problems:. y + x y = cosx 2. xy +2y = e x 3. x 4 y +3x 3 y = x 2 e x dy 4. dx = 2x(x2 + y). Ans. y = ce x2 x 2. Find the solution of the initial value problem, and state the maximum interval on which this solution is valid: 5. y + x y = cos x, y(π 2 cos(x)+xsin(x) ) = Ans. y = x ; (0, ). 6. xy + (2 + x)y =, y( 2) = 0 Ans. y = x + 3e x 2 x 2 x 2; (, 0). 7. x(y y) = e x, y( ) = e Ans. y = e x ln x + e x ; (, 0). 8. (t + 2) dy dt 5t 2 + y = 5, y() = Ans. y = ; ( 2, ). t + 2 III. Solve by separating the variables. dy dx = 2 x(y 3 + ) Ans. y 4 4 + y 2 lnx = c. 2. e x dx ydy = 0, y(0) = Ans. y = 2e x. 3. (x 2 y 2 + y 2 )dx yxdy = 0 Ans. y = e x2 2 +ln x+c = cxe x2 2. 4. y (t) = ty 2 ( + t 2 ) /2 2, y(0) = 2 Ans. y = 2 t 2 + 3.
.4. SOME SPECIAL EQUATIONS 7 5. (y xy + x )dx+ x 2 dy = 0, y() = 0. Ans. y = e e xx. e 6. y x = e x2 y, y(2) =. Ans. y = e 2 et2 dt.4 Some Special Equations.4. Homogeneous Equations Let f(t) be a given function. If we set here t = y x, we obtain a function f( y x ). Then f( y x ) is a function of two variables x and y, but it depends on them in a special way. One calls such function to be homogeneous. For example, is a homogeneous function, because we can put it into the form y 4x x y i.e. here f(t) = t 4 t. Our goal is to solve the equation y 4x x y = y/x 4 y/x, (4.) dy dx = f(y x ). Set v = y x. Since y is a function of x, the same is true of v = v(x). Solving for y, y = xv, and then by the product rule Switching to v in (4.) (4.2) dy dx = v + xdv dx. v + x dv dx = f(v). This a separable equation! Indeed, after taking v to the right, we can separate the variables dv dx f(v) v dv = x. After solving this for v(x), we can express the original unknown y = xv(x). In practice, one should try to remember the formula (4.2).
8 CHAPTER. FIRST ORDER EQUATIONS Example Solve dy dx = x2 +3y 2 2xy y() = 2. To see that the equation is homogeneous, we rewrite it as dy dx = x 2 y + 3 y 2 x. Set v = y x, or y = xv. Observing that x y = v, we have Simplify Separating variables v + x dv dx = 2 v + 3 2 v dv dx = 2 v + 2 v = + v2. 2v 2v + v 2 dv = dx x. We now obtain the general solution, doing the following steps (observe that ln c is another way to write an arbitrary constant) From the initial condition ln( + v 2 ) = lnx + lnc = ln cx; + v 2 = cx; v = ± cx ; y(x) = xv = ±x cx ; y() = ± c = 2. It follows that we need to select minus, and c = 5. Answer: y(x) = x 5x. We mention next an alternative definition: the function f(x, y) is called homogeneous if f(tx, ty) = f(x, y) for all constants t.
.4. SOME SPECIAL EQUATIONS 9 If this holds, then setting t = x, we see that f(x, y) = f(tx, ty) = f(, y x ), i.e. f(x, y) is some function of y x, as the old definition was saying. Example Solve dy dx = y x + xy. It is more straightforward to use the new definition to verify that the function f(x, y) = is homogeneous: y x+ xy f(tx, ty) = (ty) (tx) + (tx)(ty) = y x + xy Letting y/x = v or y = xv we rewrite the equation v + xv = We proceed to separate the variables: x dv dx = xv x + x xv = v + v. v + v v = v3/2 + v ; + v v 3/2 dx dv = x ; 2v /2 + ln v = ln x + c; = f(x, y). The integral on the left was evaluated by division. Finally, we replace v by y/x: 2 x y + ln y x = ln x + c ; 2 x y + ln y = c. We have obtained an implicit representation of solution.
20 CHAPTER. FIRST ORDER EQUATIONS.4.2 The Logistic Population Model Let y(t) denote the number of rabbits on a tropical island at time t. The simplest model of population growth is y = ay y(0) = y 0. This model assumes that initially the number of rabbits was equal to some number y 0 > 0, while the rate of change of population, i.e. y (t), is proportional to the number of rabbits. Here a is a given constant. The population of rabbits grows, which results in a faster and faster rate of growth. One expects an explosive growth. Indeed, solving the equation, we get y(t) = ce at. From the initial condition y(0) = c = y 0, which gives us y(t) = y 0 e at, i.e. exponential growth. This is the notorious Malthusian model. Is it realistic? Yes, sometimes, for a limited time. If the initial number of rabbits y 0 is small, then for a while their number may grow exponentially. A more realistic model, which can be used for a long time is the Logistic Model: y = ay by 2 y(0) = y 0. Here y = y(t); a, b and y 0 are positive constants that are given. If y 0 is small, then at first y(t) is small. Then the by 2 term is negligible, and we have exponential growth. As y(t) increases, this term is not negligible anymore, and we can expect the rate of growth to get smaller and smaller. (Writing the equation as y = (a b y)y, we can regard the a b y term as the rate of growth.) In case the initial number y 0 is large, the quadratic on the right is negative, i.e. y (t) < 0 and the population decreases. We now solve the problem to confirm our guesses. This problem can be solved by separation of variables. Instead, we use another technique. Divide both sides of the equation by y 2 y 2 y = ay b. Introduce a new unknown function v(t) = y (t) = y(t). By the generalized power rule v = y 2 y, so that we can rewrite the last equation as v = av b,
.4. SOME SPECIAL EQUATIONS 2 or v + av = b. This a linear equation for v(t)! To solve it, we follow the familiar steps, and then we return to the original unknown function y(t): µ(t) = e a dt = e at ; d [ ] e at v = be at ; dt e at v = b e at dt = b a eat + c; v = b a + ce at ; y(t) = v = b a + ce at. To find the constant c, we use the initial condition y(t) = y(0) = b a + c = y 0; c = y 0 b a ; ( ) b a + y 0 b a e. at The problem is solved. Observe that lim t + y(t) = a b, no matter what initial value y 0 we take. The number a b is called the carrying capacity. It tells us the number of rabbits in the long run, that our island will support..4.3 Bernoulli s Equation Let us solve the equation y (t) = p(t)y(t) + g(t)y n (t). Here p(t) and g(t) are given functions, n is a given constant. We see that the logistic model above is just a particular example of Bernoulli s equation. We divide this equation by y n y n y = p(t)y n + g(t).
22 CHAPTER. FIRST ORDER EQUATIONS Introduce a new unknown function v(t) = y n (t). Compute v = ( n)y n y, i.e. y n y = n v, and rewrite the equation as v = ( n)p(t)v + ( n)g(t). This is a linear equation for v(t)! After solving for v(t), we calculate y(t) = v n (t). Example Solve y = y + t y. Writing this equation in the form y = y + ty /2, we see that this is a Bernoulli s equation, with n = /2, i.e. we need to divide through by y /2. But that is the same as multiplying through by y /2, which we do, obtaining y /2 y = y 3/2 + t. We now let v(t) = y 3/2, v (t) = 3 2 y/2 y, obtaining a linear equation for v, which we solve as usual: 2 3 v = v + t; v 3 2 v = 3 2 t; µ(t) = e 3 2 dt = e 3 2 t ; e 3 2 t v = d [ ] e 3 2 t v = 3 dt 2 te 3 2 t 3 2 te 3 2 t dt = te 3 2 t 2 3 e 3 2 t + c; v = t 2 3 + ce3 2 t. Returning to the original variable y, we have the answer: y = ( t 2 3 + ce3 2 t ) 2/3..4.4 Riccati s Equation Let us try to solve the equation y (t) + a(t)y(t) + b(t)y 2 (t) = c(t). Here a(t), b(t) and c(t) are given functions. In case c(t) = 0, this is a Bernoulli s equation, which we can solve. For general c(t) one needs some luck to solve this equation. Namely, one needs to guess a particular solution
.4. SOME SPECIAL EQUATIONS 23 p(t). Then a substitution y(t) = p(t) + z(t) produces a Bernoulli s equation for z(t), which we can solve. There is no general way to find a particular solution, which means that one cannot always solve the Riccati s equation. Occasionally one can get lucky. Example Solve y + y 2 = t 2 2t. We have a quadratic on the right, which suggest that we look for the solution in the form y = at + b. Plugging in, we get a quadratic on the left too. Equating the coefficients in t 2, t and constant terms, we obtain three equations to find a and b. In general three equations with two unknowns will have no solution, but this is a lucky case, a =, b =, i.e. p(t) = t + is a particular solution. Substituting y(t) = t + + v(t) into the equation, and simplifying, we get v + 2( t)v = v 2. This is a Bernoulli s equation. As above, we divide through by v 2, and then set z = v, z = v v 2, to get a linear equation: v 2 v + 2( t)v = ; z 2( t)z = ; µ = e 2( t)dt = e t2 2t ; e t2 2t z = d [ ] e t2 2t z = e t2 2t ; dt e t2 2t dt. The last integral cannot be evaluated through elementary functions (Mathematica can evaluate it through a special function, called Erfi). So we leave this integral unevaluated. We then get z from the last formula, after which we express v, and finally y. Answer: y(t) = t++ et2 2t e t 2 2t. (The usual dt arbitrary constant c is now inside the integral.) Example Solve (4.3) y + 2y 2 = 6 t 2. This time we look for solution in the form y(t) = a/t. Plugging in, we determine a = 2, i.e p(t) = 2/t is a particular solution (a = 3/2 is also
24 CHAPTER. FIRST ORDER EQUATIONS a possibility, but one particular solution is enough). Substitution y(t) = 2/t + v(t) produces a Bernoulli s equation Solving it as before, we obtain v(t) = v + 8 t v + 2v2 = 0. 7 ct 8 2t. Answer: y(t) = 2 t + 7 ct 8 2t. Let us outline an alternative solution of this problem. Set y = z, where z = z(t) is a new unknown function. Plugging into (4.3), then clearing the denominators, we have z z 2 + 2 z 2 = 6 t 2; z + 2 = 6z2 t 2. This is a homogeneous equation, which can be solved as before. Think what are other equations, for which this neat trick would work. (But do not try to publish your findings, this was done by Jacoby around two hundred years ago.) There are some important ideas that we learned in this subsection. Knowledge of one particular solution may help to crack open the equation, and get all of its solutions. Also, the form of this particular solution depends on the function in the right hand side of the equation..4.5 Parametric Integration Let us solve the problem (here y = y(x)) y = y 2 y(0) =. Unlike the previous problems, this equation is not solved for the derivative y (x). Solving for y (x), and then separating the variables, one may indeed find the solution. Instead, let us assume that y (x) = sint, where t is a parameter. From the equation y = sin 2 t = cos 2 t = cos t,
.4. SOME SPECIAL EQUATIONS 25 if we assume that cost > 0. Recall differentials: dy = y (x) dx, or i.e. dx = dy sint dt y = = dt, (x) sin t x = t + c. We have obtained general solution in a parametric form: x = t + c y = cos t. Solving for t, t = x + c, i.e. y = cos( x + c). From the initial condition c = 0, giving us the solution y = cos x. This solution is valid on infinitely many disjoint intervals where cos x 0 (because we see from the equation that y 0)..4.6 Some Applications Differential equations arise naturally in geometric and physical problems. Example Find all decreasing functions y = f(x), with the following property: the area of the triangle formed by the vertical line going down from the curve, the x-axis and the tangent line to this curve is constant, equal to a > 0. Let (x 0, f(x 0 )) be an arbitrary point on the graph of y = f(x). Draw the triangle in question, formed by the horizontal line x = x 0, the x-axis, and the tangent line to this curve. The tangent line intersects the x-axis at some point x to the right of x 0, because f(x) is decreasing. The slope of the tangent line is f (x 0 ), so that the point-slope equation of the tangent line is y = f(x 0 ) + f (x 0 )(x x 0 ). At x, we have y = 0, i.e. 0 = f(x 0 ) + f (x 0 )(x x 0 ). Solve this for x, x = x 0 f(x 0) f (x 0 ). It follows that the horizontal side of our triangle is f(x 0) f (x 0 ), while the vertical side is f(x 0). The area of the right triangle is then f 2 (x 0 ) 2 f (x 0 ) = a.
26 CHAPTER. FIRST ORDER EQUATIONS (Observe that f (x 0 ) < 0, so that the area is positive.) The point x 0 was arbitrary, so that we replace it by x, and then we replace f(x) by y, and f (x) by y : y 2 2 y = a; or y y 2 = 2a. We solve this differential equation by taking antiderivatives of both sides: y = 2a x + c; Answer: y(x) = 2a x+2ac. Example A tank holding 0L (liters) is originally filled with water. A saltwater mixture is pumped into the tank at a rate of 2L per minute. This mixture contains 0.3 kg of salt per liter. The excess fluid is flowing out of the tank at the same rate (i.e. 2L per minute). How much salt does the tank contain after 4 minutes. Let t be the time since the mixture started flowing, and let y(t) denote the amount of salt in the tank at time t. The derivative y (t) gives the rate of change of salt per minute. The salt is pumped in at a rate of 0.6 kg per minute. The density of salt at time t is y(t) 0 (i.e. each liter of solution in the tank contains y(t) y(t) 0 kg of salt). So the salt flows out at the rate 2 0 = 0.2 y(t) kg/min. The difference of these two rates is y (t). I.e. y = 0.6 0.2y. This is a linear differential equation. Initially, there was no salt in the tank, i.e. y(0) = 0 is our initial condition. Solving the equation together with the initial condition, we have y(t) = 3 3e 0.2t. After 4 minutes we have y(4) = 3 3e 0.8.65 kg of salt in the tank. Now suppose a patient has food poisoning, and doctors are pumping water to flush his stomach out. One can compute similarly the weight of poison left in the stomach at time t..5 Exact Equations The equation (here y = y(x)) y 2 + 2xyy = 0
.5. EXACT EQUATIONS 27 can be easily solved if we rewrite it in the equivalent form d ( xy 2) = 0. dx Then xy 2 = c, and the general solution is y(x) = ± c x. We wish to play the same game for general equations of the form (5.4) M(x, y) + N(x, y)y (x) = 0. Here the functions M(x, y) and N(x, y) are given, and we assume them to have continuous derivatives up to the second order. In the above example M = y 2 and N = 2xy. Definition The equation (5.4) is called exact if there is a function ψ(x, y), so that we can rewrite (5.4) in the form (5.5) d ψ(x, y) = 0. dx The general solution of the exact equation is (5.6) ψ(x, y) = c. There are two natural questions: when is the equation (5.4) exact, and if it is exact, how does one find ψ(x, y)? Theorem The equation (5.4) is exact if and only if the following partial derivatives are equal (5.7) M y = N x for all x and y. This theorem says two things: if the equation is exact, then the partials are equal, and conversely, if the partials are equal, then the equation is exact. Proof:. Assume the equation (5.4) is exact, i.e. it can be written in the form (5.5). Performing the differentiation in (5.5), we write it as ψ x + ψ y y = 0.
28 CHAPTER. FIRST ORDER EQUATIONS But this is the same equation as (5.4), i.e. Taking second partials ψ x = M ψ y = N. ψ xy = M y ψ yx = N x. We know from Calculus that ψ xy = ψ yx, therefore M y = N x. 2. Assume that M y = N x. We will show that the equation (5.4) is then exact by producing ψ(x, y). We had just seen that ψ(x, y) must satisfy (5.8) ψ x = M(x, y) ψ y = N(x, y). Take anti-derivative in x of the first equation (5.9) ψ(x, y) = M(x, y) dx + h(y), where h(y) is an arbitrary function of y. To determine h(y), plug the last formula into the second line of (5.8) ψ y = M y (x, y) dx + h (y) = N(x, y), or (5.20) h (y) = N(x, y) M y (x, y) dx p(x, y). Observe that we have denoted by p(x, y) the right side of the last equation. It turns out that p(x, y) does not really depend on x! Indeed, x p(x, y) = N x M y = 0, because it was given to us that M y = N x. So that p(x, y) is a function of y only, so let us denote it p(y). The equation (5.20) takes the form h (y) = p(y). We integrate this to determine h(y), which we then plug into (5.20) to get ψ(x, y).
.5. EXACT EQUATIONS 29 The equation is an alternative form of (5.4). Example Solve M(x, y) dx + N(x, y) dy = 0 e x siny + y 3 (3x e x cosy) dy dx = 0. Here M(x, y) = e x siny + y 3, N(x, y) = 3x + e x cosy. Compute M y = e x cos y + 3y 2 N x = e x cosy 3. The partials are not the same, the equation is not exact, and our theory does not apply. Example Solve ( ) y x + 6x dx + (ln x 2) dy = 0. Here M(x, y) = y x + 6x and N(x, y) = ln x 2. Compute M y = x = N x, and so the equation is exact. To find ψ(x, y), we observe that the equations (5.8) take the form ψ x = y x + 6x ψ y = ln x 2. Take anti-derivative in x of the first equation ψ(x, y) = y ln x + 3x 2 + h(y), where h(y) is an arbitrary function of y. Plug this into the second equation i.e. ψ y = lnx + h (y) = ln x 2, h (y) = 2. Integrating, h(y) = 2y, and so ψ(x, y) = y ln x + 3x 2 2y, giving us the general solution y ln x + 3x 2 2y = c.
30 CHAPTER. FIRST ORDER EQUATIONS We can solve this equation for y, y(x) = lnx 2 c 3x2. Observe that when solving for h(y), we choose the integration constant to be zero, because at the next step we set ψ(x, y) equal to c, an arbitrary constant. Example Find b, for which the equation ( ) ye 2xy + x dx + bxe 2xy dy = 0 is exact, and then solve the equation with that b. Setting equal the partials M y and N x, we have e 2xy + 2xye 2xy = be 2xy + 2bxye 2xy. We see that b =. When b = the equation becomes ( ) ye 2xy + x dx + xe 2xy dy = 0, and we know that it is exact. We look for ψ(x, y) as before: ψ x = ye 2xy + x ψ y = xe 2xy. Just for practice, let us begin this time with the second equation. Taking an antiderivative in y in the second equation ψ(x, y) = 2 e2xy + h(x), where h(x) is an arbitrary function of x. Plugging this into the first equation, ψ x = ye 2xy + h (x) = ye 2xy + x. This tells us that h (x) = x, h(x) = 2 x2, and then ψ(x, y) = 2 e2xy + 2 x2. Answer: 2 e2xy + 2 x2 = c, or y = 2x ln(2c x2 ). Exact equations are connected with the conservative vector fields. Recall that a vector field F(x,y) =< M(x, y), N(x,y) > is called conservative if there is a function ψ(x, y), called the potential, such that F(x,y) = ψ(x, y). Recalling that ψ(x, y) =< ψ x, ψ y >, we have ψ x = M, and ψ y = N, the same relations that we had for exact equations.
.6. NUMERICAL SOLUTION BY EULER S METHOD 3.6 Numerical Solution by Euler s method We have learned a number of techniques for solving differential equations, however the sad truth is that most equations cannot be solved. Even a simple looking equation like y = x + y 3 is totally out of reach. Fortunately, if you need a specific solution, say the one satisfying the initial condition y(0) =, it can be easily approximated. In general we shall deal with the problem y = f(x, y) y(x 0 ) = y 0. Here the function f(x, y) is given (in the above example we had f(x, y) = x + y 3 ), and the initial condition prescribes that solution is equal to a given number y 0 at a given point x 0. Fix a step size h, and let x = x 0 + h, x 2 = x 0 + 2h,..., x n = x 0 + nh. We will approximate y(x n ), the value of solution at x n. We call this approximation y n. To go from the point (x n, y n ) to the point (x n+, y n+ ) on the graph of solution y(x), we use the tangent line approximation: y n+ y n + y (x n )(x n+ x n ) = y n + y (x n )h = y n + f(x n, y n )h. (We have expressed y (x n ) = f(x n, y n ) from the differential equation.) The resulting formula is easy to implement, it is just one loop, starting with (x 0, y 0 ). One continues the computations until the point x n goes as far as you want. Decreasing the step size h will improve the accuracy. This will lead to more steps, but with the power of modern computers this is not a problem, particularly for simple examples, as the one above. In that example x 0 = 0, y 0 =. If we choose h = 0.05, then x = 0.05, and Continuing, we have x 2 = 0., and y = + (0 + 3 ) 0.05 =.05. y 2 =.05 + (0.05 +.05 3 ) 0.05..
32 CHAPTER. FIRST ORDER EQUATIONS Then x 3 = 0.5, and y 3 =. + (0. +. 3 ) 0.05.8. If you need to approximate the solution on the interval (0, 0.4), you will need to make 5 more steps. Of course, it is better to program a computer. Euler method is using tangent line approximation, i.e. the first two terms of the Taylor series approximation. One can use more terms, and develop more sophisticated methods. But here is a question: if it is so easy to compute numerical approximation to solution, why bother learning analytical solutions? The reason is that we seek not just to solve a differential equation, but to understand it. What happens if initial conditions change? The equation may include some parameters, what happens if they change?.7 Existence and Uniqueness of Solution Let us again consider the initial value problem y = f(x, y) y(x 0 ) = y 0, and ask two basic questions: is there a solution of this problem, and if there is, is the solution unique? Theorem 2 Assume that the functions f(x, y) and f y (x, y) are continuous in some neighborhood of the initial point (x 0, y 0 ). The there exists a solution, and there is only one solution. The solution y = y(x) is defined on some interval (x, x 2 ) that includes x 0. One sees that the conditions of this theorem are not too restrictive, so that the theorem tends to apply, providing us with existence and uniqueness of solution. But not always! Example Solve y = y y(0) = 0.
.7. EXISTENCE AND UNIQUENESS OF SOLUTION 33 The function f(x, y) = y is continuous (for y 0), but its partial, f y (x, y) = y, is not even defined at the initial point (0, 0). The theorem does not apply. One checks that the function y = t2 4 solves our initial value problem. But here is another solution: y = 0. (Having two different solutions of the same initial value problem is like having two primadonnas in the same theater.) Observe that the theorem guarantees existence of solution only on some interval (it is not happily ever after ). Example Solve for y = y(t) y = y 2 y(0) =. Here f(x, y) = y 2, and f y (x, y) = 2y are continuous functions. The theorem applies. By separation of variables, we determine the solution y(t) = t. As time t approaches, this solution disappears, by going to infinity. This is sometimes called blow up in finite time. Problems I. Determine if the equation is homogeneous, and if it is, solve it:. 2. 3. 4. dy dx = y + 2x x dy dx = x2 xy + y 2 x 2 dy dx = y2 + 2x y Ans. y = cx + 2x lnx. Ans. y = x + cx + x lnx. c + lnx dy dx = y2 + 2xy x 2, y() = 2 Ans. y = 2x2 3 2x. 5. xy y = x tan y x Ans. sin y x = cx. 6. y = x2 + y 2, y() = 2. Ans. y = x xy 2 lnx 2 + 4x 2. 7. y = y + x /2 y 3/2 y, with x > 0, y > 0 Ans. 2 = lnx + c. xy x
34 CHAPTER. FIRST ORDER EQUATIONS II. Solve the Bernoulli s equations. y x y = y2, y(2) = 2 Ans. y = 2x x 2 2. 2. dy dx = y2 + 2x y Ans. y = ± 2x + ce 2x. III. Determine if the equation is exact, and if it is, solve it:. (2x + 3x 2 y) dx + (x 3 3y 2 ) dy = 0 Ans. x 2 + x 3 y y 3 = c. 2. (x+siny) dx+(x cosy 2y) dy = 0 Ans. x (x 2 + y 2 ) 3/2 dx + y 2 x2 +x siny y 2 = c. 3. (x 2 + y 2 ) 3/2 dx = 0 Ans. x2 + y 2 = c 2. x 4. (x 2 + y 2 ) 3/2 dx + y (x 2 + y 2 dx = 0, y( ) = 3. What is the x ) 3/2 interval, on which the solution is valid? Sketch the graph of the solution. 5. (6xy cos y) dx + (3x 2 + x siny + ) dy = 0 6. (2x y) dx + (2y x) dy = 0, y() = 2 Ans. x 2 + y 2 xy = 3. 7. Find the value of b for which the following equation is exact, and then solve the equation, using that value of b Ans. b =, y = x ln(c x2 ). (ye xy + 2x) dx + bxe xy dy = 0 IV. Find two solutions of the initial value problem y = (y ) /3, y() =. Is it good to have two solutions of the same initial value problem? What went wrong?
Chapter 2 Second Order Equations 2. Special Second Order Equations Probably the simplest second order equation is y (x) = 0. Taking antiderivative y = c. We have denoted the arbitrary constant c, because we expect another arbitrary constant to make an appearance. Indeed, taking another antiderivative, we get the general solution y(x) = c x + c 2. We see that general solutions for second order equations depend on two arbitrary constants. General second order equation for the unknown function y = y(x) can be written as y = f(x, y, y ), where f is a given function of its three variables. We cannot expect all such equation to be solvable, as we could not even solve all first order equations. In this section we study special second order equations, which are reducible to first order equations, greatly increasing their chances to be solved. 35
36 CHAPTER 2. SECOND ORDER EQUATIONS 2.. y is not present in the equation Let us solve for y(t) the equation ty y = t 2. We see derivatives of y in this equation, but not y itself. We denote y (t) = v(t), and v(t) is our new unknown function. Clearly, y (t) = v (t), and the equation becomes tv v = t 2. This is a first order equation for v(t)! It is actually a linear first order equation, so that we solve it as before. Once we have v(t), we determine the solution y(t) by integration. Details: v t v = t ; µ(t) = e t dt = e lnt = e ln t = [ ] d dt t v = ; t v = t + c ; y = v = t 2 + c t ; y(t) = t3 3 + c t 2 2 + c 2. t ; Let us solve for y(x) y + 2xy 2 = 0. Again, y is missing in the equation. Setting y = v, y = v, we obtain a first order equation. This time the equation for v(x) is not linear, but we can separate the variables. Here are the details: v + 2xv 2 = 0 ; dv dx = 2xv2 ; dv v 2 dv = 2x dx ;
2.. SPECIAL SECOND ORDER EQUATIONS 37 v = x2 c ; y = v = x 2 ; + c Let us now assume that c > 0. Then y(x) = x 2 dx = arctan x + c 2. + c c c If c = 0 or c < 0, we get two different formulas for solution! Indeed, in case c = 0, we have y =, and the integration gives us, y = x 2 x + c 3, the second family of solutions. In case c < 0, we can write y = x 2 c 2 = [ ] ; 2c x c x + c Integrating, we get the third family of solutions, y = 2c ln x c 2c ln x+ c + c 4. And, the fourth family of solutions is y = c. 2..2 x is not present in the equation Let us solve for y(x) y + yy 3 = 0. All three functions appearing in the equation are functions of x, but x itself is not present in the equation. On the curve y = y(x) the slope y is a function of x, but it is also a function of y. We therefore set y = v(y), and v(y) will be our new unknown function. By the Chain Rule and our equation takes the form d dx v(y) = v (y) dy dx = v v. v v + yv 3 = 0. This a first order equation! To solve it, we begin by factoring ( v v + yv 2) = 0. If the first factor is zero, y = v = 0, we obtain a family of solutions y = c. Setting the second factor to zero dv dy + yv2 = 0,
38 CHAPTER 2. SECOND ORDER EQUATIONS we have a separable equation. Separating the variables dv v 2 = y dy ; v = y2 /2 + c = y2 + 2c ; 2 dy dx = v = 2 y 2. + 2c To find y(x) we need to solve another first order equation. Again, we separate the variables ( ) y 2 + 2c dy = 2 dx ; y 3 /3 + 2c y = 2x + c 2. This gives us the second family of solutions. 2.2 Linear Homogeneous Equations with Constant Coefficients We wish to find solution y = y(t) of the equation ay + by + cy = 0, where a, b and c are given numbers. This is arguably the most important class of differential equations. If y(t) denotes displacement of an object at time t, then this equation relates the displacement with velocity y (t) and acceleration y (t). This is equation is linear, because we only multiply y and its derivatives by constants, and add. The word homogeneous refers to the right hand side being zero. Observe, if y(t) is a solution, so is 2y(t). Indeed, plug this function into the equation: a(2y) + b(2y) + c(2y) = 2 ( ay + by + cy ) = 0. The same argument shows that c y(t) is a solution for any constant c. If y (t) and y 2 (t) are two solutions, similar argument will show that y (t)+y 2 (t) and y (t) y 2 (t) are also solutions. More generally, c y (t) + c 2 y 2 (t) is a
2.2. LINEAR HOMOGENEOUS EQUATIONS WITH CONSTANT COEFFICIENTS39 solution for any c and c 2. (This is called a linear combination of two solutions.) Indeed, a (c y (t) + c 2 y 2 (t)) + b (c y (t) + c 2 y 2 (t)) + c (c y (t) + c 2 y 2 (t)) = c (ay + by + cy ) + c 2 (ay 2 + by 2 + cy 2) = 0. We now try to find a solution of the form y = e rt, where r is a constant to be determined. We have y = re rt and y = r 2 e rt, so that plugging into the equation gives ( ) a(r 2 e rt ) + b(re rt ) + ce rt = e rt ar 2 + br + c = 0. Dividing by a positive quantity e rt, ar 2 + br + c = 0. This is a quadratic equation for r, called characteristic equation. If r is a root (solution) of this equation, then e rt solves our differential equation. When solving a quadratic equation, it is possible to encounter two real roots, one (repeated) real root, or two complex conjugate roots. 2.2. Characteristic equation has two distinct real roots Call the roots r and r 2, and r 2 r. Then e r t and e r 2t are two solutions, and their linear combination gives us the general solution y(t) = c e r t + c 2 e r 2t. As we have two constants to play with, one can prescribe two additional conditions for the solution to satisfy. Example Solve y + 4y + 3y = 0 y(0) = 2 y (0) =. We prescribe that at time zero the displacement is 2, and the velocity is. These two conditions are usually referred to as initial conditions, and together with the differential equation, they form an initial value problem. The characteristic equation is r 2 + 4r + 3 = 0.
40 CHAPTER 2. SECOND ORDER EQUATIONS Solving it (say by factoring as (r + )(r + 3) = 0), we get its roots r = and r 2 = 3. The general solution is then y(t) = c e t + c 2 e 3t. Then y(0) = c + c 2. Compute y (t) = c e t 3c 2 e 3t, and therefore y (0) = c 3c 2. Initial conditions tell us that c + c 2 = 2 c 3c 2 =. We have two equations to find two unknowns c and c 2. We find that c = 5/2 and c 2 = /2 (say by adding the equations). Answer: y(t) = 5 2 e t 2 e 3t. Example Solve The characteristic equation is y 4y = 0. r 2 4r = 0. Its roots are r = 2 and r 2 = 2. The general solution is then y(t) = c e 2t + c 2 e 2t. More generally, for the equation y a 2 y = 0 ( a is a given constant) the general solution is y(t) = c e at + c 2 e at. This should become automatic, because such equations appear often. Example Find the constant a, so that the solution of the initial problem 9y y = 0, y(0) = 2, y (0) = a. is bounded as t. We begin by writing down (automatically!) the general solution y(t) = c e 3 t + c 2 e 3 t.
2.2. LINEAR HOMOGENEOUS EQUATIONS WITH CONSTANT COEFFICIENTS4 Compute y (t) = 3 c e 3 t + 3 c 2e 3 t, and then the initial conditions give y(0) = c + c 2 = 2 y (0) = 3 c + 3 c 2 = a. Solving the system of two equation for c and c 2 (by multiplying the second equation through by 3 and adding it to the first equation), we get c 2 = + 3 2 a and c = 3 2a. Solution of the initial value problem is then y(t) = ( 32 ) a e 3 t + ( + 32 ) a e 3 t. In order for this solution to stay bounded as t, the coefficient in front of e 3 t must be zero. I.e. + 3 2 a = 0, and a = 2 3. The solution then becomes y(t) = 2e 3 t. Finally, observe that if r and r 2 are roots of the characteristic equation, then we can factor the characteristic polynomial as (2.) ar 2 + br + c = a(r r )(r r 2 ). 2.2.2 Characteristic equation has only one (repeated) real root This is the case we get r 2 = r, when solving the characteristic equation. We still have a solution y (t) = e r t. Of course, any constant multiple of this solution is also a solution, but to form a general solution we need another truly different solution, as we saw in the preceding case. It turns out that y 2 (t) = te r t is that second solution, and the general solution is then y(t) = c e r t + c 2 te r t. To justify that y 2 (t) = te r t is a solution, we observe that in this case formula (2.) becomes ar 2 + br + c = a(r r ) 2. Square out the quadratic on the right as ar 2 2ar r + ar 2. Because it is equal to the quadratic on the left, the coefficients of both polynomials in r 2, r, and the constant terms are the same. We equate the coefficients in r: (2.2) b = 2ar.
42 CHAPTER 2. SECOND ORDER EQUATIONS To plug y 2 (t) into the equation, we compute its derivatives y 2(t) = e r t + r te r t = e r t ( + r t), and similarly y 2 (t) = er t ( 2r + r 2 t). Then ay 2 + by 2 + cy 2 = ae r t ( 2r + r 2 t ) + be r t ( + r t) + cte r t = e r t (2ar + b) + te r t ( ar 2 + br + c ) = 0. In the last line the first bracket is zero because of (2.2), and the second bracket is zero because r is a solution of the characteristic equation. Example 9y + 6y + y = 0. The characteristic equation 9r 2 + 6r + = 0 has a double root r = 3. The general solution is then y(t) = c e 3 t + c 2 te 3 t. Example Solve y 4y + 4y = 0 y(0) =, y (0) = 2. The characteristic equation r 2 4r + 4 = 0 has a double root r = 2. The general solution is then y(t) = c e 2t + c 2 te 2t. Here y (t) = 2c e 2t + c 2 e 2t + 2c 2 te 2t, and from the initial conditions y(0) = c = y (0) = 2c + c 2 = 2. From the first equation c =, and then c 2 = 4. Answer: y(t) = e 2t 4te 2t.
2.3. CHARACTERISTIC EQUATION HAS TWO COMPLEX CONJUGATE ROOTS43 2.3 Characteristic equation has two complex conjugate roots 2.3. The Euler s formula Recall the Maclauren s formula e z = + z + 2! z2 + 3! z3 + 4! z4 + 5! z5 +.... Plug in z = i θ, where i = the imaginary unit, and θ is a real number. Calculating the powers, and separating the real and imaginary parts, we have e i θ = + i θ + 2! (i θ)2 + 3! (i θ)3 + 4! (i θ)4 + 5! (i θ)5 +... = + i θ 2! θ2 3! i θ3 + 4! θ4 + 5! i θ5 +... ( ) ( ) = 2! θ2 + 4! θ4 +... + i θ 3! θ3 + 5! θ5 +... We have derived the Euler s formula: = cosθ + i sin θ. (3.3) e i θ = cos θ + i sinθ. Replacing θ by θ we have (3.4) e i θ = cos( θ) + i sin( θ) = cosθ i sinθ. Adding the last two formulas, we express (3.5) cosθ = ei θ + e i θ 2. Subtracting from (3.3) the formula (3.4), and dividing by 2i (3.6) sin θ = ei θ e i θ 2i. 2.3.2 The General Solution Recall that to solve the equation ay + by + cy = 0