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

Connection between numerical integration and solving ODE numerically.

  1. May 28, 2013 #1

    I have taken a programming course. And I have learned about Simpson, Trapezoidal and the midpoint rule etc, I have programmed these.
    I have also implemented forward Euler, backward euler, Runge Kutta etc for solving ODE.

    I am wondering if there is any way to unify these two things, are there any texts you know that treat these two things as allmost the same? They were thought seperately but when you solve an ODE analytically, you integrate. So the Euler method is kind of an integration, but these methods are not derived this way, they are derived with you wanting to iterate forward, and it is not an emphasis on integration.

    Are there any texts or anything that unites these two things? It seems like the only difference is that in one case you have to iterate and in the other you dont really iterate, but in both you integrate?
  2. jcsd
  3. May 28, 2013 #2


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Imagine the following differential equation: dy/dx = f(x)
    Doing eulers method is the same as integrating f(x) using left hand sums. You should check this as an exercise

    In general a way of solving odes can be reduced to integrating a function by this specialization, but it's not worth mentioning this because solving odes typically requires a much more general way of iterating forward than integration does, because when integrating you already know the derivative everywhere
  4. May 29, 2013 #3
    Thank you very much, I think I understand it much clearer now.
    Would it be fair to say then that a problem of solving an ODE will be reduced to numerical integration if one actually knew the exacat derivative at each point?, but it is not the same since we must approximate the derivative?

    I checked with your example by writing the sums and it works, thanks! :)
    But is it so that there for example exists a numerical way of solving ODE that will boil down to simpson if we actually had the exact derivative at each point?
    And can we go the opposite way, is there a way to simplify the Runge Kutta method for example, so that if the function is known, we can use Runge Kutta to integrate it?
  5. May 30, 2013 #4


    User Avatar
    Science Advisor

    This is true only for a limited variety of first order differential equations. For example, to solve the comparatively simple y''+ y= 0, y(0)= 0, y(1)= 0, you do not integrate.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook