Euler's method
Today's nonsense
- Homework due tomorrow.
You are going to use your calculator to find an approximate answer to a differential equation. The method is quite simple. First, you need a starting point and an initial slope. Next, we use increments of h to come up, with approximations. Each new approximation will use the following rules: x_n = x_(n-1) + h, and y_n = y_(n-1) + h dot y`_(n-1), repeat for n = 1, 2, 3, this is much easier to understand if we do an example.
They are going to give you an initial condition, they will tell you the definition of the derivative, the same that you use to calculate the little segments of the slope field, and we are going to estimate a solution later down the line. So to estimate 1 to 2, how many steps are we going to use to get there? Obviously, the more steps you have, the more accurate. But you should generally know the process. Euler's method takes a starting point and an initial slope.
Take a tangent line at the initial point. You need a slope and a point to make a tangent line. You will be given the derivative of course, so you're just finding the tangent line. Then, using this tangent line equation, you now have the y function for the points that you are approximating. Your y_n is the same as the tangent line equation that you found. So, now, evaluate y prime at the next x value. So the equation they gave was that y prime = y - 2, so here x = .2, so we know that y prime of 2.2 = 42.2.4, and then we use the tangent line equation and we have y - 4.4 = 2.4(x-.2) and now we use this new tangent line to approximate a new y-value, the next one (which is x=.4). Each time you have a new x value to your y function, you plug it into the last tangent line equation that you found for the last step.
1) You are given the y prime function.
2) You have to find the tangent line at the given points.
If we want to see how far off a certain approximation is via Euler's method, just integrate the y prime function. dy/dx = y -2. Then dy / (y-2) = dx.
Then ln | y-2 | = x + C.
y - 2 = C1e^(x) so y = C1e^(x) - 2. Initially you were told that when x=0, y = 4, so 4-2 = C * e^0 so y = 2e^(x) + 2. So what is the actual value of y_(1).