Improving Euler's Approximation for Differential Equations: Tips and Resources

In summary, Euler's and improved Euler methods are good predictor-corrector methods for solving differential equations where analytical solutions do not exist. They are used most often for solving initial value problems. They are less accurate than the 4th-order Runge-Kutta method.
  • #1
Pattielli
296
0
Would you please tell me how to improve Euler's approximation to be better in solving differerential equations ? Can you give me some links to this?

Thank you,
 
Physics news on Phys.org
  • #2
It is literally called the "improved Euler method," the "improved Euler-Cauchy method," or sometimes "Heun's method." It's known as a predictor-corrector method.

I assume you are familiar with the regular Euler method. Recall for Euler's method we are given:

[tex]y'=f(x,y)[/tex]
[tex]y(x_0)=y_0[/tex]

The function [itex]f(x,y)[/itex] tells us the slope of the function at every point, important for 'shooting' from station to station (point to point).

The first step in the improved Euler method is the "predictor" step, and it's identical to the regular Euler method:

[tex]y^\ast_{n+1}=y_n+hf(x_n,y_n)[/tex]

h is the step size. The asterisk denotes the prediction of [itex]y_{n+1}[/itex]. With this prediction, we have two slopes to consider in 'shooting' toward the next station. First is the slope of the current station we used previously:

[tex]y'|_n=f(x_n,y_n)[/tex]

And then the slope at the predicted point:

[tex]y'|_{n+1}=f(x_{n+1},y^\ast_{n+1})[/tex]

We can "correct" our aim by averaging these two slopes and using that as our slope to find the next point:

[tex]y_{n+1}=y_n+\frac{1}{2}h[f(x_n,y_n)+f(x_{n+1},y^\ast_{n+1})][/tex]

There you have it.
 
  • #3
I'm a little slack on differential equations, so perhaps you can shed some light. On the RHS, what's that line?
 
  • #4
Thank you,

Chrono, what is RHS ?
 
  • #5
RHS = right hand side

I don't see anything funky on the right hand side. Do you mean this:

[tex]y'|_{n+1}[/tex]

If so, the vertical line doesn't really mean anything other than y' evaluated at n+1. It's a notation quirk I picked, I'm not sure if it's exactly correct.
 
  • #6
TALewis said:
RHS = right hand side

I don't see anything funky on the right hand side. Do you mean this:

[tex]y'|_{n+1}[/tex]

If so, the vertical line doesn't really mean anything other than y' evaluated at n+1. It's a notation quirk I picked, I'm not sure if it's exactly correct.

That's what I mean. That's the left hand side, isn't it? I don't know what I was thinking when I said that. So would it mean the same without the line there?
 
  • #7
The line doesn't really mean anything here. It's just how I chose to say "the slope at this station" and "the slope at the next station." Here's another example of the notation:

[tex]\tau_w = \left.\mu\frac{du}{dy}\right|_{y=0}[/tex]

This, from fluid mechanics, says the shear stress caused by a fluid at a wall ([itex]\tau_w[/itex]) is equal to the fluid's dynamic viscosity ([itex]\mu[/itex]) times the derivative of the fluid velocity parallel to the wall (u) with respect to the perpendicular distance from the wall (y), evaluated at the wall ( y = 0 ).
 
Last edited:
  • #8
I would like to have three other questions...Please help.
Would you please tell me about Euler and improved Euler methods' applications ?
How can they be in use for what purpose but just solve the differential equations ? An even when they are used for their main purpose, what do people want to learn from their approximations ?

Thank you very much
 
Last edited:
  • #9
The Euler and improved Euler can be used to find approximate numerical solutions to differential equations of the form

[tex]y'=f(x,y)[/tex]

where the initiial point of the function is given. That is to say, it is applicable to initial value problems (although it can be applied to boundary value problems through a shooting method). I'm not sure about applications of the method to problems not related to this differential equation.

In practice, we would use a numerical method like the improved Euler method to solve a differential equation where no analytical solution exists. That is to say, there are only a handful of differential equations that can be solved through calculus and algebraic manipulation to give a closed form result.

For example, the field of computational fluid dynamics (CFD) is concerned in part with numerical solutions to the Navier-Stokes equations, which govern fluid flow. The Navier-Stokes equations are a system of nonlinear, second order, partial differential equations with variable coefficients. Here is the NS equation for the x-direction:

