NDSolve::ntdv NDSolveValue::ntdv ParametricNDSolve::ntdv ParametricNDSolveValue::ntdv
Details
-
- This message is generated when NDSolve is unable to solve for the derivatives in a differential equation.
- NDSolve uses Solve to solve symbolically for the derivatives in a differential equation.
- This error will occur if the equations do not have a solution, or if it is not possible to solve for the derivatives by algebraic methods.
- In some cases this error can be handled by solving for the derivatives separately and using those solutions in the input to NDSolve.
- Off[message] switches off the message; On[message] switches it on. For example: Off[NDSolve::ntdv].
Examples
Basic Examples (1)
For differential algebraic equations, NDSolve tries to explicitly solve for the highest-order derivative but may fail due to the time constraint imposed for performing symbolic computations:
eqns = { x'[t] + y'[t] ^ 2 + z'[t] ^ 2 == Sin[t], x'[t] y'[t] + z'[t] == Sin[t] + x[t], x'[t] + z'[t] == y[t] + Cos[t]};
ics = {x[0] == 1, y[0] == -1, z[0] == 1};
NDSolve[{eqns, ics}, {x, y, z}, {t, 0, 1}];The message suggests using Method{"EquationSimplification""Residual"}. This does work, but it does not find all solutions:
NDSolve[{eqns, ics}, {x, y, z}, {t, 0, 1}, Method -> {"EquationSimplification" -> "Residual"}]Increase the time constraint needed to get an explicit formulation:
Short[NDSolve[{eqns, ics}, {x, y, z}, {t, 0, 1}, Method -> {"EquationSimplification" -> {"Solve", "TimeConstraint" -> 10}}], 2]Use the "StiffnessSwitching" time-integration method to avoid stiffness issues:
NDSolve[{eqns, ics}, {x, y, z}, {t, 0, 1}, Method -> {"TimeIntegration" -> "StiffnessSwitching", "EquationSimplification" -> {"Solve", "TimeConstraint" -> 10}}]