Math 201 Lecture 08 Undetermined Coefficients Jan. 25, 2012 Many examples here are taken from the textbook. The first number in () refers to the problem number in the UA Custom edition, the second number in () refers to the problem number in the 8th edition. 0. Review How to solve homogeneous linear equations with constant coefficients: Quiz: a n y (n) + 1. Solve the characteristic/auxiliary equation a n r n + 2. Construct a set of solutions y 1,,y n based on r 1,,r n. 3. The general solution is 1 y 0 y=0. (1) 1 r 0 =0. (2) C 1 y 1 (t)+c 2 y 2 (t)+ +C n y n (t). (3) 4. If initial conditions are given (the number of initial conditions is necessarily n, same as the order of the equation), use them to get n equations for C 1,,C n. Solve this system to get C 1,,C n. Solution. Characteristic equation is y +y +y +y=0, y(0)=2,y (0)=0,y (0)=0. (4) We observe that r 1 = 1 is a solution and factorize r 3 +r 2 +r+1=0. (5) r 3 +r 2 +r+1=(r ( 1))(r 2 +1) r 2,3 =±i. (6) Now arrange a list of roots with repeated roots grouped together and complex conjugates in pairs: 1,0±i. Thus The general solution is To apply initial conditions, we prepare: y 1 =e t,y 2,3 = cost, sint. (7) y=c 1 e t +C 2 cost+c 3 sint. (8) y = C 1 e t C 2 sint+c 3 cost. (9) Now we have y =C 1 e t C 2 cost C 3 sint. (10) y(0)=1 C 1 +C 2 =2; (11) y (0)=0 C 1 +C 3 =0; (12) y (0)=0 C 1 C 2 =0. (13) Solving this system, we havec 1 =C 2 =C 3 =1. The solution to the initial value problem is then given by y=e t + cost+sint. (14) General theory of 2nd order linear equations. a(t)y +b(t)y +c(t)y=f(t). (15) 1
+A +A +B 2 Math 201 Lecture 08 Undetermined Coefficients Then the general solution can be written as y=c 1 y 1 +C 2 y 2 +y p. (16) with y 1,y 2 linearly independent solutions to the homogeneous problem and y p one solution to the original non-homogeneous problem The Equation. How to get general solution The general solution can be written as a(t)y +b(t)y +c(t)y=0. (17) a(t)y +b(t)y +c(t)y=f(t). (18) 1. Basic Information ay +by +cy=f(t). (19) y=c 1 y 1 +C 2 y 2 +y p. (20) By now we have no problem getting y 1,y 2, which are linearly independent solutions to ay +by +cy=0. (21) When f(t) belongs to a special class of functions, it is possible to make an educated guess of what y p looks like. Such guesses involve a certain number of constants (the undetermined coefficients ) that can be fixed by substituting the ansatz into the equation. This is the method of undetermined coefficients. Solution procedure: To solve 1. Solve the homogeneous problem ay +by +cy=f(t), (22) ay +by +cy=0 (23) to get y 1,y 2. Keep record of the roots r 1,2 of the characteristic equation. 2. Guess what y p should look like according to the following rules: If f(t)=ct m e rt, then 1 t+a 0 )e rt (24) with s=the number of times r appears in the list of roots r 1,r 2. If f(t)=ct m e αt cosβt or Ct m e αt sinβt, then 1 t+a 0 )e αt cosβt+t s (B m t m + 0 )e αt sinβt. (25) with s=the number of times the pair (α±βi) appears in the list of roots r 1,r 2. Remark 1. When f(t) is a linear combination of such terms, we will see in the next lecture that the method still works. Example: (4.4 24; 4.4 24) Find a particular solution to y (x)+y(x)=4xcosx. (26) Solution. First we need to figure out the correct form of the solution. Comparing with the general procedure above, we write the right hand side as 4xe 0x cosx. (27)
Jan. 25, 2012 3 It is of the form Ct m e αt cosβt with m=1,α=0,β=1. Thus the solution is of the form x s (A 1 x+a 0 ) cosx+x s (B 1 x+b 0 ) sinx. (28) To fix the power s, we need to check how many times the pair 0±i appears in the root list of We see that s=1. Substituting r 2 +1=0 r 1,2 =±i. (29) y p =x[(a 1 x+a 0 ) cosx+(b 1 x+b 0 ) sinx] (30) into the equation, we have 4xcosx = y p +y p = [(A 1 x 2 +A 0 x) cosx+(b 1 x 2 +B 0 x) sinx] Thus +(A 1 x 2 +A 0 x) cosx+(b 1 x 2 +B 0 x) sinx = [2A 1 cosx 2(2A 1 x+a 0 ) sinx (A 1 x 2 +A 0 x) cosx] +[2B 1 sinx+2(2b 1 x+b 0 ) cosx (B 1 x 2 +B 0 x) sinx] +(A 1 x 2 +A 0 x) cosx+(b 1 x 2 +B 0 x) sinx = 4B 1 x cosx+( 4A 1 )xsinx+(2a 1 +2B 0 ) cosx+(2b 1 2A 0 ) sinx. (31) 4B 1 = 4 (32) 4A 1 = 0 (33) 2A 1 +2B 0 = 0 (34) 2B 1 2A 0 = 0. (35) Solving this gives B 1 =1, A 1 =0, B 0 =0, A 0 =1. (36) So the particular solution is given by How to solve initial value problem (IVP) Nothing new here. y p =x[cosx+xsinx]. (37) Example: y (x)+y(x)=4xcosx, y(0)=0,y (0)=1. (38) Solution. As usual we first obtain the general solution. Recall that the general solution looks like C 1 y 1 +C 2 y 2 +y p (39) where y 1,y 2 are linearly independent solutions to y +y=0 (or equivalently, C 1 y 1 +C 2 y 2 is the general solution for y +y=0 and y p is one particular solution. Using the result from the above example we see that the general solution reads To use the initial condition, we prepare: Now apply the initial conditions: y=c 1 cosx+c 2 sinx+x[cosx+xsinx]. (40) y = C 1 sinx+c 2 cosx+cosx+xsinx+x 2 cosx. (41) y(0)=0 C 1 =0; (42) y (0)=1 C 2 +1=1. (43)
+A +A +B 4 Math 201 Lecture 08 Undetermined Coefficients So we have C 1 =C 2 =0. The solution to the initial value problem is then How to check solutions Check whether y 1.y 2 solves the homogeneous problem, then check whether y p solves the nonhomogeneous problem. See Common Mistakes for examples. The method only works for f listed. y=x[cosx+xsinx]. (44) 2. Things to be Careful/Tricky Issues The method only works for equation with constant coefficients. When solving initial value problems, apply initial conditions only after the general solution to the original equation has been obtained. 3. More Examples Sometimes equation needs to be pre-processed: Example 2. (4.4 14; 4.4 11) Find a particular solution for y (x)+y(x)=2 x. (45) Solution. Writing 2 x =e (ln2)x, it is of the form Ct m e rt with m=0,r=ln2. So Substituting into the equation, we reach y p (x)=ae (ln2)x. (46) y p +y p =A(ln2) 2 e (ln2)x +Ae (ln2)x =A [ (ln2) 2 +1 ] 2 x. (47) Equating with the right hand side, we have which leads to A= [ (ln2) 2 +1 ] 1 (48) y p (x)= [ (ln2) 2 +1 ] 1 e (ln2)x = [ (ln2) 2 +1 ] 1 2 x. (49) The method applies to higher order equations too. In that case s may take other values than 0,1,2. The rules are exactly the same: If our equation is Let r 1, a n y (n) +,r n be the list of roots to the characteristic equation If f(t)=ct m e rt, then a n r n + 1 y 0 y=f(t). (50) 1 r 0 =0. (51) 1 t+a 0 )e rt (52) with s=the number of times r appears in the list of roots r 1,r 2,,r n. If f(t)=ct m e αt cosβt or Ct m e αt sinβt, then 1 t+a 0 )e αt cosβt+t s (B m t m + 0 )e αt sinβt. (53) with s=the number of times the pair (α±βi) appears in the list of roots r 1,r 2,,r n. Example 3. (4.4 35; 4.4 35) Find a particular solution to y +y 2y=te t. (54)
Jan. 25, 2012 5 Solution. We look for solutions of the form y=t s [A 1 t+a 0 ]e t. (55) To determine s we need to check the relation between r=1 and the auxiliary equation r 3 +r 2 2=0 (r 1)(r 2 +2r+2)=0. (56) The list of roots are (complex roots written in pairs) 1, 1±i. (57) We see that our right hand side is of the form te rt with r=1. As 1 appears once in the above list of roots, s=1. Substituting y=t(a 1 t+a 0 )e t into the equation we have Thus te t = y +y 2y = [(A 1 t 2 +A 0 t)e t ] +[(A 1 t 2 +A 0 t)e t ] 2(A 1 t 2 +A 0 t)e t = [A 1 t 2 +(6A 1 +A 0 )t+6a 1 +3A 0 ]e t +[A 1 t 2 +(4A 1 +A 0 )t+2a 1 +2A 0 ]e t 2(A 1 t 2 +A 0 t)e t = 10A 1 te t +(8A 1 +5A 0 )e t. (58) The special solution is then given by [ t y p (t)=t A 1 = 1 10, A 0= 4 25. (59) 10 4 25 ] ( t e t 2 = 10 4t ) e t. (60) 25 It s important to be able to decide whether the method of undetermined coefficient applies or not. Recall that there are two requirements: 1. The equation is constant-coefficients, that is the coefficients on the left hand side (terms involving y) are all constants; 2. The right hand side is of the form f(t)=ct m e rt or f(t)=ct m e αt cosβt orct m e αt sinβt or sum of such terms (We will discuss this last case in the next lecture). Example 4. (4.4 1 8; 4.4 1 8) Decide whether or not the method of undetermined coefficients can be applied: y +2y y=t 1 e t (61) 5y 3y +2y=t 3 cos4t (62) 2y 6y +y= sinx/e 4x (63) x +5x 3x=3 t (64) 2w 3w=4xsin 2 x+4xcos 2 x (65) y +3y y= secθ (66) ty y +2y= sin3t (67) Ans. N, Y, Y, Y, Y, N, N, Y. 8z 2z=3x 100 e 4x cos 25x. (68) 4. Notes and Comments It is easy to see that if we allow β = 0 in the case f(t) = Ct m e αt cosβ t or C t m e αt sinβ t, then it includes the first case f =Ct m e rt.