Python Same Method Differential Equations