我想用 SciPy
求解分段微分方程组(物理模拟)
这是方程和初始条件(在 Mathematica 中)
https://i.stack.imgur.com/s2ILs.png
但是,它只是部分工作,因为我无法增加 NDSolveValue 的步长以防止错误,因此我想知道是否可以在 Python 中执行此操作。 (或者,如果你能在 Mathematica 中解决这个问题,那也很好。)
这是 Mathematica StackExchange 上的一个类似问题:https://mathematica.stackexchange.com/questions/236893/solving-piecewise-differential-equation