280 likes | 338 Views
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:.
E N D
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: • 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
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
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
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
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
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)
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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