NDSolve::ndstf NDSolveValue::ndstf ParametricNDSolve::ndstf ParametricNDSolveValue::ndstf
Examples
Basic Examples (1)
An unfortunate method choice leads to the message:
eqns = {Derivative[1][Subscript[Y, 1]][T] == -(1/25) Subscript[Y, 1][T] + 10000 Subscript[Y, 2][T] Subscript[Y, 3][T], Derivative[1][Subscript[Y, 2]][T] == (Subscript[Y, 1][T]/25) - 30000000 Subscript[Y, 2][T]^2 - 10000 Subscript[Y, 2][T] Subscript[Y, 3][T], Derivative[1][Subscript[Y, 3]][T] == 30000000 Subscript[Y, 2][T]^2};
conds = {Subscript[Y, 1][0] == 1, Subscript[Y, 2][0] == 0, Subscript[Y, 3][0] == 0};
NDSolve[{eqns, conds}, {Subscript[Y, 1][T], Subscript[Y, 2][T], Subscript[Y, 3][T]}, {T, 0, 3 / 10}, Method -> "ExplicitRungeKutta"];The system appears to be stiff at the given point, and Method "StiffnessSwitching" should help:
NDSolve[{eqns, conds}, {Subscript[Y, 1][T], Subscript[Y, 2][T], Subscript[Y, 3][T]}, {T, 0, 3 / 10}, Method -> "StiffnessSwitching"]In fact, the Automatic method is often able to identify that the system is stiff and use "StiffnessSwitching" automatically:
NDSolve[{eqns, conds}, {Subscript[Y, 1][T], Subscript[Y, 2][T], Subscript[Y, 3][T]}, {T, 0, 3 / 10}]