Katherine Johnson, one of the first African-American women to work as a scientist for NASA, used Euler's Method in 1961 to capacitate the first United States human space flight. Euler's Method allowed Johnson to estimate when the spacecraft should slow down to begin its descent into the atmosphere and resulted in a successful flight and landing!
The formula behind Euler's Method
Linear Approximation Review
The formula behind Euler's Method should be familiar to you. Recall the formula for linear approximation (can be found in the article Linear Approximations and Differentials) for f(x):
where f(x) is the value of the function f at point x and a is a known initial value point.
The tangent line is formed from an initial point (a, f(a)) then the slope of the tangent line is used to approximate the value of f(y); here, the point (x, y) is the approximation while the point (x, f(y)) is the actual value - StudySmarter Original
Euler's Method Formula
Similarly, the general formula for Euler's Method for a differential equation of the form . The only difference between Euler's method and linear approximation is that Euler's method uses multiple approximation iterations to find a more exact value. Using Euler's method, we use x0 and y0, which are typically given as initial values, to estimate the slope of the tangent at x1. It looks like this:
whereis the next solution value approximation,is the current value,is the interval between steps, and is the value of the differential equation evaluated at .
Let's break this formula down further.
Derivation of Euler's Method
Consider the picture below.
Euler's Method General Formula Intuition - StudySmarter Original
With an initial point , we can find a tangent line with a slope of . We can use these values to approximate the point where and according to basic coordinate geometry. This operation can be done as many times as need be. However, it's important to mention that using a smaller step size h will produce a more accurate approximation. A larger step size h will produce a less accurate approximation.
If y1 is a good approximation, then using Euler's method will give us a good estimate of the actual solution. However, if y1 is not a good approximation, then the solution using this method will be off as well!
Importance of Euler's Method
Differential equations are commonly used to describe natural phenomena in the natural world with applications ranging in simplicity from the movement of a car to spacecraft trajectory models. Unfortunately, these equations cannot be solved directly given their complexity. This is where Euler's Method and other differential equation approximation algorithms come in. We can use differential equation approximation algorithms, like Euler's Method, to find an approximate solution. An approximate solution is much better than no solution at all!
Limitations of Euler's Method
Though Euler's Method is a simple and direct algorithm, it is less accurate than many algorithms like it. As previously mentioned, using a smaller step size h can increase accuracy but it requires more iterations and thus an unreasonably larger computational time. For this reason, Euler's Method is rarely used in practice. However, Euler's Method forms a basis for more accurate and useful approximation algorithms.
Euler's Method Examples
A step-by-step method
Consider the differential equation with an initial value of. Use to approximate .
Step 1: Find the slope of the tangent line at the initial point
To find the tangential slope at , we simply plug it into the differential equation to get
Step 2: Find our new x-value
To find our next x-value, we add h to the initial x-value to get
Step 3: Plug in our values to obtain our new y-value approximation
So, we have:
- Step size,
- Initial y-value,
- The slope of the tangent line at the initial value,
Plugging in all of our values, we get
So, the approximation to the solution at is or
Step 4: Repeat the algorithm as many times as needed to obtain y(4)
Given that our step size is 0.2, we will have to repeat the algorithm 4 more times:
- Using :
- Using :
- Using :
- Using :
Finally, we have obtained our approximation at !
When solving multiple iterations of Euler's Method, it may be useful to construct a table for each of your values! In iterative problems such as these, tables can help to our numbers organized.
For this problem, a table might look like:
(xi, yi) | dy/dx | h = 0.2 | xi+1 | yi+1 |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
Step 5: Check the error
As this specific example can be solved directly, we can check the global error of our answer.
The direct solution to the differential equation is . Plugging in x = 4, we get
To check the percent error, we simply compute
Our error is relatively low!
We use absolute values in the percent error calculation because we don't care if our approximation is above or below the actual value, we just want to know how far away it is!
Lucky for us, all Euler's Method problems follow the same simple algorithm.
Euler's Method - Key takeaways
- Euler's Method is an approximation tool for differential equation solving based on linear approximation
- The general Euler's Method formula is where
- is the next solution value approximation,
- is the current value,
- is the interval between steps, and
- is the value of the differential equation evaluated at
- Euler's Method is rarely used in real-world applications as the algorithm tends to have low accuracy and requires vast computation time
How we ensure our content is accurate and trustworthy?
At StudySmarter, we have created a learning platform that serves millions of students. Meet
the people who work hard to deliver fact based content as well as making sure it is verified.
Content Creation Process:
Lily Hulatt is a Digital Content Specialist with over three years of experience in content strategy and curriculum design. She gained her PhD in English Literature from Durham University in 2022, taught in Durham University’s English Studies Department, and has contributed to a number of publications. Lily specialises in English Literature, English Language, History, and Philosophy.
Get to know Lily
Content Quality Monitored by:
Gabriel Freitas is an AI Engineer with a solid experience in software development, machine learning algorithms, and generative AI, including large language models’ (LLMs) applications. Graduated in Electrical Engineering at the University of São Paulo, he is currently pursuing an MSc in Computer Engineering at the University of Campinas, specializing in machine learning topics. Gabriel has a strong background in software engineering and has worked on projects involving computer vision, embedded AI, and LLM applications.
Get to know Gabriel