M343 Homework 3 Enrique Areyan May 17, 013 Section.6 3. Consider the equation: (3x xy + )dx + (6y x + 3)dy = 0. Let M(x, y) = 3x xy + and N(x, y) = 6y x + 3. Since: y = x = N We can conclude that this is an exact equation. The solution is given by: C, where C is a constant and = (3x xy + ) = x 3 x y + x + h(y) y = x + h (y) = 6y x + 3 = h (y) = 6y + 3 = (integrating both sides) h(y) = y 3 + 3y 6. Consider the equation: dy by = ax dx bx cy C = x 3 x y + x + y 3 + 3y dy by ax = dx bx cy Let M(x, y) = by ax and N(x, y) = bx + cy. Then, y = b b = N x (by ax)dx + ( bx + cy)dy = 0.. Not exact equation. 13. Consider the equation: (x y)dx + (y x)dy = 0. Let M(x, y) = x y and N(x, y) = y x. Since: y = 1 = N We can conclude that this is an exact equation. The solution is given by: C, where C is a constant and = (x y) = x xy + h(y) y = x + h (y) = y x = h (y) = y = (integrating both sides) h(y) = y C = x xy + +y Solving for the initial condition y(x = 1) = 3, we get that C = 1 3 + 9 = 7. So, the particular solution is: x xy + y = 7 D(x xy + y ) = D(7) = x y + xy + yy = 0 = y = y x y x 1
(x y) + (y x)y = (x y) + (y x) y x = x y + y x = 0 y x, so this is the solution Finally, we can write the solution explicitly as a function y(x) by solving for the quadratic equation: (1)y (x)y + (x 7) = 0 y(x) = x ± x 4(1)(x 7) 1 y(x) = x ± 8 3x However, our final equation is that which contains the initial condition (x 0, y 0 ) = (1, 3), i.e.: y(x) = x + 8 3x This solution is valid only if 8 3x > 0 x < 8 3 x < 8 3 14. Consider the equation: (9x + y 1)dx (4y x)dy = 0 (9x + y 1)dx + (x 4y)dy = 0. Let M(x, y) = (9x + y 1) and N(x, y) = (x 4y). Since: y = 1 = N We can conclude that this is an exact equation. The solution is given by: C, where C is a constant and = (9x + y 1) = 3x 3 + xy x + h(y) y = x + h (y) = x 4y = h (y) = 4y = (integrating both sides) h(y) = y C = 3x 3 + xy x y Solving for the initial condition y(x = 1) = 0, we get that C = 3 + 0 1 0 =. So, the particular solution is: 3x 3 + xy x y = D(3x 3 + xy x y ) = D() = 9x + y + xy 1 4yy = 0 = y = 1 y 9x x 4y (9x +y 1)+(x 4y)y = (9x +y 1)+(x 4y) 1 y 9x x 4y = 9x +y 1+1 y 9x = 0, so this is the solution Finally, we can write the solution explicitly as a function y(x) by solving for the quadratic equation: ( )y +(x)y+(3x 3 x ) = 0 y(x) = x ± x 4( )(3x 3 x ) ( ) y(x) = x ± 4x 3 + x 8x 16 4 However, our final equation is that which contains the initial condition (x 0, y 0 ) = (1, 0), i.e.: This solution is valid only if 4x 3 + x 8x 16 > 0. y(x) = x 4x 3 + x 8x 16 4
16. Consider the equation: (ye xy + x)dx + (bxe xy )dy = 0. Let M(x, y) = ye xy + x and N(x, y) = bxe xy. This equation is exact only if: y = exy + xye xy = N = bexy + bxye xy We can conclude that this is an exact equation when b = 1. So, let us solve the exact equation: (ye xy + x)dx + (xe xy )dy = 0. Let M(x, y) = ye xy + x and N(x, y) = xe xy. The solution is given by: C, where C is a constant and y y = (xe xy ) y = exy + h(x) Where h(x) is a pure function of x. To find h we differentiate ψ(x, y) w.r.t. x = yexy + x = ye xy + h (x) = h (x) = x = (integrating both sides) h(x) = x C = exy + x = exy + x = C D(e xy + x ) = D(C) = e xy (y + xy ) + x = 0 = y = x yexy xe xy (ye xy +x)+(xe xy )y = (ye xy +x)+(xe xy x yexy ) xe xy = ye xy +x x ye xy = 0, so this is the solution 19. The equation x y 3 + x(1 + y )y = 0 is not exact since, letting M 1 = x y 3 and N 1 = x(1 + y ), it follows: But, the following equivalent equation is exact: letting M(x, y) = x and N(x, y) = 1 + y y 3 : The solution is given by: 1 y 3x y N 1 = 1 + y 1 xy 3 [x y 3 + x(1 + y )y = 0] x + y = 0 = N C, where C is a constant and = x = x + h(y) ( 1 + y y 3 ) y = 0 Since, ( ) ( ) 1 + y 1 + y y = y 3 = h (y) = h (y) = y 3 = (integrating both sides) h(y) = ln( y ) 1 y 3
C = x + ln( y ) 1 y multiplying by both sides... C 1 = x + ln( y ) y D(x + ln( y ) y ) = D(C 1 ) = x + y y 3 + y y = 0 = y = xy3 1 + y ( ) ( ) 1 + y 1 + y x + y 3 y xy 3 = x + y 3 = x x = 0, so this is the solution 1 + y 1. The equation ydx + (x ye y )dy = 0 is not exact since, letting M 1 = y and N 1 = (x ye y ), it follows: 1 y = 1 N 1 = But, the following equivalent equation is exact: y[y + (x ye y )y = 0] y + (xy y e y )y = 0 Since, letting M(x, y) = y and N(x, y) = (xy y e y ): y = y = N The solution is given by: C, where C is a constant and = y = xy + h(y) y = xy y e y = xy + h (y) = h (y) = y e y To obtain h(y) we integrate by parts setting u = y = du = ydy; v = e y = dv = e y dy y e y dy = y e y ye y = y e y (e y (y 1)) = y e y ye y + e y = e y (y(y ) + ) = h(y) Hence, h(y) = e y (y(y ) + ). C = xy e y (y(y ) + ) D(xy e y (y(y )+)) = D(C) = y +xyy yy e y y e y y +y e y +ye y y e y y = 0 = y = y xy y e y y + (xy y e y )y = y + (xy y e y y ) xy y e y = y y = 0, so this is the solution 4
7. The equation dx + ( x y sin(y))dy = 0 is not exact since, letting M 1(x, y) = 1 and N 1 (x, y) = x y sin(y): 1 y = 0 N 1 = 1 y We need to find the integrating factor. Assumer that µ = µ(y), a pure function of y. Then, µ is given by: u u = N N y M = 1 y 0 1 = 1 y = u 1 y u = 0 This is a linear, 1st O.D.E. Solve by separating: u = y (check: since u = 1 and u = y and hence, u /u = 1/y). Now, the equation: y + (x ysin(y))y = 0 is exact since, letting M = y and N = x ysin(y), follows: The solution is given by: y = 1 = N C, where C is a constant and = y = xy + h(y) y = x ysin(y) = x + h (y) = h (y) = ysin(y) = (integrating both sides) h(y) = ycos(y) sin(y) C = xy + ycos(y) sin(y) D(xy + ycos(y) sin(y)) = D(C) = y + xy cos(y)y + cos(y)y ysin(y)y = y = y x ysin(y) y + (x ysin(y))y y = y + (x ysin(y)) x ysin(y) = y y = 0, so this is the solution Section.7 1. The equation y = 3 + t y with y(0) = 1 is a first order, linear equation. We solve this by integrating factor: (i) Rewrite the equation in the standard form y + y = 3 + t (ii) Integrating factor: since p(t) = 1 we get µ(t) = e p(t)dt = e 1dt = e t (iii) Multiply both sides of the equation by the integrating factor: e t [y + y] = e t [3 + t] d (vi) Using product rule and implicit differentiation: dt [et y] = e t [3 + t] (v) Integrate both sides: d dt [et y] = e t [3 + t]dt = e t y = e t (t + ) + C 5
The general solution is y(t) = (t + ) + Ce t. Solving for the initial conditions: y(0) = 1 = + C C = 1. The particular solution is: y(t) = (t + ) e t The following table is a comparison of Euler s method for different values of h and the exact solution. t Exact h = 0.1 h = 0.05 h = 0.05 0.0 1.00000 1.00000 1.00000 1.00000 0.1 1.19516 1.0000 1.19750 1.19631 0. 1.3817 1.39000 1.38549 1.38335 0.3 1.55918 1.57100 1.56491 1.5600 0.4 1.7968 1.74390 1.73658 1.73308 The best approximate solution from Euler s method is when h = 0.05. 4. The equation y = 3cos(t) y with y(0) = 0 is a first order, linear equation. We solve this by integrating factor: (i) Rewrite the equation in the standard form y + y = 3cos(t) (ii) Integrating factor: since p(t) = we get µ(t) = e p(t)dt = e dt = e t (iii) Multiply both sides of the equation by the integrating factor: e t [y + y] = 3e t cos(t) d (vi) Using product rule and implicit differentiation: dt [et y] = 3e t cos(t) (v) Integrate both sides: d dt [et y] = 3e t cos(t)dt = e t y = 3 5 et (sin(t) + cos(t)) + C The general solution is y(t) = 3 5 (sin(t) + cos(t)) + Ce t. Solving for the initial conditions: y(0) = 6 5 + C C = 6. The particular solution is: 5 y(t) = 3 5 (sin(t) + cos(t)) 6 5 e t The following table is a comparison of Euler s method for different values of h and the exact solution. t Exact h = 0.1 h = 0.05 h = 0.05 0.0 0.00000 0.00000 0.00000 0.00000 0.1 0.7143 0.30000 0.8481 0.779 0. 0.49090 0.53850 0.51334 0.50181 0.3 0.66514 0.748 0.69345 0.67895 0.4 0.79973 0.86646 0.83157 0.81530 The best approximate solution from Euler s method is when h = 0.05. Section 3.1 9. Consider the equation y + y y = 0 with initial conditions: y(0) = 1 and y (0) = 1. This is a linear, homogeneous, nd O.D.E. The solution is given by y(t) = e rt. Then y = re r, y = r e rt. So, 0 = r e rt + re rt e rt Sub. for the solution = e rt (r + r ) Common factor e rt r + r = 0 Since e rt is never zero (r + )(r 1) = 0 Factoring r Hence, the general solution is: y(t) = C 1 e t + C e t Solving for the initial conditions: y(0) = 1 = C 1 e 0 + C e 0 = C 1 + C = C 1 = 1 C = C 1 = 1 1 = 0 y (0) = 1 = C 1 e 0 + C e 0 = C 1 + C = 1 = + 3C = C = 1 6
The particular solution is: y(t) = e t We can check that this is the solution: y(t) = y (t) = y (t) = e t, and hence y + y y = e t + e t e t = 0. Graph of the solution: Finally, lim t y(t) =, the solution goes to infinity very quick!. 10. Consider the equation y + 4y + 3y = 0 with initial conditions: y(0) = and y (0) = 1. This is a linear, homogeneous, nd O.D.E. The solution is given by y(t) = e rt. Then y = re r, y = r e rt. So, 0 = r e rt + 4re rt + 3e rt Sub. for the solution = e rt (r + 4r + 3) Common factor e rt r + 4r + 3 = 0 Since e rt is never zero (r + 1)(r + 3) = 0 Factoring r Hence, the general solution is: y(t) = C 1 e t + C e 3t Solving for the initial conditions: y(0) = = C 1 e 0 + C e 0 = C 1 + C = C 1 = 1 C = C 1 = + 1 = 5 y (0) = 1 = C 1 e t 3C e 3t = C 1 3C = 1 = C 1 + 3C = 1 = C + 3C = C = 1 The particular solution is: y(t) = 5 e t 1 e 3t We can check that this is the solution: y = 5 e t + 3 e 3t and y = 5 e t 9 e 3t. Hence, y +4y +3y = 5 e t 9 e 3t 0 e t + 1 e 3t + 15 e t 3 ( 5 e 3t = e t 0 + 15 ) ( 1 +e 3t 9 3 ) = 0 Graph of the solution: 7
Finally, lim t y(t) = 0 0 = 0, the solution converges to zero. 0. Consider the equation y 3y + y = 0 with initial conditions: y(0) = and y (0) = 1. This is a linear, homogeneous, nd O.D.E. The solution is given by y(t) = e rt. Then y = re r, y = r e rt. So, 0 = r e rt 3re rt + e rt Sub. for the solution = e rt (r 3r + 1) Common factor e rt r 3r + 1 = 0 Since e rt is never zero (r 1)(r 1 ) = 0 Factoring r Hence, the general solution is: y(t) = C 1 e t + C e t/ Solving for the initial conditions: y(0) = = C 1 + C = C 1 = C The particular solution is: = C 1 = 1 y (0) = 1 = C 1 + 1 C 1 = C 1 + C = C = 3 y(t) = 3e t/ e t We can check that this is the solution: y = 3 et/ e t and y = 3 4 et/ e t. Hence, y 3y + y = 6 4 et/ e t 9 et/ + 3e t + 3e t/ e t = e t/ ( 6 4 9 + 3 ) + e t (3 1) = 0 The solution is zero at t 0 if: y(t 0 ) = 0 = 3e t0/ e t0 = e t0 = 3e t0/ = t 0 = ln(3) + t 0 = t 0 = ln(3) = t 0 = ln(9) The solution is maximum at: y (t 0 ) = 0 = 3 et0/ e t0 = e t0 = 3 et0/ = t 0 = ln( 3 ) + t 0 = t 0 = ln( 3 ) = t 0 = ln( 9 4 ) Since, y (ln( 9 4 )) = 3 4 eln( 9 4 )/ e ln( 9 4 ) = 3 4 16 81 9 4 < 0, the point t 0 = ln( 9 ) is a local maximum. 4 The value of the maximum is y(ln( 9 4 )) = 3eln( 9 4 )/ e ln( 9 4 ) = 9 4 8