solves for dy/dx in an equation