NDSolve::svnder NDSolveValue::svnder ParametricNDSolve::svnder ParametricNDSolveValue::svnder

更多信息

  • This message is generated when trying to set highest-order derivatives with WhenEvent.
  • Off[message] switches off the message; On[message] switches it on. For example: Off[NDSolve::svnder].

范例

基本范例  (2)

The highest-order derivatives cannot be set with WhenEvent directly:

As the message indicates, Method{"EquationSimplification""Residual"} is an alternative:

In some cases, Method{"EquationSimplification""Residual"} is an not an alternative. Consider this system:

One way to modify the actual equations is to make use of DiscreteVariables to switch on or off components of the overarching equation:

Visualize the solution:

A simpler way to proceed is to have NDSolve automatically insert the WhenEvent:

Visualize the solution: