LECTURE 3: SLOPE FIELDS MINGFENG ZHAO September 08, 2014 Recall that in the last lecture, we know Z I. y 0 = f (x) =⇒ y = II. Z x dy = f (x, y) dx =⇒ y = f (t) dt + y0 . x0 y(x0 ) = y0 . III. 1) y(x) ≡ a for some constant a such that f (a) = 0 0 Z y = f (y) =⇒ 1 dy. 2) x = f (y) f (x) dx Example 1. Find the general solution of y 0 = y 2 + 4. Z x = = = = = 1 dy +4 Z 1 · 2 dt Let y = 2t 2 4t + 4 Z 1 1 dt 2 2 t +1 1 arctan(t) + C 2 y 1 arctan + C, Since y = 2t. 2 2 y2 Then arctan So the general solution of y 0 = y2 y 2 = 2(x − C). 1 is +4 y = 2 tan(2x − C) . 1 2 MINGFENG ZHAO DIRECTION/SLOPE FIELDS Definition 1. The direction/slope field of y 0 = f (x, y) is a picture on the plane such that for each point (x, y) on the plane, one draws a short line segment with slope f (x, y) at the point (x, y). To draw the slope field of y 0 = f (x, y): 1) select points in the xy-plane, 2) compute the numbers f (x, y) at the selected points (x, y), 3) at each selected point (x, y), draw a short tangent line whose slope is f (x, y). Example 2. y 0 = 3x2 . (Recall that the general solution is: y = x3 + C.) Figure 1. Slope field of y 0 = 3x2 with graphs of solutions satisfying y(0) = 0, and y(0) = ±1 LECTURE 3: SLOPE FIELDS 3 Remark 1. The slope field of y 0 = f (x) have the same direction/shape vertically. Example 3. y 0 = −y. (Recall that the general solution is: y = Ce−x .) Figure 2. Slope field of y 0 = −y with graphs of solutions satisfying y(0) = ±2, and y(0) = ±3 Remark 2. The slope field of y 0 = f (y) have the same direction/shape horizontally. Example 4. y 0 = xy. (In Lecture 4, we’ll see that the general solution is: y = Ce x2 2 .) Figure 3. Slope field of y 0 = xy with graphs of solutions satisfying y(0) = ±0.2, and y(0) = ±1 4 MINGFENG ZHAO Remark 3. For the directions of the short tangent line segment: • “/” means positive slope • “\” means negative slope • “−” means zero slope • “|” means infinity slope. EXISTENCE & UNIQUENESS Question 1. For the initial value problem: y 0 = f (x, y) f (x ) = y . 0 0 1) Does a solution exist? 2) Is the solution unique if it exists? The answer to Question 1 really depends on the smoothness of f with respect to x and y. 1 Example 5 (Non-existence). Can you find a solution to y 0 = for y(0) = 0? x 1 The general solution to y 0 = is: x y = ln |x| + C. 1 for y(0) = 0 exists, say g(x) is a solution. Then g(x) = ln |x| + C for some constant C, but x which is not defined at x = 0. Hence If the solution to y 0 = The solution to y 0 = 1 for y(0) = 0 does NOT exist. x 2 Example 6 (Non-uniqueness). y 0 = 3y 3 , y(0) = 0. 1) y1 (x) ≡ 0 is a solution. 2) Let y2 (x) = x3 , then y2 (0) = 0, and y20 (x) = 3x2 , 2 2 3y 3 = 3(x3 ) 3 = 3x2 = y20 (x). In summary, p Both y1 and y2 are solutions to y 0 = 2 |y|, y(0) = 0 . LECTURE 3: SLOPE FIELDS 5 p Example 7 (Non-uniqueness). y 0 = 2 |y|, y(0) = 0. 1) y1 (x) ≡ 0 is a solution. x2 , if x ≥ 0 2) Let y2 (x) = , then y2 (0) = 0 and −x2 , if x < 0. 2x, y20 = −2x, if x > 0 . if x < 0. So p y20 = 2 |y2 |, for all x 6= 0. On the other hand, lim h&0 h2 y2 (h) − y2 (0) = lim = lim h = 0 h&0 h h&0 h y2 (h) − y2 (0) −h2 = lim = lim −h = 0. h%0 h%0 h%0 h h p p So y20 (0) exists and y20 (0) = 0 = 2 |y2 (0)|. Hence, y2 is also a solution to y 0 = 2 |y|, y(0) = 0. lim In summary, p Both y1 and y2 are solutions to y 0 = 2 |y|, y(0) = 0 . Theorem 1 (Picard’s Theorem on Existence and Uniqueness). If f (x, y) is continuous with respect to x and y, and ∂f (x, y) exists and is continuous near some (x0 , y0 ), then a solution to ∂y y 0 = f (x, y), y(x0 ) = y0 , exists for some small interval containing x0 , and is unique. In Theorem 1, that solution is called a local solution on that small interval containing x0 . In this course, we always say that the domain of a function should be an interval. Remark 4. Mathematically, the proof of Theorem 1 is to find the fixed point of the following integral equation: Z x y(x) = y0 + f (t, y(t)) dt, x0 which is done by Picard’s iteration method: 0) y0 (x) ≡ y0 Z x 1) y1 (x) = y0 + f (t, y0 (t)) dt x0 6 MINGFENG ZHAO x Z 2) y2 (x) = y0 + f (t, y1 (t)) dt x0 .. . Z x n) yn (x) = y0 + f (t, yn−1 (t)) dt x0 Finally, we need to prove {yn (x)} will uniformly converge to some continuous function y(x) on a small interval containing x0 , then this function y(x) is just the solution. Example 8. Let f be continuous, the solution to y 0 = f (x), y(x0 ) = y0 is given by: Z x f (t) dt + y0 . y= x0 Example 9. Let f be differentiable and f 0 be continuous. Assume f (a) = 0 and y(x) satisfies y 0 = f (y) and y(x0 ) = a. Then y(x) ≡ a . Example 10. Is it possible to solve the equation y 0 = y p |x| for y(0) = 0? Is the solution unique? p In Lecture 4, we will see that the general solution to y 0 = y |x| is: 2 3 y = Ce 3 |x| 2 . It’s easy to see that y(x) ≡ 0 is a solution to y 0 = y Let f (x, y) = y p p |x| for y(0) = 0 . |x|, then f (x, y) is continuous with respect to x and y, and p ∂f (x, y) = |x|is continuous at (0, 0). ∂y So y(x) ≡ 0 is the only solution to y 0 = y p |x| for y(0) = 0 . Example 11. Let A be a constant, solve y 0 = y 2 , y(0) = A. Since the general solution to y 0 = y 2 is: Either y(x) ≡ 0, or y = 1) If A = 0, then y(x) ≡ 0. 1 . C −x LECTURE 3: SLOPE FIELDS 2) If A 6= 0, then A = y(0) = 7 1 1 , that is, C = . Hence C A 1 . y= 1 − x A For the domain of the solution: 1 – If A > 0, then x < . A 1 – If A < 0, then x > . A In summary, y(x) ≡ 0, if A = 0 1 1 , for all x < , if A > 0 y(x) = 1 A A −x 1 1 , for all x > , if A < 0. y(x) = 1 A − x A Department of Mathematics, The University of British Columbia, Room 121, 1984 Mathematics Road, Vancouver, B.C. Canada V6T 1Z2 E-mail address: mingfeng@math.ubc.ca