function [ x, t ] = RK2ndO_1ODE( t0, x0, tN, N, f )
%UNTITLED2 Summary of this function goes here
%   Detailed explanation goes here
t1=t0;
t=linspace(t1, tN, N);
dt=t(2)-t(1);

x(1)=x0;
for i=2:N
    % the first guess of the central point is done by
    % first order Euler
    xc=x(i-1)+(dt/2)*f(x(i-1),t(i-1));
    x(i)=x(i-1)+dt* f(xc,t(i-1)+dt/2);
end

end