Presentation is loading. Please wait.

Presentation is loading. Please wait.

Prepared by Vince Zaccone

Similar presentations


Presentation on theme: "Prepared by Vince Zaccone"— Presentation transcript:

1 Math 4B Euler’s Method http://www.youtube.com/watch?v=07HCb0eR9iY
Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

2 Let’s work through a simple example:
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 Let’s work through a simple example:
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 Let’s work through a simple example:
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 Let’s work through a simple example:
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 Let’s work through a simple example:
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 Let’s work through a simple example:
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): 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.
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)
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: t y y’ 0.0 1.0 0.5 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)
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: t y y’ 0.0 1.0 0.5 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)
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: t y y’ 0.0 1.0 0.3 0.5 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)
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: t y y’ 0.0 1.0 0.3 0.5 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)
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: t y y’ 0.0 1.0 0.3 0.5 1.15 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)
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: t y y’ 0.0 1.0 0.3 0.5 1.15 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)
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: t y y’ 0.0 1.0 0.3 0.5 1.15 0.345 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)
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: t y y’ 0.0 1.0 0.3 0.5 1.15 0.345 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)
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: t y y’ 0.0 1.0 0.3 0.5 1.15 0.345 1.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)
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: t y y’ 0.0 1.0 0.3 0.5 1.15 0.345 1.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)
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: t y y’ 0.0 1.0 0.3 0.5 1.15 0.345 1.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… 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)
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: t y y’ 0.0 1.0 0.3 0.5 1.15 0.345 1.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… 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).
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 want the value for y(2).
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 want the value for y(2).
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 want the value for y(2).
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 want the value for y(2).
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 want the value for y(2).
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.
y(2) % error step size =1 1.690 7.2% step size =0.5 1.749 4.0% exact 1.822 0.0% 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


Download ppt "Prepared by Vince Zaccone"

Similar presentations


Ads by Google