Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Math 3C Euler’s Method Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB."— 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: a)First find an estimate for y(2) using Euler’s Method with a step size of 1 b)Next get a better estimate by using a step size of 0.5. c)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: a)First find an estimate for y(2) using Euler’s Method with a step size of 1 b)Next get a better estimate by using a step size of 0.5. c)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: a)First find an estimate for y(2) using Euler’s Method with a step size of 1 b)Next get a better estimate by using a step size of 0.5. c)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: a)First find an estimate for y(2) using Euler’s Method with a step size of 1 b)Next get a better estimate by using a step size of 0.5. c)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: a)First find an estimate for y(2) using Euler’s Method with a step size of 1 b)Next get a better estimate by using a step size of 0.5. c)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: a)First find an estimate for y(2) using Euler’s Method with a step size of 1 b)Next get a better estimate by using a step size of 0.5. c)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): Here is our answer to part a) Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

8 It is helpful to see a graph of our results. Notice that we used two steps, and we have two straight line segments (whose slopes we calculated from the given D.E.) Slope=0.3 Slope=0.39 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: tyy’ 0.01.0 0.5 1.0 1.5 2.0 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: tyy’ 0.01.0 0.5 1.0 1.5 2.0 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: tyy’ 0.01.00.3 0.5 1.0 1.5 2.0 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: tyy’ 0.01.00.3 0.5 1.0 1.5 2.0 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: tyy’ 0.01.00.3 0.51.15 1.0 1.5 2.0 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: tyy’ 0.01.00.3 0.51.15 1.0 1.5 2.0 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: tyy’ 0.01.00.3 0.51.150.345 1.0 1.5 2.0 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: tyy’ 0.01.00.3 0.51.150.345 1.0 1.5 2.0 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: tyy’ 0.01.00.3 0.51.150.345 1.01.3225 1.5 2.0 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: tyy’ 0.01.00.3 0.51.150.345 1.01.3225 1.5 2.0 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: tyy’ 0.01.00.3 0.51.150.345 1.01.32250.39675 1.51.520875 2.0 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 off a 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: tyy’ 0.01.00.3 0.51.150.345 1.01.32250.39675 1.51.5208750.4562625 2.0 1.74900625 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 off a 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 want the value for y(2). First we will separate, then integrate to find the general solution. 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). Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

23 We want the value for y(2). First we will separate, then integrate to find the general solution. 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). Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

24 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: 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). Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

25 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: 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). Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

26 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 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). 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. y(2)% error step size =1 1.6907.2% step size =0.5 1.7494.0% exact1.8220.0% Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB


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

Similar presentations


Ads by Google