Mah 246 - Final Exam Soluions Friday, July h, 204 () Find explici soluions and give he inerval of definiion o he following iniial value problems (a) ( + 2 )y + 2y = e, y(0) = 0 Soluion: In normal form, his equaion is y + 2 + 2 y = e + 2 This equaion is linear and can be solved by an inegraing facor The primiive of a() = 2 is + 2 2 A() = + d = log ( + 2 2 ) and so he inegraing facor is e A() = + 2 Therefore in inegraing facor form, he equaion is ( ( + 2 )y ) = e Inegraing boh sides from 0 o and using he iniial condiiions ( + 2 )y = e +, Therefore he soluion is y = e + 2 The inerval of definiion is (, ) (b) v = e +v, v(0) = 0 Soluion: This equaion is separable, and herefore wriing in facored differenial form, and inegraing e v dv = e d gives e v = e + c The iniial condiion implies ha c = 2 Therefore he soluion is given by v = log (2 e ) Since he log is only defined for posiive arguemens, he inerval of definiion is whenever e < 2, or < log (2)
(2) Consider he following MATLAB code yi = ; I = ; F =2; n=0; h = (F - I)/n; y = zeros(n+,); = I:h:F; y() =yi; for i=:n y(i+) = y(i) + h*(y(i)/(i) + log((i))); end (a) Wha is he iniial value problem ha is being solved numerically? Soluion: The iniial value problem is dy d = y + log (), y() = (b) Wha mehod is being used o solve he problem? Wha is is order of accuracy? Soluion: The mehod being used is forward Euler Is order of accuracy is (c) [More Poins] Solve he iniial value problem and sae is inerval of definiion Soluion: The problem we are rying o solve is linear The primiive of he coefficien a() = is A() = d = log () Therefore he inegraing facor e A() = In inegraing facor form, his gives d ( y ) = d log () Inegraing boh sides and aking ino accoun he iniial condiions, y = log () The inegral can be done wih a subsiuion u = log (), d Therefore he soluion is log () d = log () 0 y = 2 (log ())2 + u du = 2 (log ())2 2
(3) A 500 lier ank iniially has 00 liers of fresh waer Sal waer wih a concenraion of 30 g/l is added a a rae of 5 L/min while he well mixed soluion is allowed o leave a a rae of L/min This process will coninue unil he ank is filled (a) A wha ime T will he ank overflow? Soluion: The ank will overflow a a ime T when 00 + 4T = 500, T = 00 (b) Wrie down he iniial value problem ha describes he amoun of sal S() a ime Do no solve he equaion Soluion: We see ha he volume V () is increasing wih a rae 5 = 4 L/min Therefore V () = 4 + 00 The concenraion of he sal in he ank a ime is C() = S()/(4 + 00) The rae equaion for he amoun of sal in he ank is herefore ds d = 30(5) S() 4 + 00 wih iniial condiion S(0) = 0 (4) Consider he differenial equaion dy d = (y )(y + 2)2 (y 3) 3 y (a) Idenify all saionary poins Soluion: The saionary poins are y =, 2, 3, 0 (b) Skech he phase line porrai and classify he poins as sable unsable or semisable Soluion: The phase line porrai is 2 0 3 We see hen ha 2 is semi-sable, 0 is unsable is sable and 3 is unsable (c) Suppose ha y(0) = 2 Wha is he behavior of y() as Soluion: If we sar from y(0) = 2 he soluion will approach y = (5) Give general real soluions o he following differenial equaions (a) u 4u + 8u = 2e 2 Soluion: The characerisic polynomial is p(z) = z 2 4z + 8 = (z 2) 2 + 4 Therefore he general homogeneous soluion is Y H = c e 2 cos (2) + c 2 e 2 sin (2) The forcing is characerisic wih µ + iν = 2, d = 0, m = 0 We will use he Key ideniy L(e 2 ) = p(2)e 2 = 4e 2 Therefore a paricular soluion is Y p = 2 e2 The general soluion is Y () = c e 2 cos (2) + c 2 e 2 sin (2) + 2 e2 3
e3 (b) w 6w + 9w = + 2 Soluion: The characerisic polynomial is p(z) = z 2 6z + 9 = (z 3) 2 The general homogeneous soluions is Y H () = c e 3 + c 2 e 3 Theforcing is no characerisic, so we will use Green funcions The Green funcion here mus saisfy he homogeneous problem and saisfy g(0) = 0 g (0) = Since g mus ake he form, g() = c e 3 + c 2 e 3 we see c = 0 and c 2 = saisfy he iniial condiions Therefore g() = e 3 A paricular soluion is hen given by Therefore a general soluions is Y P () = ( s)e 3( s) e 3s 0 + s ds 2 = e 3 ds e3 + s2 0 0 s + s 2 ds = e 3 arcan () 2 e3 log ( + 2 ) y() = c e 3 + c 2 e 3 + e 3 arcan () 2 e3 log ( + 2 ) (6) Given ha and 2 are soluions o he associaed homogeneous equaion for > 0, solve he iniial value problem 2 y + 2y = 3 2, y() = 3, y () = 0 Soluion: We will solve by Green funcions, ( ) s de 2 s 2 G(, s) = ( ) = ( 2 s de 2 3 s 2s In normal form he equaion becomes s 2 y + 2 2 y = 3 s s2 ) 4
Therefore a paricular soluion is given by Y p() = The general soluion is herefore The iniial condiions imply = 2 G(, s)3 ds s ds = 2 log () 3 2 + 3 s 2 ds Y () = c + c 2 2 + 2 log () 3 2 + 3 c + c 2 = 3 c + 2c 2 = 0 So c = 2, c 2 =, and he soluion o he iniial value problem is (7) Consider he iniial value problem Y () = 2 + 2 + 2 log () 3 2 + 3 = 7 3 + 2 3 2 + 2 log () d 2 y d 2 + 5dy d + 7y = f(), y(0) =, y (0) =, where he forcing f() is given piecewise by { 2 for 0 3 f() = e 3 for 3 (a) Wha is he Laplace ransform F (s) of he forcing f() Soluion: To find he Laplace ransform of he forcing, we wrie he forcing as f() = 2 + u( 3)(e 3 2 ) The second erm is of he form u( 3)j( 3), where and is Laplace ransform is j() = e ( + 3) 2 = e 2 6 9 J(s) = s 2 s 3 6 s 2 9 s 5
The Laplace ranform of f() is hen F () = 2 ( s + 3 e 3s s 2 s 6 3 s 9 ) 2 s (b) Find he Laplace ransform Y (s) of he soluion y() You do no need o ake he inverse Laplace ransform o find y() You may leave your answer in erms of F (s) Soluion: Taking he Laplace ransform of boh sides of he IVP, Solving for Y (s) gives (8) Consider he iniial value problem s 2 Y (s) s + + 5(sY (s) ) + 7Y (s) = F (s) x = x y y = 4x 3y Y (s) = s + 4 + F (s) s 2 + 5s + 7 x(0) =, y(0) = 2 (a) This sysem is linear Wha is he coefficien marix A Soluion: The coefficien marix is (b) Compue e A A = ( ) 5 3 Soluion: The find e A we look a he characerisic polynomial of A, which is p(z) = z 2 + 2z + 2 = (z + ) 2 + Since δ = < 0 we will have conjugae pair eigenvalues µ ± iν = ± i We may use he general formula for he marix exponenial, ha is e A = e (cos () + sin ()(A + I)) ( ) ( ) 0 2 = e cos () + e sin () 0 5 2 ) (c) Solve he iniial value problem above = e ( cos () + 2 sin () sin () 5 sin () cos () 2 sin () Soluion: The soluion o he iniial value problem is given by x() = e A x I ( ) ( ) cos () + 2 sin () sin () = e 5 sin () cos () 2 sin () 2 ( ) cos () = 2 cos () + sin () 6
(9) Consider he nonlinear planar sysem x = x 2 + y y = 2xy (a) Find he semisaionary soluions (if any) o his sysem Soluion: We see ha when y = 0, y = 0 and herefore he x equaions reduces o x = x 2 This equaion has a soluion given by = = x x 2 dx x I x 2 Exponeniaing boh sides we find and upon solving for x x I (x ) 2 (x + ) dx ) = 2 log ( (x )(xi + ) (x + )(x I ) (x )(x I + ) (x + )(x I ) = e2 x() = ( + e2 )x I + ( e 2 ) ( e 2 )x I + ( + e 2 ) = cosh ()x I sinh () cosh () sinh ()x I Therefore he semi-saionary soluion is ( ) cosh ()xi sinh () (x(), y()) =, 0 cosh () sinh ()x I (b) Find a nonconsan funcion H(x, y) so ha every orbi of he sysem lies on a level se of H(x, y) Soluion: The sysem is Hamilonian since x (x 2 + y ) + y ( 2xy) = 2x 2x = 0 Therefore here exiss an H(x, y) such ha y H(x, y) = x 2 + y, x H(x, y) = 2xy 7
We inegrae he second equaion o obain H(x, y) = x 2 y + h(y) and upon subsiuion ino he firs equaion we find x 2 + y = y H(x, y) = x 2 + h (y) Therefore h (y) = y and so h(y) = y2 y The Hamilonian H(x, y) is hen given by H(x, y) = x 2 y + 2 y2 y (c) Find all he saionary poins of he sysem and deermine he ype and sabiliy of each poin Soluion: The saionary poins are given when x 2 + y = 0 and 2xy = 0 We see ha when x = 0, we mus have y =, and when y = 0 we mus have x = ± Therefore he saionary poins are The Hessian of he Hamilonian is (0, ), (, 0), (, 0) 2 H(x, y) = ( 2y ) 2x 2x Evaluaing his a he saionary poins we find ( ) 2 0 2 H(0, ) =, 2 H(±, 0) = 0 ( 0 ) ±2 ±2 Noe ha he eigenvalues of 2 H(0, ) are boh posiive, herefore (0, ) is a local min of H(x, y) and we expec clockwise ceners, which are sable For (±, 0), we see ha de 2 H(±, 0) = 2 < 0, herefore he poins (±, 0) are saddles and nearby we expec orbis which are saddles, and herefore unsable (d) Skech he phase porrai near each saionary poin direcion of moion Soluion: The phase plane porrai is shown below: Be sure o indicae he 8
2 5 y 05 0 05 2 5 05 0 05 5 2 x (0) Consider he nonlinear planar sysem x = y y = x 2 y 2 (a) Find all saionary soluions of his sysem Soluion: The saionary poins are when y = 0 and x 2 y 2 = 0 Therefore he saionary poins are (±, ) (b) Find any semisaionary soluions (if any) o his sysem Soluion: There are no semisaionary soluions (c) Find he jacobian marix a each saionary poin Soluion: The Jacobian marix for his sysem is ( ) 0 f(x, y) = 2x 2y A each saionary poin, his becomes ( ) ( ) 0 0 f(, ) =, f(, ) = 2 2 2 2 (d) Deermine he ype and sabiliy of each saionary poin Soluions: For he poin (, ) he Jacobian has characerisic polynomial p(z) = z 2 + 2z + 2 and herefore has roos ± i Since a 2 = 2 > 0, i follows ha he orbis near (, ) will be counerclockwise spiral sinks and herefore sable 9
For he poin (, ) he characerisic polynomial of he Jacobian is p(z) = z 2 + 2z 2, and herefore has roos ± 3 Since he eigenvalues have opposie sign, he orbis near (, ) will be saddles, and herefore unsable (e) Skech he phase porrai of he sysem near each saionary poin Be sure o indicae he direcion of moion Soluion: The phase plane porrai for his sysem is shown below: 2 5 y 05 0 2 5 05 0 05 5 2 x 0