slope fields and euler s method
play

Slope Fields and Eulers Method 10/31/2011 Warm up Suppose dy dx = y - PowerPoint PPT Presentation

Slope Fields and Eulers Method 10/31/2011 Warm up Suppose dy dx = y x 1. Sketch part of the slope field for the following points: dy x y dx -2 0 -2 1 -2 -1 -1 1 -1 -1 0 2 0 0 0 -2 1 -1 Warm up Suppose dy dx = y


  1. Slope Fields and Euler’s Method 10/31/2011

  2. Warm up Suppose dy dx = y − x − 1. Sketch part of the slope field for the following points: dy x y dx -2 0 -2 1 -2 -1 -1 1 -1 -1 0 2 0 0 0 -2 1 -1

  3. Warm up Suppose dy dx = y − x − 1. Sketch part of the slope field for the following points: dy x y dx -2 0 1 -2 1 2 -2 -1 0 -1 1 1 -1 -1 -1 0 2 1 0 0 -1 0 -2 -3 1 -1 -3

  4. Warm up Suppose dy dx = y − x − 1. Sketch part of the slope field for the following points: dy x y dx -2 0 1 -2 1 2 -2 -1 0 -1 1 1 -1 -1 -1 0 2 1 0 0 -1 0 -2 -3 1 -1 -3

  5. Warm up Suppose dy dx = y − x − 1. Sketch part of the slope field for the following points: dy x y dx -2 0 1 -2 1 2 -2 -1 0 -1 1 1 -1 -1 -1 0 2 1 0 0 -1 0 -2 -3 1 -1 -3

  6. Warm up Suppose dy dx = y − x − 1. Sketch part of the slope field for the following points: dy x y dx -2 0 1 -2 1 2 -2 -1 0 -1 1 1 -1 -1 -1 0 2 1 0 0 -1 0 -2 -3 1 -1 -3

  7. Warm up Suppose dy dx = y − x − 1. Sketch part of the slope field for the following points: dy x y dx -2 0 1 -2 1 2 -2 -1 0 -1 1 1 -1 -1 -1 0 2 1 0 0 -1 0 -2 -3 1 -1 -3

  8. Warm up Suppose dy dx = y − x − 1. Sketch part of the slope field for the following points: dy x y dx -2 0 1 -2 1 2 -2 -1 0 -1 1 1 -1 -1 -1 0 2 1 0 0 -1 0 -2 -3 1 -1 -3

  9. Warm up Suppose dy dx = y − x − 1. Sketch part of the slope field for the following points: dy x y dx -2 0 1 -2 1 2 -2 -1 0 -1 1 1 -1 -1 -1 0 2 1 0 0 -1 0 -2 -3 1 -1 -3

  10. Warm up Suppose dy dx = y − x − 1. Sketch part of the slope field for the following points: dy x y dx -2 0 1 -2 1 2 -2 -1 0 -1 1 1 -1 -1 -1 0 2 1 0 0 -1 0 -2 -3 1 -1 -3

  11. Euler’s Method Assume that you have an IVP that looks like dy dx = F ( x , y ) , y ( x 0 ) = y 0 Pick an increment of x -steps, called ∆ x .

  12. Euler’s Method Assume that you have an IVP that looks like dy dx = F ( x , y ) , y ( x 0 ) = y 0 Pick an increment of x -steps, called ∆ x . Start at ( x 0 , y 0 ), and plot a segment with run ∆ x and slope F ( x 0 , y 0 ). The end is ( x 1 , y 1 ). From each ( x i , y i ), generate ( x i +1 , y i +1 ) by plotting a segment with run ∆ x and slope F ( x i , y i ).

  13. Euler’s Method Assume that you have an IVP that looks like dy dx = F ( x , y ) , y ( x 0 ) = y 0 Pick an increment of x -steps, called ∆ x . Start at ( x 0 , y 0 ), and plot a segment with run ∆ x and slope F ( x 0 , y 0 ). The end is ( x 1 , y 1 ). From each ( x i , y i ), generate ( x i +1 , y i +1 ) by plotting a segment with run ∆ x and slope F ( x i , y i ). m=F(x 0 ,y 0 ) x i +1 = x i + ∆ x m* Δ x = y i + ∆ x ∗ F ( x i , y i ) y i +1 Δ x

  14. Back to dy dx = y − x − 1 = F ( x , y ) , P 0 = ( − 2 , − 1). x i +1 = x i + ∆ x y i +1 = y i + ∆ x ∗ ( y i − x i − 1) Example: ∆ x = 1 i x i y i F ( x i , y i ) y i +1 0 -2 -1 1 2 3

  15. Back to dy dx = y − x − 1 = F ( x , y ) , P 0 = ( − 2 , − 1). x i +1 = x i + ∆ x y i +1 = y i + ∆ x ∗ ( y i − x i − 1) Example: ∆ x = 1 i x i y i F ( x i , y i ) y i +1 0 -2 -1 0 -1+1*0 1 2 3

  16. Back to dy dx = y − x − 1 = F ( x , y ) , P 0 = ( − 2 , − 1). x i +1 = x i + ∆ x y i +1 = y i + ∆ x ∗ ( y i − x i − 1) Example: ∆ x = 1 i x i y i F ( x i , y i ) y i +1 0 -2 -1 0 -1+1*0 1 -1 -1 2 3

  17. Back to dy dx = y − x − 1 = F ( x , y ) , P 0 = ( − 2 , − 1). x i +1 = x i + ∆ x y i +1 = y i + ∆ x ∗ ( y i − x i − 1) Example: ∆ x = 1 i x i y i F ( x i , y i ) y i +1 0 -2 -1 0 -1+1*0 1 -1 -1 -1 -1+1*(-1) 2 3

  18. Back to dy dx = y − x − 1 = F ( x , y ) , P 0 = ( − 2 , − 1). x i +1 = x i + ∆ x y i +1 = y i + ∆ x ∗ ( y i − x i − 1) Example: ∆ x = 1 i x i y i F ( x i , y i ) y i +1 0 -2 -1 0 -1+1*0 1 -1 -1 -1 -1+1*(-1) 2 0 -2 3

  19. Back to dy dx = y − x − 1 = F ( x , y ) , P 0 = ( − 2 , − 1). x i +1 = x i + ∆ x y i +1 = y i + ∆ x ∗ ( y i − x i − 1) Example: ∆ x = 1 i x i y i F ( x i , y i ) y i +1 0 -2 -1 0 -1+1*0 1 -1 -1 -1 -1+1*(-1) 2 0 -2 -3 -2+1*(-3) 3

  20. Back to dy dx = y − x − 1 = F ( x , y ) , P 0 = ( − 2 , − 1). x i +1 = x i + ∆ x y i +1 = y i + ∆ x ∗ ( y i − x i − 1) Example: ∆ x = 1 i x i y i F ( x i , y i ) y i +1 0 -2 -1 0 -1+1*0 1 -1 -1 -1 -1+1*(-1) 2 0 -2 -3 -2+1*(-3) 3 1 -5 ∆ x = 1 , y 3 = − 5

  21. Back to dy dx = y − x − 1 = F ( x , y ) , P 0 = ( − 2 , − 1). x i +1 = x i + ∆ x y i +1 = y i + ∆ x ∗ ( y i − x i − 1) Example: ∆ x = 1 / 2 F ( x i , y i ) i x i y i y i +1 0 -2 -1 1 2 3 ∆ x = 1 , y 3 = − 5

  22. Back to dy dx = y − x − 1 = F ( x , y ) , P 0 = ( − 2 , − 1). x i +1 = x i + ∆ x y i +1 = y i + ∆ x ∗ ( y i − x i − 1) Example: ∆ x = 1 / 2 F ( x i , y i ) i x i y i y i +1 -1+ 1 0 -2 -1 0 2 *0 1 2 3 ∆ x = 1 , y 3 = − 5

  23. Back to dy dx = y − x − 1 = F ( x , y ) , P 0 = ( − 2 , − 1). x i +1 = x i + ∆ x y i +1 = y i + ∆ x ∗ ( y i − x i − 1) Example: ∆ x = 1 / 2 F ( x i , y i ) i x i y i y i +1 -1+ 1 0 -2 -1 0 2 *0 - 3 1 -1 2 2 3 ∆ x = 1 , y 3 = − 5

  24. Back to dy dx = y − x − 1 = F ( x , y ) , P 0 = ( − 2 , − 1). x i +1 = x i + ∆ x y i +1 = y i + ∆ x ∗ ( y i − x i − 1) Example: ∆ x = 1 / 2 F ( x i , y i ) i x i y i y i +1 -1+ 1 0 -2 -1 0 2 *0 - 3 - 1 -1+ 1 2 *(- 1 1 -1 2 ) 2 2 2 3 ∆ x = 1 , y 3 = − 5

  25. Back to dy dx = y − x − 1 = F ( x , y ) , P 0 = ( − 2 , − 1). x i +1 = x i + ∆ x y i +1 = y i + ∆ x ∗ ( y i − x i − 1) Example: ∆ x = 1 / 2 F ( x i , y i ) i x i y i y i +1 -1+ 1 0 -2 -1 0 2 *0 - 3 - 1 -1+ 1 2 *(- 1 1 -1 2 ) 2 2 - 5 2 -1 4 3 ∆ x = 1 , y 3 = − 5

  26. Back to dy dx = y − x − 1 = F ( x , y ) , P 0 = ( − 2 , − 1). x i +1 = x i + ∆ x y i +1 = y i + ∆ x ∗ ( y i − x i − 1) Example: ∆ x = 1 / 2 F ( x i , y i ) i x i y i y i +1 -1+ 1 0 -2 -1 0 2 *0 - 3 - 1 -1+ 1 2 *(- 1 1 -1 2 ) 2 2 - 5 - 5 - 5 4 + 1 2 *(- 5 2 -1 4 ) 4 4 3 ∆ x = 1 , y 3 = − 5

  27. Back to dy dx = y − x − 1 = F ( x , y ) , P 0 = ( − 2 , − 1). x i +1 = x i + ∆ x y i +1 = y i + ∆ x ∗ ( y i − x i − 1) Example: ∆ x = 1 / 2 F ( x i , y i ) i x i y i y i +1 -1+ 1 0 -2 -1 0 2 *0 - 3 - 1 -1+ 1 2 *(- 1 1 -1 2 ) 2 2 - 5 - 5 - 5 4 + 1 2 *(- 5 2 -1 4 ) 4 4 - 1 - 15 3 2 8 ∆ x = 1 , y 3 = − 5

  28. Back to dy dx = y − x − 1 = F ( x , y ) , P 0 = ( − 2 , − 1). x i +1 = x i + ∆ x y i +1 = y i + ∆ x ∗ ( y i − x i − 1) Example: ∆ x = 1 / 2 F ( x i , y i ) i x i y i y i +1 -1+ 1 0 -2 -1 0 2 *0 - 3 - 1 -1+ 1 2 *(- 1 1 -1 2 ) 2 2 - 5 - 5 - 5 4 + 1 2 *(- 5 2 -1 4 ) 4 4 - 1 - 15 - 19 - 15 8 + 1 2 *(- 19 3 8 ) 2 8 8 4 0 -3.0625 -4.0625 ∆ x = 1 , y 3 = − 5 1 5 -5.0938 -6.5938 2 6 1 -8.3906 = y 6

  29. Back to dy dx = y − x − 1 = F ( x , y ) , P 0 = ( − 2 , − 1). x i +1 = x i + ∆ x y i +1 = y i + ∆ x ∗ ( y i − x i − 1) Example: ∆ x = 1 / 2 F ( x i , y i ) i x i y i y i +1 -1+ 1 0 -2 -1 0 2 *0 - 3 - 1 -1+ 1 2 *(- 1 1 -1 2 ) 2 2 - 5 - 5 - 5 4 + 1 2 *(- 5 2 -1 4 ) 4 4 - 1 - 15 - 19 - 15 8 + 1 2 *(- 19 3 8 ) 2 8 8 4 0 -3.0625 -4.0625 ∆ x = 1 , y 3 = − 5 1 5 -5.0938 -6.5938 2 ∆ x = . 1 , y 30 = − 14 . 449 6 1 -8.3906 = y 6

  30. Back to dy dx = y − x − 1 = F ( x , y ) , P 0 = ( − 2 , − 1). x i +1 = x i + ∆ x y i +1 = y i + ∆ x ∗ ( y i − x i − 1) Example: ∆ x = 1 / 2 F ( x i , y i ) i x i y i y i +1 -1+ 1 0 -2 -1 0 2 *0 - 3 - 1 -1+ 1 2 *(- 1 1 -1 2 ) 2 2 - 5 - 5 - 5 4 + 1 2 *(- 5 2 -1 4 ) 4 4 - 1 - 15 - 19 - 15 8 + 1 2 *(- 19 3 8 ) 2 8 8 4 0 -3.0625 -4.0625 ∆ x = 1 , y 3 = − 5 1 5 -5.0938 -6.5938 2 ∆ x = . 1 , y 30 = − 14 . 449 6 1 -8.3906 = y 6 Actual solution: y = − e x +2 + x + 2, y (1) ≈ − 17 . 0855

  31. Spreadsheet set up: in cell. . . A1 B1 C1 D1 A2 B2 C2 F2 put. . . i xi yi mi 0 ∆ x x 0 y 0 (In the last example, x 0 was -2 and y 0 was -1 and ∆ x was 1, 1 2 ,...) in cell. . . D2 B3 C3 put. . . = F ( B 2 , C 2) =B2+$F$2 =C2+$F$2*D2 x i +1 = x i + ∆ x y i +1 = y i + ∆ x ∗ m i (In the last example, F ( B 2 , C 2) was C2 − B2 − 1)

  32. Another example dx = y 2 + 3 y If dy and y (0) = − 1, what is y (3)? x + 4

  33. Another example dx = y 2 + 3 y If dy and y (0) = − 1, what is y (3)? x + 4 Can I just solve? Separate... � 1 � 1 y 2 + 3 y dy = x + 4 dx

  34. Another example dx = y 2 + 3 y If dy and y (0) = − 1, what is y (3)? x + 4 Can I just solve? Separate... � 1 � 1 ??? = y 2 + 3 y dy = x + 4 dx = ln | x + 4 | + C

  35. Another example dx = y 2 + 3 y If dy and y (0) = − 1, what is y (3)? x + 4 Can I just solve? Separate... � 1 � 1 ??? = y 2 + 3 y dy = x + 4 dx = ln | x + 4 | + C Estimate! Try ∆ x = 1

  36. Another example dx = y 2 + 3 y If dy and y (0) = − 1, what is y (3)? x + 4 Can I just solve? Separate... � 1 � 1 ??? = y 2 + 3 y dy = x + 4 dx = ln | x + 4 | + C Estimate! Try ∆ x = 1 x 0 = 1, y 0 = − 1 m 0 = x 1 = y 1 = m 1 = x 2 = y 2 = m 2 = x 3 = y 3 =

Recommend


More recommend