Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Mathematica 8

NDSolve[{x[t] == 1, x[0] == 1}, x[t], {t, 0, 10}]

solves fine and returns


while Mathematica 9 raises

NDSolve::derivs: No derivatives of dependent variables were found in the equations. NDSolve is designed to solve differential or differential algebraic equations. Use NSolve or FindRoot to numerically solve algebraic equations. >>

I get the point, but is there maybe a way to restore the old behavior via NDSolve's options system?

share|improve this question
Why would you want to restore the old behaviour? – user21 Apr 18 '13 at 4:47
These type of equations systems come from model descriptions (not my own; why would anyone describe such a pointless system, right?) and I would like to be able to reliable solve them (without manual intervention). Anyways, I hacked my way around it (see my answer, which I will not accept ...). – phantomas1234 Apr 18 '13 at 16:58

This is not a real answer to my own question because I am not restoring NDSolve's old behavior. I am posting it in the (unlikely) case anyone has the same problem and is looking for a solution. The following function


catches NDSolve::derivs and switches to NSolve to calculate a solution. So,

catchMissingDeriv[Hold[NDSolve[{x[t] == 1, x[0] == 1}, x[t], {t, 0, 10}]]]

will return

{{x[t] -> 1.}}
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.