# I Real life application of Euler's method/numerical method

#### ChanYoung Park

Hi! For my math investigation project, I was trying to predict the trajectory of an object in a projectile motion with significant air resistance by using the Euler's Method. But it seems like the differential equation involved there can easily be separated into different variables, and so it seems unnecessary to use the method.
Can anyone suggest me a real life situation(related to physics) where differential equations can be given in the form: $$\frac{dy}{dx}=f(x,y)$$
or any worthwhile idea for investigation using the Euler's method??

Related Differential Equations News on Phys.org

#### fresh_42

Mentor
2018 Award
You could choose isolines like isobars or isotherms like those: https://en.wikipedia.org/wiki/Contour_line
or the ideal gas law: https://en.wikipedia.org/wiki/Equation_of_state#The_ideal_gas_law_.281834.29

If you like to look out for other examples, then google "implicit function theorem in physics".

On the other hand, the more general concept of the calculus of variations is spread all over physics. If you search for "Lagrangian" only on PF, you will probably get hundreds of hits. This way you could even choose by forum section, aka physical area.

#### S.G. Janssens

You could choose isolines like isobars or isotherms like those: https://en.wikipedia.org/wiki/Contour_line
or the ideal gas law: https://en.wikipedia.org/wiki/Equation_of_state#The_ideal_gas_law_.281834.29

If you like to look out for other examples, then google "implicit function theorem in physics".

On the other hand, the more general concept of the calculus of variations is spread all over physics. If you search for "Lagrangian" only on PF, you will probably get hundreds of hits. This way you could even choose by forum section, aka physical area.
I'm not sure how this relates to the OP? Yes, we could consider implicit differential equations, but since it was asked
Can anyone suggest me a real life situation(related to physics) where differential equations can be given in the form: $$\frac{dy}{dx}=f(x,y)$$
or any worthwhile idea for investigation using the Euler's method??
I think there may be easier ways towards examples.

Most pieces of text discussing the numerical solution of ODEs will start with Euler. Any such text that includes physics examples (from classical mechanics or circuit theory, for instance) will be worth a look.

By the way, it is not bad (actually: it is typical) to start with an example that can (also) be solved analytically. This way you can assess the quality of the numerical method.

#### ChanYoung Park

You could choose isolines like isobars or isotherms like those: https://en.wikipedia.org/wiki/Contour_line
or the ideal gas law: https://en.wikipedia.org/wiki/Equation_of_state#The_ideal_gas_law_.281834.29

If you like to look out for other examples, then google "implicit function theorem in physics".

On the other hand, the more general concept of the calculus of variations is spread all over physics. If you search for "Lagrangian" only on PF, you will probably get hundreds of hits. This way you could even choose by forum section, aka physical area.

#### ChanYoung Park

I'm not sure how this relates to the OP? Yes, we could consider implicit differential equations, but since it was asked

I think there may be easier ways towards examples.

Most pieces of text discussing the numerical solution of ODEs will start with Euler. Any such text that includes physics examples (from classical mechanics or circuit theory, for instance) will be worth a look.

By the way, it is not bad (actually: it is typical) to start with an example that can (also) be solved analytically. This way you can assess the quality of the numerical method.
Thank you for your advice! I decided to justify the motive behind the project by saying that I would like to evaluate the usefulness of the Euler's method in real life applications.

#### I like Serena

Homework Helper
Hi! For my math investigation project, I was trying to predict the trajectory of an object in a projectile motion with significant air resistance by using the Euler's Method. But it seems like the differential equation involved there can easily be separated into different variables, and so it seems unnecessary to use the method.
Can anyone suggest me a real life situation(related to physics) where differential equations can be given in the form: $$\frac{dy}{dx}=f(x,y)$$
or any worthwhile idea for investigation using the Euler's method??
Hi ChanYoung Park! Welcome to PF! :)

Projectile motion with significant air resistance ($\propto v^2$) seems to be a good example, which is not solvable analytically as far as I know.

#### Dr.D

Euler's method is not stable, and for that reason it is never recommended. It is often discussed because it gives a lot of insight into the nature of numerical solution of ODEs, but something better must always be used to obtain a usable solution.

