1 / 28

Math 3C

Math 3C. Euler’s Method. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB. Euler’s Method will find an approximate solution to an initial value problem. Let’s work through a simple example: Suppose we want to solve the following initial value problem:.

edr
Download Presentation

Math 3C

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Math 3C Euler’s Method Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  2. Euler’s Method will find an approximate solution to an initial value problem. Let’s work through a simple example: Suppose we want to solve the following initial value problem: • First find an estimate for y(2) using Euler’s Method with a step size of 1 • Next get a better estimate by using a step size of 0.5. • Finally, solve the problem exactly and compare to the estimates from parts a) and b) Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  3. Euler’s Method will find an approximate solution to an initial value problem. Let’s work through a simple example: Suppose we want to solve the following initial value problem: • First find an estimate for y(2) using Euler’s Method with a step size of 1 • Next get a better estimate by using a step size of 0.5. • Finally, solve the problem exactly and compare to the estimates from parts a) and b) Euler’s method will create a piecewise linear approximation to y(t) by using the given differential equation to calculate the slope of the solution curve at each step, then following that slope to calculate the approximations. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  4. Euler’s Method will find an approximate solution to an initial value problem. Let’s work through a simple example: Suppose we want to solve the following initial value problem: • First find an estimate for y(2) using Euler’s Method with a step size of 1 • Next get a better estimate by using a step size of 0.5. • Finally, solve the problem exactly and compare to the estimates from parts a) and b) The first step is to use the given equation and initial value to find the initial slope (at t=0): Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  5. Euler’s Method will find an approximate solution to an initial value problem. Let’s work through a simple example: Suppose we want to solve the following initial value problem: • First find an estimate for y(2) using Euler’s Method with a step size of 1 • Next get a better estimate by using a step size of 0.5. • Finally, solve the problem exactly and compare to the estimates from parts a) and b) The first step is to use the given equation and initial value to find the initial slope (at t=0): Next we use this slope to find the approximation for y(1): Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  6. Euler’s Method will find an approximate solution to an initial value problem. Let’s work through a simple example: Suppose we want to solve the following initial value problem: • First find an estimate for y(2) using Euler’s Method with a step size of 1 • Next get a better estimate by using a step size of 0.5. • Finally, solve the problem exactly and compare to the estimates from parts a) and b) The first step is to use the given equation and initial value to find the initial slope (at t=0): Next we use this slope to find the approximation for y(1): Now we repeat this process, calculating the slope at t=1: Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  7. Euler’s Method will find an approximate solution to an initial value problem. Let’s work through a simple example: Suppose we want to solve the following initial value problem: • First find an estimate for y(2) using Euler’s Method with a step size of 1 • Next get a better estimate by using a step size of 0.5. • Finally, solve the problem exactly and compare to the estimates from parts a) and b) The first step is to use the given equation and initial value to find the initial slope (at t=0): Next we use this slope to find the approximation for y(1): Now we repeat this process, calculating the slope at t=1: We have one last step – calculate the approximation for y(2): Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB Here is our answer to part a)

  8. It is helpful to see a graph of our results. Slope=0.39 Slope=0.3 Notice that we used two steps, and we have two straight line segments (whose slopes we calculated from the given D.E.) Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  9. Now we can run through the procedure for part b). We use 4 steps this time, each of step size 0.5. This time let’s make a table to organize our calculations: Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  10. Now we can run through the procedure for part b). We use 4 steps this time, each of step size 0.5. This time let’s make a table to organize our calculations: Calculate y’(0) from the original D.E. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  11. Now we can run through the procedure for part b). We use 4 steps this time, each of step size 0.5. This time let’s make a table to organize our calculations: Calculate y’(0) from the original D.E. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  12. Now we can run through the procedure for part b). We use 4 steps this time, each of step size 0.5. This time let’s make a table to organize our calculations: Find y(0.5) from the formula Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  13. Now we can run through the procedure for part b). We use 4 steps this time, each of step size 0.5. This time let’s make a table to organize our calculations: Find y(0.5) from the formula Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  14. Now we can run through the procedure for part b). We use 4 steps this time, each of step size 0.5. This time let’s make a table to organize our calculations: Calculate y’(0.5) from the original D.E. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  15. Now we can run through the procedure for part b). We use 4 steps this time, each of step size 0.5. This time let’s make a table to organize our calculations: Calculate y’(0.5) from the original D.E. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  16. Now we can run through the procedure for part b). We use 4 steps this time, each of step size 0.5. This time let’s make a table to organize our calculations: Find y(1.0) from the formula Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  17. Now we can run through the procedure for part b). We use 4 steps this time, each of step size 0.5. This time let’s make a table to organize our calculations: Find y(1.0) from the formula Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  18. Now we can run through the procedure for part b). We use 4 steps this time, each of step size 0.5. This time let’s make a table to organize our calculations: Fill in the rest of the table in the same manner, calculating a slope, then using it to get the next value for y… Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  19. Now we can run through the procedure for part b). We use 4 steps this time, each of step size 0.5. This time let’s make a table to organize our calculations: Fill in the rest of the table in the same manner, calculating a slope, then using it to get the next value for y… I kept all the digits, but you can probably round offa little bit Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  20. Now we can run through the procedure for part b). We use 4 steps this time, each of step size 0.5. This time let’s make a table to organize our calculations: Fill in the rest of the table in the same manner, calculating a slope, then using it to get the next value for y… I kept all the digits, but you can probably round offa little bit Here is our answer to part b) Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  21. Here is the graph of our results from parts a) and b). The new calculation should be more accurate because we used more steps that were closer together. In the next step we will find the exact answer. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  22. We can actually solve this problem, so let’s do it using separation of variables. (You should be able to find the general solution to this one in your head in <5 seconds, btw). We want the value for y(2). First we will separate, then integrate to find the general solution. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  23. We can actually solve this problem, so let’s do it using separation of variables. (You should be able to find the general solution to this one in your head in <5 seconds, btw). We want the value for y(2). First we will separate, then integrate to find the general solution. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  24. We can actually solve this problem, so let’s do it using separation of variables. (You should be able to find the general solution to this one in your head in <5 seconds, btw). We want the value for y(2). First we will separate, then integrate to find the general solution. Next put in the given initial value to find C: Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  25. We can actually solve this problem, so let’s do it using separation of variables. (You should be able to find the general solution to this one in your head in <5 seconds, btw). We want the value for y(2). First we will separate, then integrate to find the general solution. Next put in the given initial value to find C: Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  26. We can actually solve this problem, so let’s do it using separation of variables. (You should be able to find the general solution to this one in your head in <5 seconds, btw). We want the value for y(2). First we will separate, then integrate to find the general solution. Next put in the given initial value to find C: So our solution is Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  27. We can actually solve this problem, so let’s do it using separation of variables. (You should be able to find the general solution to this one in your head in <5 seconds, btw). We want the value for y(2). First we will separate, then integrate to find the general solution. Next put in the given initial value to find C: So our solution is Last step – plug in t=2 Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

  28. Here is the graph comparing our results. Notice that the approximation with the smaller step size is closer to the exact value (but it took more work to get there). We can calculate the % error in our estimates as a check on their accuracy. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

More Related