# Connection between numerical integration and solving ODE numerically.

1. May 28, 2013

### riemann86

Hey

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. May 28, 2013

### Office_Shredder

Staff Emeritus
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

3. May 29, 2013

### riemann86

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?

4. May 30, 2013

### HallsofIvy

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.