ODE Approximation
Euler Forward Method
Euler's forward method is
With a forward approximation, we want to look ahead the next value with the current value known. So rearrange the equation to isolate the current values on the right
yn​ is known and Δt is chosen by us. What is fn​? It's the function that we want to approximate.
Since we know yn​ (it's the current value) and tn​ ( the current time is the number of steps n times the step size Δt ), simply feed them to our ODE to find the fn​ required.
Here's an example with dtdy​=2y
Now the next value is always computable given the current value and a step size. However, what we had was always acceptable as a template for writing some code.
This is not good code, however, as the error from the true value is unacceptable and the runtime is inefficient. But Euler's method will get you thinking about approximation functions, and for that, it's useful to know.
Last updated