Exercise ODEs

  1. Implement a Runge-Kutta stepper-routine rkstep wich advances the solution by a step h and estimates the error. For example, the Eurler/Midpoint method (rk12):
    
    
    
  2. Implement an adaptive-step-size Runge-Kutta driver-routine wchich advances the solution from a to b (by calling rkstep with appropriate step-sizes) keeping the specified relative, eps, and absolute, acc, precision. For example,
    
    
    
  3. Your driver must remember the points {x,y} it calculated along the way.
  4. Solve some interesting systems of ordinary differential equations.
  5. Implement the simplest two-step method and compare it with the Euler's method.
  6. A definite integral abf(x)dx can be reformulated as an ODE, y'=f(x), y(a)=0, y(b)=?, which can be solved with your adaptive ODE solver. Pick an interesing f(x) and compare the effectiveness of your ODE drivers with your adaptive integrator.

Projects

  1. Predictor-Corrector method with adaptive step-size control.