How to solve ordinary differential equation