Numerically solving initial value problem