[tex]
\begin{align*}
\rho\left(\frac{\partial u}{\partial t} + u\frac{\partial u}{\partial x} + v\frac{\partial u}{\partial y} + w\frac{\partial u}{\partial z}\right) =\\
-\frac{\partial p}{\partial x} + \rho g_x + \mu\left(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} + \frac{\partial^2 u}{\partial z^2}\right)
\end{align}
[/tex]

There are few analytical solutions to these Navier-Stokes equations. They must be solved by numerical methods in most cases.

In the case of a differential equation that cannot be solved "by hand," the numerical solution produced by method such as Euler's can provide as much information to an engineer as an exact solution. I can plot a numerical solution, numerically differentiate or integrate it, to a degree of numerical precision limited only by my time and computing power.

In practice, however, the Euler and improved Euler are not as accurate as the 4th-order Runge-Kutta method, which is another predictor-corrector "marching" method that's used more often with better results.
 
  • #10
Just a minor comment here regarding variable coefficients:
Under the assomption of small deformation rates, incompressibility of the fluid, and the validity of Newton's stress/strain rate relationship, it is quite common to express the
stress tensor P as
[tex]P=-pI+\mu(\nabla{\vec{v}}+(\nabla{\vec{v}})^{T})[/tex]

where p is the pressure, [tex]\mu[/tex] the possibly variable dynamic viscosity coefficient, whereas [tex]\vec{v}[/tex] (I is the identity matrix).
In the case of a constant viscosity coefficient, the momentum equation gains the form
indicated by TALewis, in general however, we'll have the force per unit volume terms:
[tex]-\nabla{p}+\nabla\cdot(\mu(\nabla{\vec{v}}+(\nabla{\vec{v}})^{T}))[/tex]
 
Last edited:
  • #11
Thank you very much, :sm:
 
  • #12
hi
i am studying this stuff at the moment and have some very useful pdf documents explaining this stuff.
let me know if you are interested and i will send you a copy
 
  • #13
Okay, I am waiting for a copy from you
Thank you very much in advance,
 

What is Euler's approximation for differential equations?

Euler's approximation is a method used to numerically solve differential equations by breaking them down into smaller, simpler steps. It is based on the idea that the solution to a differential equation can be approximated by a series of straight lines.

Why is it important to improve Euler's approximation?

Euler's approximation is a simple and straightforward method, but it can produce inaccurate results for certain types of differential equations. By improving the method, we can achieve more accurate solutions and better understand the behavior of the system being modeled.

What are some tips for improving Euler's approximation?

1. Use smaller step sizes: By decreasing the step size, the approximation will be more accurate. However, this will also increase the computational time required.2. Use higher-order methods: Higher-order methods such as Heun's method or the Runge-Kutta method can provide more accurate results than Euler's method.3. Check for stability: Certain differential equations may require a specific step size for stability. It is important to check for stability when improving Euler's approximation.4. Consider using adaptive step sizes: Adaptive step sizes can help balance accuracy and computational time by adjusting the step size based on the behavior of the differential equation.5. Utilize software and resources: There are many software programs and online resources available that can help improve Euler's approximation and provide more accurate solutions.

What are some resources for improving Euler's approximation?

There are many resources available for improving Euler's approximation, including textbooks, online tutorials, and software programs. Some popular resources include "Numerical Recipes" by Press, Teukolsky, Vetterling, and Flannery, "Numerical Methods for Scientists and Engineers" by Hamming, and the software program MATLAB.

Can Euler's approximation be used for all types of differential equations?

No, Euler's approximation is most suitable for simple, first-order differential equations. It may not produce accurate results for higher-order differential equations or systems of differential equations. In these cases, it is important to use other methods or resources to improve the approximation.

Similar threads

Replies
7
Views
2K
Replies
2
Views
4K
Replies
16
Views
2K
  • Differential Equations
Replies
11
Views
19K
  • Differential Equations
Replies
6
Views
3K
  • Differential Equations
Replies
1
Views
717
Replies
2
Views
939
  • Differential Equations
Replies
15
Views
2K
  • Differential Equations
Replies
5
Views
2K
  • Advanced Physics Homework Help
Replies
2
Views
746
Back
Top