Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Euler method

  1. May 20, 2004 #1
    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,
  2. jcsd
  3. May 20, 2004 #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:


    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:


    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:


    And then the slope at the predicted point:


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


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

    Chrono, what is RHS ?
  6. May 21, 2004 #5
    RHS = right hand side

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


    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.
  7. May 21, 2004 #6
    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?
  8. May 21, 2004 #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: May 21, 2004
  9. May 22, 2004 #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: May 22, 2004
  10. May 22, 2004 #9
    The Euler and improved Euler can be used to find approximate numerical solutions to differential equations of the form


    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:

    \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)

    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.
  11. May 22, 2004 #10


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    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

    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:
    Last edited: May 23, 2004
  12. May 22, 2004 #11
    Thank you very much, :sm:
  13. May 24, 2004 #12
    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
  14. May 25, 2004 #13
    Okay, I am waiting for a copy from you
    Thank you very much in advance,
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook