16. Second-order differential equations: general solutions

1 16. Second-order differential equations: general solutions If y = f(t) is a function, then y' = f '(t) is the derivative. Recall that the second de...
Author: Linda Edwards
43 downloads 0 Views 18KB Size
1

16. Second-order differential equations: general solutions If y = f(t) is a function, then y' = f '(t) is the derivative. Recall that the second derivative of y is written y'' or f ''(t) and means the derivative of the derivative: y'' = f ''(t) = Dt [f '(t)] = Dt [Dt [f(t)]]. Example. Find the second derivative of e3t Solution. If f(t) = e3t then f ' (t) = e3t (3) = 3 e3t f ''(t) = 3 e3t (3) = 9 e3t A second-order differential equation is an equation for an unknown function (often y) that involves y''. For example, y'' - y = 0 Our attention here will be focused on equations of the form a y '' + b y ' + c y = 0 where a, b, and c are constants. Some of the constants may be 0. Such equations are called linear homogeneous equations with constant coefficients. They are called linear because for example no term has one of y or y' or y'' raised to any power except the first power. They are called homogeneous because every nonzero term contains y or y' or y''. Effectively, the right hand side of a homogeneous equation is 0. These expressions are multiplied by constants, hence the "constant coefficients" in the name. The method of solving such equations has several steps. Step 1. The first step is to find two solutions of a particular form. For linear homogeneous equations with constant coefficients, experience has shown the following: A solution y = y(t) of the equation a y '' + b y ' + c y = 0 can usually be found of the form y = ekt for some constant k. Example. Find two solutions to y'' + y' - 2y= 0 Solution. We guess that y = ekt for some constant k. Then y' = k ekt, and y'' = k ekt k = k2 ekt. Substituting these into the differential equation we obtain k2 ekt + k e kt - 2 ekt = 0 Factor. ekt (k2 + k - 2) = 0 Divide by ekt since it is never 0: k2 + k - 2 = 0 Solve: (k+2) (k-1) = 0 k + 2 = 0 or k-1 = 0

2 k = -2 or k = 1. Hence one solution is y = e-2t and another solution is y = e1t = et. Check: If y = e-2t then y' = -2 e-2t and y'' = 4 e-2t. Hence y'' + y' - 2y = 4 e -2t - 2 e-2t -2(e-2t) = 0. Thus the first solution checks. Similarly the second solution checks. Step 2. We find more solutions by combining the solutions found in Step 1 with constants: Theorem. Suppose that y = y1(t) and y = y2(t) are solutions to a y'' + b y' + c y = 0. Then for any constants A and B, the function y = A y1(t) + B y 2(t) is also a solution of the same equation. Example (continued). Since y1 = e-2t and y2 = et are solutions to y'' + y' - 2y= 0 so is y = A e-2t + B e t for any constants A and B. Proof of the theorem. Since y = y1(t) is a solution, we know a y1'' + b y 1' + c y 1 = 0. Since y = y2(t) is a solution, we know a y2'' + b y2' + c y2 = 0. Now we look at y = A y1(t) + B y2(t). We just check the differential equation. Differentiating, we see y' = A y1 '(t) + B y 2 '(t) and y'' = A y1 '' (t) + B y 2''(t). Put these into the left side of the differential equation: a y'' + b y' + c y = a [A y1'' (t) + B y 2''(t)] + b [A y1'(t) + B y 2'(t)] + c [ A y1(t) + B y 2(t)] = A [a y1'' + b y1' + c y1] + B [a y2'' +b y2' + c y2] = A [0] + B [0] = 0. It checks, so it is a solution. QED For second-order linear homogeneous differential equations with constant coefficients, it turns out that the following is true: Theorem. Suppose that y = y1(t) and y = y2(t) are solutions to a y'' + b y' + c y = 0. Suppose that neither of them is a constant multiple of the other. Then every solution of the equation has the form y = A y1(t) + B y 2(t) for some constants A and B. The expression y = A y1(t) + B y 2(t) is hence the general solution to the differential equation since it tells all the solutions.

3

Example. (continued) Note that e-2t is not a constant multiple of et. In fact, if you had to write e-2t as a multiple of et, you would be forced to write e-2t = e-3t et so e-2t is the e-3t multiple of et. But e-3t is not constant since it contains t nontrivially. So e-2t is not a constant multiple of et. Similarly et is not a constant multiple of e-2t. Hence y = A e-2t + B e t is the general solution to y'' + y' - 2y= 0 We now work several examples with less discussion: Example. Find the general solution to y '' - y = 0. Solution. By Step 1, we look for solutions of the form y = ekt for some constant k. Then y' = k ekt and y'' = k2 ekt. Hence k2 ekt - ekt = 0 ekt (k2 -1) = 0 k2 - 1 = 0 (k+1) (k-1) = 0 k+1 = 0 or k-1 = 0 k = -1 or k = 1. One solution is then e-t and another solution is et. Neither solution is a constant multiple of the other. Hence the general solution is y = A e-t + B e t. Example. Find the general solution to 3 y'' - 5 y' - 2 y = 0. Solution. By Step 1, we look for solutions of the form y = ekt for some constant k. Then y' = k ekt and y'' = k2 ekt. Hence 3 k2 ekt - 5 k ekt - 2 ekt = 0 ekt (3k2 - 5 k - 2) = 0 3 k2 - 5 k - 2 = 0 (3k + 1 ) (k - 2 ) = 0 3k+1 = 0 or k - 2 = 0 k = -1/3 or k = 2. One solution is e-(1/3)t while another is e2t. Neither is a constant multiple of the other. The general solution is y = A e-(1/3)t + B e 2t. Example. Find the general solution to y '' - 3 y = 0. Solution. By Step 1, we look for solutions of the form y = ekt for some constant k. Then y' = k ekt and y'' = k2 ekt. Hence

4 k2 ekt - 3 ekt = 0 ekt ( k2 -3) = 0 k2 - 3 = 0 k = √3 or k = -√3. One solution is e(√3)t and another solution is e-(√3)t . The general solution is y = A e(√3)t + B e -(√3)t . Example. Find the general solution to y '' + y ' - 3 y= 0. Solution. By Step 1, we look for solutions of the form y = ekt for some constant k. Then y' = k ekt and y'' = k2 ekt. Hence k2 ekt + k e kt - 3 ekt = 0 ekt (k2 + k - 3) = 0 k2 + k - 3 = 0 We can't factor, so we use the quadratic formula: k = [-1 ±√(1-4(1)(-3))]/2 = (-1 ±√13)/2 One solution is e[(-1 +√13)/2]t Another is e[(-1 -√13)/2]t The general solution is y = A e[(-1 +√13)/2]t + B e [(-1 -√13)/2]t Using decimals to 5 significant figures, this becomes y = A e1.30278t + B e -2.30278t.

17. Second-order differential equations: solutions satisfying initial conditions Typically in the applications, a second-order differential equation needs to be solved with some extra conditions. If the unknown function is y = f(t), then typically the extra conditions are that f(0) takes a particular value, while f '(0) also takes some particular value. Since these conditions concern what is happening initially (when t = 0), these conditions are called initial conditions. The initial conditions are used to find the arbitrary constants in the general solution. Example. Find the solution y(t) to y '' - 3 y' + 2 y = 0 if y(0) = 7 and y '(0) = 10. Solution. We first find the general solution: If y = ekt, then k2 ekt - 3 k ekt + 2 e kt = 0 ekt (k2 - 3 k + 2) = 0 k2 - 3k + 2 = 0 (k-2) (k-1) = 0 k = 2 or k = 1 Then general solution is

5 y = A e2t + B e t Since y(0) = 7 we know, by replacing t by 0, that 7=A+B Now y ' = 2A e2t + B e t. Since y '(0) = 10 we know 10 = 2 A + B We now solve the system of equations: A+B=7 2A + B = 10 For example, if we use substitution, the first equation says B=7-A Hence substituting into the second equation we find 2 A + (7 - A) = 10 A=3 Hence B = 7 - 3 = 4 The answer is y = 3 e2t + 4 e t . Example. Find the solution y(t) to y '' - 4 y = 0 if y(0) = 3 and y '(0) = 6. Solution. We first find the general solution: If y = ekt, then k2 ekt - 4 ekt = 0 ekt (k2 - 4) = 0 k2 - 4 = 0 (k-2) (k+2) = 0 k = 2 or k = -2 Then general solution is y = A e2t + B e -2t Since y(0) = 3 3=A+B Now y ' = 2A e2t - 2 B e-2t. Since y '(0) = 6 6 = 2 A -2 B A=3-B 6 = 2(3 - B) -2B 6=6-4B B=0 A=3-0=3 The solution is y = 3 e2t

6

18. Imaginary exponents Sometimes the procedure for finding the general solution requires the use of imaginary numbers. An imaginary number is a multiple of i = √(-1). Example. Find the general solution y = y(t) to y '' + y = 0. Solution: Step 1. We make a guess that y = ekt. Then y ' = k ekt and y'' = k2 ekt. Hence we obtain k2 ekt + e kt = 0 ekt (k2 + 1) = 0 k2 + 1 = 0 By the Quadratic formula, k = i or k = -i. This is saying that we want to utilize the functions y = A eit + B e -it. At this moment, this appears to be nonsense. Step 2. We use our other knowledge to find a general solution. Note that y = sin(t) satisfies y ' = cos(t) and y '' = - sin(t). Hence y '' + y = - sin(t) + sin(t) = 0, so y = sin(t) solves the equation. Similarly y = cos(t) satisfies y ' = - sin(t) and y '' = - cos(t). Hence y '' + y = - cos(t) + cos(t) = 0 and y = cos(t) solves the equation. We thus have two solutions to the equation--namely sin(t) and cos(t). Neither is a constant multiple of the other. Hence the general solution is y = A sin(t) + B cos(t) More generally, we have the following result: Theorem. If b is positive, then the general solution y = y(t) to y '' + b 2 y = 0 is y = A sin(bt) + B cos(bt). Proof. Note that y1(t) = sin(bt) satisfies the differential equation. Similarly y2(t) = cos(bt) satisfies the differential equation. Since neither is a multiple of the other we have the general solution A sin(bt) + B cos(bt). Example. Find the general solution to y '' + 4 y = 0 Solution. Just observe b2 =4 so b= 2. Hence y = A sin(2t) + B cos(2t).

7 It would be convenient not to have to remember the special form for equations y '' + b 2 y = 0, but instead to use the standard procedure that starts by letting y = ekt. This is made possible by the following amazing result: Theorem (Euler's Formula). eit = cos(t) + i sin(t) Proof. It is not clear at first what to make of the expression eit. But for now we assume that it is a meaningful formula that obeys the usual laws of algebra and calculus. But what is its interpretation? Let y = eit. Then y ' = i eit y '' = ii eit = - eit Hence y '' + y = - eit + e it = 0. Thus y = eit solves the differential equation y '' + y = 0, so there are constants A and B such that eit = A sin(t) + B cos(t) But when t = 0, y = ei0 = e0 = 1, so 1 = A sin(0) + B cos(0) 1 = A (0) + B (1) 1=B Next differentiate each side of eit = A sin(t) + B cos(t) to obtain i eit = A cos(t) - B sin(t). Substitute t = 0 to obtain i ei0 = A cos(0) - B sin(0) i = A(1) - B (0) i=A Since eit = A sin(t) + B cos(t) we have eit = i sin(t) + cos(t) = cos(t) + i sin(t). Example. Find eiπ. Solution. eiπ = cos(π) + i sin(π) = -1 + i (0) = -1. Example. Simplify e2it. Answer. e2it = ei(2t) = cos(2t) + i sin(2t). This gives us another argument for why the theorem is true: Theorem. If b is positive, then the general solution y = y(t) to y '' + b 2 y = 0 is y = A sin(bt) + B cos(bt). Argument 2. We make the guess y = ekt, so y' = k ekt and y '' = k2 ekt. Hence substituting into the differential equation leads to k2 ekt + b2 ekt = 0

8 ekt (k2 + b2) = 0 k2 + b2 = 0 k = ±√(-b2) k=±bi Hence y = C1 ebit + C2 e-bit y = C1 (cos(bt) + i sin(bt)) + C2 (cos(-bt) + i sin(-bt)) But cos(-bt) = cos(bt) and sin(-bt) = - sin(bt). Hence y = C1 (cos(bt) + i sin(bt)) + C2 (cos(bt) - i sin(bt)) y = C1 cos(bt) + C 1 i sin(bt) + C 2 cos(bt) - C2 i sin(bt) y = (C1 i - C2 i) sin(bt) + (C 1+C 2) cos(bt) Since C1 and B are arbitrary constants, then C1+C 2 and C1 i-C2 i are also arbitrary constants. We may then give them new names, such as B and A: y = A sin(bt) + B cos(bt) In summary, when the guess ekt leads to the solutions k = ±bi, then the general solution is written y = A sin(bt) + B cos(bt). Example. Find the general solution to y '' + 4 y = 0 Solution 1. Just observe b2 =4 so b= 2. Hence y = A sin(2t) + B cos(2t). Solution 2. Let y = ekt. Then the equation becomes k2 ekt + 4 e kt = 0 k2 + 4 = 0 k2 = -4 k = ±2i We thus expect e2it and e-2it as solutions. This leads us to y = A sin(2t) + B cos(2t). Initial conditions are handled in the usual manner: Example. Find the solution y = y(t) to y '' + 9 y = 0 such that y(0) = 5, y'(0) = 6. Solution. The general solution is y = A sin(3t) + B cos(3t) But y = 5 when t = 0, so 5 = A sin(3(0)) + B cos(3(0)) 5 = A (0) + B (1) 5 = B. Moreover, y' = 3A cos(3t) - 3B sin(3t) When t = 0, y' = 6, so 6 = 3A cos(3(0)) - 3B sin(3(0)) 6 = 3A (1) - 3 B(0) 6 = 3A A=2 The answer is y = 2 sin(3t) + 5 cos(3t).

9

Example. Find the solution y = y(t) to y '' + 12 y = 0 such that y(0) = 4, y '(0) = √12. Solution. The general solution is y = A sin(t√12) + B cos(t√12) But y = 4 when t = 0, so 4 = A sin(0) + B cos(0) 4 = A (0) + B (1) 4 = B. Moreover, y ' = √12A cos(t√12) - √12 B sin(t√12) When t = 0, y ' = √12, so √12 = √12A cos(0) - √12 B sin(0) √12 = √12 A (1) - √12 B(0) √12 = √12 A A=1 The answer is y = sin(t√12) + 4 cos(t√12). To 5 decimal places the answer is y = sin(3.46410 t) + 4 cos(3.46410 t). Similar considerations apply more generally. Suppose that we make a guess that y = ekt solves the differential equation. Here are all the possible cases: Case 1. The solutions are k = a and k = b with a and b real and distinct. Then the general solution is y = A eat + B e bt Case 2. The solutions are k = ±bi. Then y = A sin(bt) + B cos(bt). Case 3. The solutions are k = a±bi with b nonzero. Then the general solution is y = A eat sin(bt) + B eat cos(bt) Case 4. The solution is k = a where a is a double root. Then the general solution is y = A eat + B t e at.

Example. Find the general solution y = y(t) to y '' - 2 y' + 10 y = 0. Solution. Guess y = ekt Then k2 ekt - 2 k ekt + 10 e kt = 0. ekt (k2 - 2k + 10) = 0 k2 - 2k + 10 = 0 k = [2 ±√(4 - 4(1)(10)]/2 = [2 ±√(-36)]/2 = [2 ± 6i]/2 = 1 ± 3i. The general solution by Case 3 is y = A et sin(3t) + b e t cos(3t).

10 Example. Find the solution to y '' + 2 y ' + 2 y = 0 if y(0) = 5 and y '(0) = 3. Solution. Guess y = ekt Then k2 ekt + 2 k e kt + 2 e kt = 0 k2 + 2 k + 2 = 0 By the quadratic formula, k= -2 ±√(4 - 4(1)2)) -------------------2 k = -1 ± i By Case 3, the general solution is y = A e-t sin(t) + B e -t cos(t) Since y(0) = 5, we have A (1) (0) + B (1) (1) = 5 so B = 5. We need y ' now. By the Product Rule y ' = A e-t cos(t) + sin(t) A e-t (-1) + B e -t (-sin(t)) + cos(t) B e-t (-1) Since y '(0) = 3, it follows A+0+0-B=3 A - 5 = 3 since B = 5 A=8 The solution is y = 8 e-t sin(t) + 5 e -t cos(t) Example. Find the general solution y = y(t) to y ''+ 16 y = 0. Solution. Guess y = ekt Then k2 ekt + 16 e kt = 0. ekt (k2 + 16) = 0 k2 + 16 = 0 k = ±4i We can treat this as Case 2 with b = 4. The general solution is y = A sin(4t) + B cos(4t) Example. Find the general solution y = y(t) to y '' - 2 y' + y = 0. Solution. Guess y = ekt Then k2 ekt - 2 k ekt + e kt = 0. ekt (k2 - 2k + 1) = 0 k2 - 2k + 1 = 0 (k-1)2 = 0 There is a double root at 1. The general solution by Case 4 is y = A et +B t e t We check this solution:

11 y ' = A et + B t e t + B e t by the product rule y '' = A et + B t e t + B e t + B e t Hence y '' - 2 y ' + y =( A et + B t e t + B e t + B e t ) - 2(A et + B t e t + B e t ) + (A et +B t e t ) = A et + B t e t + B e t + B e t - 2A et - 2 B t et - 2 B et + A et +B t e t = 0 To justify Case 3, suppose that when we substitute y = ekt, we find that k = a±bi. Then the general solution is y = C1 e(a+bi)t + C2 e(a-bi)t = C1 eat+bit + C2 eat-bit = C1 eat ebit + C2 eat e-bit = C1 eat (cos(bt) + i sin(bt))+ C2 eat (cos(-bt) + i sin(-bt)) = C1 eat (cos(bt) + i sin(bt))+ C2 eat (cos(bt) - i sin(bt)) [since cos(-bt) = cos(bt) and sin(-bt) = - sin(bt)] at = C1 e cos(bt) + i C 1 eat sin(bt)+ C 2 eat cos(bt) - i C2 eat sin(bt) = i C1 eat sin(bt) - i C2 eat sin(bt)+ C 1 eat cos(bt) + C 2 eat cos(bt) = (i C1 - i C2 ) eat sin(bt) + (C 1 + C2 ) eat cos(bt) = A eat sin(bt) + B e at cos(bt) where A = (i C1 - i C2 ) and B = (C1 + C2 ) are arbitrary constants.

Example. In the Zhabotinsky chemical reaction, the amount of a chemical oscillates with time. Suppose that the amount of the chemical X at time t satisfies x ''(t) + x(t) = 0. When t = 0, x = 4 grams and x ' = -1 gram/sec. Find x(t). Solution. The general solution is x(t) = A sin(t) + B cos(t). When t = 0 we obtain A sin(0) + B cos(0) = 4 A (0) + B (1) = 4 B=4 But x '(t) = A cos(t) - B sin(t). When t = 0 we obtain A cos(0) - B sin(0) = -1 A (1) - B (0) = -1 A = -1 Hence x(t) = - sin(t) + 4 cos(t). Example. A population of rabbits is oscillating under predation by coyotes. If R(t) is the average number of rabbits at time t (in years) then R(t) = 50000 + r(t) where r ''(t) + 0.64 r(t) = 0. When t = 0, R = 49000 and R ' = 600.

12 (a) Find r(t). (b) Find R(t). (c) Predict R when t = 7 years. (d) Find R '(t). (e) Predict R ' when t = 9 years. (f) Is the rabbit population increasing or decreasing when t = 9? Remark. This is typical of oscillating populations: they oscillate around an average value. Here the average value is 50,000 rabbits, and we will determine the oscillation in the problem. Solution. The general solution for r(t) is r(t) = A sin(0.8 t) + B cos (0.8 t) When t = 0 we obtain A (0) + B (1) = r(0) = R(0) - 50000 = 49000-50000 = - 1000 so B = -1000 Moreover, R '(t) = r'(t) = 0.8 A cos(0.8 t) - 0.8 B sin(0.8 t) so R '(0) = 0.8 A = 600 A = 600/0.8 = 750 Hence r(t) = 750 sin(0.8t) - 1000 cos(0.8 t) (b) R(t) = 50,000 + r(t) = 50,000 + 750 sin(0.8t) - 1000 cos(0.8 t) (c) R(7) = 50,000 + 750 sin(0.8(7)) - 1000 cos(0.8 (7)) = 48751 rabbits We will see many other applications later.