#### hilbert2

Gold Member
In chemical reaction kinetics, there can be situations where $c_1 ,c_2$ (the concentrations of substances 1 and 2) develop according to coupled equations

$\frac{dc_1}{dt} = f_1 (c_1 ,c_2 )$
$\frac{dc_2}{dt} = f_2 (c_1 ,c_2 )$,

and then you can try a modification of the Euler's method where both $c_1 (t)$ and $c_2 (t)$ are evolved on each timestep. The pair of equations can't be solved analytically in all cases, so a numerical solution is often necessary. The stability problem sometimes causes difficulties and sometimes not.

#### Dr. Courtney

Gold Member
2018 Award
Hi! For my math investigation project, I was trying to predict the trajectory of an object in a projectile motion with significant air resistance by using the Euler's Method. But it seems like the differential equation involved there can easily be separated into different variables, and so it seems unnecessary to use the method.
Can anyone suggest me a real life situation(related to physics) where differential equations can be given in the form: $$\frac{dy}{dx}=f(x,y)$$
or any worthwhile idea for investigation using the Euler's method??
Euler's method is commonly used in projectile motion including drag, especially to compute the drag force (and thus the drag coefficient) as a function of velocity from experimental data. Keep in mind that the drag coefficient (and other aerodynamic coefficients) are seldom really constant. They vary with velocity over the velocity ranges that most projectiles experience in flight. If one has experimental data for position and velocity vs. time from Doppler radar or for position vs. time from sufficiently fast video, Euler's method is common for inferring the drag force and coefficient.

In real life, one can also use Euler's method to from known aerodynamic coefficients to predicting trajectories. Three degree of freedom (3DOF) models are usually called point mass models, because other than drag acting opposite the velocity vector, they ignore the effects of rigid body motion. These are most amenable to Euler, because computers are fast enough to take small step sizes needed for the method. There are also 4DOF (modified point mass) and 6DOF models for spin stabilized rigid bodies in flight. Knowing the aerodynamic coefficients accurately is actually the harder part of making accurate predictions of the rigid body effects, but better approximations than Euler (such as 4th order Runge-Kutta) are usually used. Computing time can begin to be an issue in 6DOF models, so a method is needed to improve accuracy without just making the time steps smaller and smaller.

#### Dr.D

I have a simulation (7 coupled ODEs in 7 unknowns) that I have run many times using a 5th order Runge-Kutta-Feldberg with variable step size, and it runs in about 2 to 3 seconds. Of course, I have the benefit of an antique Dell Optiplex computer, about 12 years old, so I don't have the additional speed of more recent technology. I really cannot fathom why anyone today is considering actually employing Euler's Method which is known to be unstable.

#### Dr. Courtney

Gold Member
2018 Award
I really cannot fathom why anyone today is considering actually employing Euler's Method which is known to be unstable.
There are cases where it can be unstable, but stability issues are easy to test for when using Euler to solve projectile motion problems including drag. Our typical approach has several components: 1) Vary the step sizes over a factor of 10. If the results are the same, odds are you are not encountering a stability problem. 2) Use the work-energy theorem to double check the final velocities. 3) Check that the solutions are physically reasonable.

Why not use Runge-Kutta or something similar? Many times the students doing the calculations do not know how to program and do not yet know Calculus. But they can employ Euler's method in a spreadsheet simply enough with the above checks.

#### Chestermiller

Mentor
I have a simulation (7 coupled ODEs in 7 unknowns) that I have run many times using a 5th order Runge-Kutta-Feldberg with variable step size, and it runs in about 2 to 3 seconds. Of course, I have the benefit of an antique Dell Optiplex computer, about 12 years old, so I don't have the additional speed of more recent technology. I really cannot fathom why anyone today is considering actually employing Euler's Method which is known to be unstable.
Only the Forward Euler Method is unstable if the step in the independent variable is too large. The Backward Euler method (which forms the theoretical basis for stiff equation solvers of variable step size and order) is always stable.

"Real life application of Euler's method/numerical method"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving