Use differential equations in models (#580)