Optimized neural forms for solving ordinary differential equations