Implement general differential equation class