For some sets of constants, NDSolve gives me true solutions, but when I try for example, T = 1/(2*2200), Mathematica does not respond. What can I do? The code below has no problem, but I need to change the constants defined at the beginning of the code and see the results. Any suggestions?

Io = 3.38*10^-12
NS = 8
Cp = 90*10^-15
Cs = 30*10^-15
T = 1/(2*2100)
ss = 51.23*10^-3
dV = 0.45
Cl = 1*10^-12
V = 0.3

\[Beta] = (2*Io)/((Cs + Cp)*ss)

a = \[Beta]*T
b = \[Beta]*T/2
c = Cl/((Cs + Cp)/(2 T))
d = Io/((Cs + Cp) /(2 T))

s = NDSolve[
  {Vo[t] == V + 
      Log[b/(E^((c*Vo'[t] + d)/ss) - 1)] ss + 
      Log[(b* E^((dV + c*Vo'[t] + d)/ss))/(E^((c*Vo'[t] + d)/ss) - 1)] ss + 
      Log[(a* E^((dV + c*Vo'[t] + d)/ss))/(E^((2*(c*Vo'[t] + d))/ss) - 1)] ss (NS-1),
   Vo[0] == 0.3
  {t, -0.0001, 1}]  

Plot[Evaluate[Vo[t] /. s], {t, -0.0001, 1}, PlotRange -> All]
  • 1
    $\begingroup$ Specifying the option SolveDelayed -> True will rectify this. I have very little experience with NDSolve and so am not completely sure what the problem is or why this solves it, hence not posting this as an answer. Hopefully someone else can expand on the issue. $\endgroup$ Commented Mar 24, 2013 at 1:14
  • $\begingroup$ This solved the problem. At first, I only added this line, and it worked for values between 2200 and 4500, then it required initial value of derivative for bigger values . After giving that value, the problem is solved. Thanks. $\endgroup$
    – ozmenc
    Commented Mar 24, 2013 at 11:47

1 Answer 1


In version 9 you get either one of two warning but a solution is found without any options. The warning reads:

NDSolveValue::ndsdtc: The time constraint of 1.` seconds was exceeded trying to solve for derivatives, so the system will be treated as a system of differential-algebraic equations. You can use Method->{"EquationSimplification"->"Solve"} to have the system solved as ordinary differential equations.

The second warning:

NDSolveValue::ntdvdae: Cannot solve to find an explicit formula for the derivatives. NDSolve will try solving the system as differential-algebraic equations.

This also explains why SolveDelayed->True works in previous versions. With this specified, the solver goes to a DAE solver which is able to solve the equation.

  • $\begingroup$ Okay, but why is the DAE solver able to work without explicit derivatives whereas the ordinary solver isn't? The documentation suggests that the difficulty is one of finding appropriate initial values and that, when using the DAE solver, "NDSolve first searches for initial conditions that satisfy the equations, using a combination of Solve and a procedure much like FindRoot". Merely mentioning "a procedure much like FindRoot" doesn't exactly explain much (including why this approach is specific to the DAE solver), so that's why I was hoping for a more enlightening answer. $\endgroup$ Commented Mar 24, 2013 at 10:35
  • 1
    $\begingroup$ @OleksandrR. I don't know if this answers your question, but the reason FindRoot or something like it comes into play is this: the first-order DAE is equivalent to a second-order differential equation obtained by taking $d/dt$ on both sides. Since the order increased, we need an additional initial condition (for Vo'[0]). But the latter is not at our disposal because the original DAE fixes it via the value of V which got killed in the $d/dt$. This is where FindRoot comes in to determine what the correct Vo'[0] is. Then the 2nd order diff. eqn. can be solved as usual. $\endgroup$
    – Jens
    Commented Mar 25, 2013 at 4:47
  • $\begingroup$ Got it. Thank you, @Jens. So, the real problem is that the OP didn't specify an initial value for Vo'[0], even though NDSolve was able to work around this by transforming the problem. $\endgroup$ Commented Mar 25, 2013 at 4:48
  • $\begingroup$ @OleksandrR., you may want to have a look here for an overview of DAEs and their solution in M. Additionally, the value of Vo'[-0.0001] must also be consistent - a highly non trivial problem generally. @Jens, thanks for the explanation. $\endgroup$
    – user21
    Commented Mar 25, 2013 at 5:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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