Write differential equations