MAT244 - Ordinary Di erential Equations - Summer 206 Assignment 2 Due: July 20, 206 Full Name: Student #: Last First Indicate wic Tutorial Section you attend by filling in te appropriate circle: Tut 0 M 2-3 pm BA240 Cristoper Adkins Tut 02 M 3-4 pm BA240 Fang Salev Housfater Tut 05 W 5-6 pm BA265 Krisan Rajaratnam Print out tis page, fill it out and attac it to te front of your assignment. Instructions: Due July 20, 206 at te start of te lecture 3:0pm in BA70. You may collaborate wit your classmates but you MUST write up your solutions independently. Write your solutions clearly, sowing all steps. Do not submit just your roug work. Grading is based on bot te correctness and tee presentation of your answer. Late assignments will not be accepted witout appropriate documentation to explain te lateness (eg. a UofT medical note) Assignments may be submitted to te course instructor for remarking up to one week after tey are returned. If you request a regrade, please attac a note explaining clearly wic part and wy you believe it was graded incorrectly. For grader use: Q Q2 Q3 Q4 Q5 Total
eac problem is wort 20 points for a total of 00. ) Find te general solution to y 00 4y 0 +4y = e 2x arctan (2x) Solution: Since te nonomogeneity is not of te form of a quasipolynomial, we must use te metod of variation of parameters (tat works for any nonomogeneity). To do tis, we first compute te solution of te omogeneous equation Plugging in y = e x gives an equation for : y 00 4y 0 +4y =0 2 4 +4=0 or by factoring, ( 2) 2 =0. Tus = 2 is te only eigenvalue and we ave by te usual trick te general solution to te omogenous problem: y = c e 2x + c 2 xe 2x wit c, c 2 given by initial conditions. omogeneous problem as From ere, we denote te independent solutions to te y () y (2) = e 2x = xe 2x Computing te Wronskian of tese solutions, we get W =det =det y () y (2) y () 0 y (2) 0 e 2x 2e 2x = e 4x ( + 2x 2x) = e 4x xe 2x ( + 2x) e 2x By variation of parameters, te particular solution is given by y (p) = y () Z (2) y g W + y(2) Z () y g W = e 2x Z xe 2x e 2x arctan (2x) e 4x + xe 2x Z e 2x e 2x arctan (2x) e 4x ()
Te second integral seems easier so let s start wit tat one and integrate by parts: Z e 2x e 2x Z arctan (2x) = e 4x arctan (2x) = x arctan (2x) = x arctan (2x) = x arctan (2x) We use tis result in te first integral in () to get again by intee Z 2 x +(2x) 2 Z 8x 4 +4x 2 ln +4x2 4 Z xe 2x e 2x Z arctan (2x) = e 4x = x2 2 Combining tese two integrations, we ave x arctan (2x) arctan (2x) Z = x2 2 arctan (2x) 4 x 2 +4x Z 2 4x 2 + +4x + 2 4 = x2 2 arctan (2x) x 4 + arctan (2x) 8 Z +4x 2 y (p) = e 2x x 4 + 8 arctan (2x)+x2 2 arctan (2x) + xe 2x x arctan (2x) ln +4x2 4 Te general solution is composed by adding a omogeneous part wit constants depending on te initial conditions: y(x) =c e 2x + c 2 xe 2x x e 2x 4 + arctan (2x)+x2 arctan (2x) + xe 2x x arctan (2x) 8 2 ln +4x2 4 2) Consider te equation a) Sow tat for x<, (2) tis is equivalent to 4(x +) 2 d 2 y +0(x +)dy dx2 dx + 27 6 y =(x +)3 (2)
were t =ln x + 4 d2 y dt 2 +6dy dt + 27 6 y = e3t (3) Solution: Using t =ln x + as suggested, we note tat for x<, t =ln( x ). We now carefully cange variables in equation (2) (using te cain rule): dy dx = dy dt dt dx = dy dt x + To compute te second derivative involves applying te product rule so let s be extra careful: d 2 y dx = d dy 2 dx dx = d dy dx x +dt dy = (x +) 2 dt + x + = d dx dy dt dy (x +) 2 dt + d 2 y x +dt 2 x + te last line follows again from te cain rule. Putting all tis information togeter, we obtain te result as predicted (note te negative on te dy dt term): 4 d2 y dt +6dy 2 dt + 27 y =(x +)3 6 te only ting left to do is to cange te nonomegeneity to a function of t to be consistent trougout. Since (x +)= ( x ) we ave tat (x +) 3 = e 3t (just following te rules of exponents.) Finally we get te equation of constant coe cents tat we are asked for: 4 d2 y dt 2 +6dy dt + 27 6 y = e3t b) Find te general solution y(t) of (3) (Wic metod is easier? you decide) To solve te constant coe cient equation (3), we look for a solution of te form y(t) =e t
and get te caracteristic equation: 4 2 +6 + 27 6 =0 Using te quadratic formula to solve for gives = 8 = 8 6 ± r 6 2 4 4 27 6 6 ± p 36 37 = 8 ( 6 ± 3) So tat independent solutions y(t) toteomogeneousproblemare y = c e 3 8 t + c 2 e 9 8 t Now te nonomogeneous part e 3t does not appear in te omogeneous solution, so we look for a particular solution of(3) in te form y (p) = Ae 3t.Pluggingtisinto(3)gives 4 3 2 A +6 3A + 27 6 A e 3t = e 3t So wat if te coe cient on te left and side is not nice, we call 36 + 8 + 27 6 = k (4) and te particular solution solves Terefore te general solution to (3) is A = k ka = y = c e 3 8 t + c 2 e 9 8 t k e3t c) Find te solution y(x) of(2)correspondingtoy(x = 2) = y 0 (x = 2) = 0 (Hint: Tis is muc simpler if you use part b) rater tan variation of parameters directly on (2). But you can convince yourself tat bot give te same answer)
Solution: As per te int, we translate te general solution y(t) totesolutionofteoriginalequation (2) using te cange of variables t =ln( x ). Note tat wen x = 2, t =ln( x ) = ln (2 ) = ln = 0. Terefore te solution in terms of t becomes 8 < y(t =0) =c + c 2 =0 k : y 0 (t =0) = 3c 8 We can solve tis system to obtain c and c 2 to get 9 8 c 2 3 =0 k c = k c 2 c 2 = 27 6 k c = 33 6 k (Note if you ave a complicated constant like k =36+8+ 27 6 avoid ideous calculations ) Te solution to y(t) tusbecomes tere is no same in iding it to y(t) = 33 6 ke 3 8 t 27 6 ke 9 8 t k e3t Recalling te definition t = ln( x ), we ave te solution of te nonomogeneous euler equation as y(x) = 33k x + 3/8 27 k x + 9/8 + (x +)3 6 6 k (I do not do te variation of parameters directly on euler s equation because it is too muc work. Exercise: ceck tat it is te same solution) 3) Draw an accurate pase portrait for te following systems of equations. Justify your portrait (by computing eigenvalues and vectors If it is a spiral, wic direction will it spin?) a) y 0 = Ay were A = 0 3 3 0 Solution: We find te eigenvalues of A by solving te caracteristic equation
0=det(A I) 3 =det 3 = 2 +3 Tus 2 = 9andteeigenvaluesarepurelyimaginary: = ±i3. To solve for te eigenvector, we set 0 3 3 0 2 =3i 2 In oter words, we ave 8 < 3 2 =3i : 3 =3i 2 Bot of tese equations are te same and reduce to = i 2 So if we coose 2 =,ten = i and one of our solutions reads () e 3it = i e 3it and te oter independent solution is te complex conjugate: (2) e 3it = i e 3it (5) By Problem 5 of te midterm we can add and subtract independent solutions to get anoter pair of indy solutions. For example, we write
() e 3it = i e 3it = i (cos (3t)+isin (3t)) sin (3t) cos (3t) = + i cos (3t) sin (3t) and te oter independent solution is te complex conjugate. We can tus add and subtract to obtain independent solutions in terms of only sin and cos (functions I understand unlike ie 3it and suc). Tus te general solution can be written as y = c sin (3t) cos (3t) cos (3t) + c 2 sin (3t) (6) Te pase portrait is a center tat spins counter clockwise (since a 2 =3> 0) See Figure for an approximate pase portrait Figure : An approximate pase portrait for te system in 3)a) b) y 0 = Ay were A = 2 2 Solution: We find te eigenvalues of A, solving
det (A I) = det 2 2 =( ) 2 +4 = 2 2 +5=0 Using te quadratic formula, = 2 2 ± p 4 20 =± 2p 6 =± 2i Finding te eigenvector () for =+2i, we find: 2 =(+2i) 2 2 2 8 < +2 2 =(+2i) (7) : 2 + 2 =(+2i) 2 Te first equation in (7) simplifies to 2 = i and te second to = i 2 Tese equations being a multiple of eac oter. We can terefore coose () = complex conjugate. One independent solution to tis equation is tus y = i e (+2i)t Separate y into its real and imaginary components to get: i wit (2) te
y = e t e 2it i = e t (cos (2t)+isin (2t)) i " # = e t cos (2t) sin (2t) + i sin (2t) cos (2t) Terefore te general solution can be written only in terms of exponentials and trigonometric functions: y = e t " c cos (2t) sin (2t) # sin (2t) + c 2 cos (2t) wit c, c 2 determined by initial conditions. You can recognize tis solution as an unstable spiral spinning away from zero. Since te o -diagonal element of A is a 2 = 2, te spiral spins clockwise. See figure 2 for a typical trajectory Figure 2: An approximate pase portrait for te system in 3)b) 6 5 c) y 0 = Ay were A = 5 4 Solution: Finding te eigenvalues of A as usual, we get
det (A I) = det 6 5 5 4 =( 6 )(4 )+25 = 2 +2 + =( +) 2 =0 Tus = is te only eigenvalue. We find te corresponding eigenvector : Bot equations in (8) reduce to 6 5 = 5 4 2 2 8 < 6 5 2 = (8) : 5 +4 2 = 2 + 2 =0 and we can coose te eigenvector to be =. Tus one solution to tis equation is just y = To find anoter independent solution, we write e t Were = our case tis is: y 2 = te t + e t is our eigenvector and is a generalized eigenvector solving (A I) = In 5 5 = 5 5 Tus we ave 5 ( + 2 )=. We ave te freedom to set 2 = 0 and write = general solution is terefore /5. Te 0
y = c e t + c 2 te t + /5 e t 0 See 3 for an approximate pase portrait Figure 3: An approximate pase portrait for te system in 3)c) 4) a) Find te eigenvalues and eigenvectors of te matrix A = 4 2 We solve for te eigenvalues: det (A I) = det 4 2 =( )( 2 ) 4 = 2 + 6 =( +3)( 2) Tus te eigenvalues are = 3, and 2 =2. Wefindfirst () corresponding to te eigenvalue : = 3 4 2 2 2 8 < + 2 = 3 (9) : 4 2 2 = 3 2
Bot of te equations in (9) reduce to 4 + 2 =0. Coosing =,wemayset () = 4 Similarly, we find te eigenvector (2) corresponding to 2 : =2 4 2 2 2 8 < + 2 =2 (0) : 4 2 2 =2 2 Bot of te equations in (0) reduce to 2 =0sowecancoose: (2) = b) Use tese to compute te special fundamental matrix e At. (note tis matrix is sometimes denoted (t) insection7.7.seeourderivationintenotes). Solution: We learned 3 ways to find te special fundamental matrix e At. I will take te second approac but all of tem ave lead to te same result. By part a), te general solution to y 0 = Ay can be written as y = c e 3t + c 2 4 for some c, c 2 determined by initial conditions. equation: wit te initial condition e At t=0 finding two solutions corresponding to y 0 = 0 e 2t Similarly, te matrix e At also solves te same d dt eat = Ae At = I were I is te identity matrix. Our problem ten reduces to = c 0 4 and y 0 = 0 + c 2.Weavefortefirstcoice:
Solving for c, c 2 gives Similarly, we solve for te constants suc tat Solving for c, c 2 in tis case gives c =/5, c 2 =4/5 0 = c 4 + c 2 Tus te special fundamental matrix is c = /5, c 2 =/5 e At = /5 e 3t +4/5 e 2t, /5 4 = /5(e 3t +4e 2t ) /5( e 3t + e 2t ) 4/5( e 3t + e 2t ) /5(4e 3t + e 2t ) 4 e 2t e 3t +/5 c) Find te solution to te system y 0 = Ay corresponding to te initial conditions y(t =0)=y 0 : i) y 0 =,ii)y 0 = 2 iii) y 0 = 2 5 iv) y 0 = 0 Once we find e At,teproblemofsolvingtesystemy 0 = Ay wit a given initial condition reduces to matrix multiplication as te solution is just y = e At y 0. For example, if y 0 =,weget If y 0 = ten 2 If y 0 = 2,ten 5 e 3t +4e 2t e 3t + e 2t /5 /5 4( e 3t + e 2t ) 4e 3t + e 2t e 3t +4e 2t e 3t + e 2t y =/5 +2/5 4( e 3t + e 2t ) 4e 3t + e 2t
e 3t +4e 2t e 3t + e 2t y =2/5 + 4( e 3t + e 2t ) 4e 3t + e 2t Finally if y 0 = 0 ten we just take te second column of e At : y =/5 e 3t + e 2t 4e 3t + e 2t At tis point, you may see te advantage of computing te special fundamental matrix - if you need to solve te same problem for many initial conditions 5) a) Given a matrix A, sowtattecaracteristicequationdeterminingitseigenvaluesmaybe written as 2 tr (A) +deta =0 (were tr (A) istetraceanddeta te determinant of A) If A = a b ten te eigenvalues are found by solving c d det (A I) =det a c d b = 2 (a + b) + ab cd Now we recognize tat tr(a) =a + b is te sum of diagonal elements of A wile det (A) =ab b) Suppose tat te trace and determinant of A are bot positive. Sow tat te pase portrait of te system y 0 = Ay is eiter an unstable node or an unstable spiral. (and no oter case is possible) (int: use part a) of course) Solution: Using part a), we ave tat = 2 q tr (A) ± (tr (A)) 2 4detA If tr(a) > 0anddet(A) > 0, te result follows immediately: eiter we ave an unstable spiral (wen te argument of te square root is negative) and te real part of in te worst case, = 2 tr(a) q (tr (A)) 2 4detA > 0 cd is larger tan zero. Else,
since tr(a) > p tr(a) 2 4detA wenever det(a) > 0. c) Let A be given by 2 3 were and are positive. Find a condition on, tat result in an unstable node or unstable spiral. Draw an example pase portrait in eac case. Wat appens wen = ( 8 3)2? (Hint: Use part b)) Here tr(a) = +3 and det(a) =3 +2.Tecaseseparatingtespiralfromtenodeistesign of te expression under te square root. Tat is we ave a node if (tr(a)) 2 > 4det(A) ( +3) 2 > 4(3 +2 ) 2 +6 +9> 2 +8 2 6 +9> 8 ( 3) 2 > 8 And we ave te spiral if ( 3) 2 < 8 In te borderline case = 8 ( 3)2, tere is only eigenvalue and we typically see an improper node.