## Improved Euler's Method

The improved Euler method is a Runge-Kutta method for approximating the solution of the initial value problem*y'(x) = f(x,y)*;

*y(x*which evaluates the integrand,

_{0}) = y_{0}*f(x,y)*, twice for each step. For step

*i+1*,

*y*,

_{i+1}= y_{i}+ k_{2}where

*k*,

_{1}= h * f(x_{i}, y_{i})*k*,

_{2}= h * f(x_{i}+ h / 2, y_{i}+ k_{1}/ 2 )and

*x*.

_{i}= x_{0}+ i hThe improved Euler method is a second order procedure for which Richardson extrapolation can be used.

### Function List

- double Improved_Euler_Method( double (*f)(double, double), double y0, double x0, double h, int number_of_steps )

This function uses the improved Euler method to return the estimate of the solution of the initial value problem,*y' = f(x,y); y(x0) = y0*, at*x = x0 + h * n*, where*h*is the step size and*n*is*number_of_steps*.

- double Improved_Euler_Method_Richardson( double (*f)(double, double), double y0,
double x0, double h, int number_of_steps, int richardson_columns )

This function uses the improved Euler method together with Richardson extrapolation to the limit to return the estimate of the solution of the initial value problem,*y' = f(x,y); y(x0) = y0*, at*x = x0 + h * n*, where*h*is the step size and*n*is*number_of_steps*. The argument*richardson_columns*is the number of step size halving + 1 used in Richardson extrapolation so that if*richardson_columns = 1*then no extrapolation to the limit is performed.

- void Improved_Euler_Integral_Curve( double (*f)(double, double), double y[ ], double x0, double h, int number_of_steps_per_interval, int number_of_intervals )

This function uses the improved Euler method to estimate the solution of the initial value problem,*y' = f(x,y); y(x0) = y0*, at*x = x0 + h * n * m*, where*h*is the step size and*n*is the interval number*0 ≤ n ≤ number_of_intervals*, and*m*is the*number_of_steps_per_interval*. The values are return in the array*y[ ]*i.e.*y[n] = y(x0 + h * m * n)*, where*m, n*are as above.

- void Improved_Euler_Richardson_Integral_Curve( double (*f)(double, double), double y[ ], double x0, double h, int number_of_steps_per_interval, int number_of_intervals, int richardson_columns )

This function uses the improved Euler method together with Richardson extrapolation to the limit to estimate the solution of the initial value problem,*y' = f(x,y); y(x0) = y0*, at*x = x0 + h * n * m*, where*h*is the step size and*n*is the interval number*0 ≤ n ≤ number_of_intervals*, and*m*is the*number_of_steps_per_interval*. The values are return in the array*y[ ]*i.e.*y[n] = y(x0 + h * m * n)*, where*m, n*are as above. The argument*richardson_columns*is the number of step size halving + 1 used in Richardson extrapolation so that if*richardson_columns = 1*then no extrapolation to the limit is performed.

*C* Source Code

- The file, improved_euler_method.c, contains versions of Improved_Euler_Method( ), Improved_Euler_Method_Richardson( ), Improved_Euler_Integral_Curve( ), and Improved_Euler_Richardson_Integral_Curve( ) written in
*C*.