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

As far as I understand, the Crank-Nicolson method (a.k.a. trapezoidal method) can be expressed as a second order implicit Runge-Kutta method. It's Butcher tableau is:

 0 |  0    0
 1 | 1/2  1/2
   | 1/2  1/2

And yes these coefficients can be found in:

NDSolve`ImplicitRungeKuttaLobattoIIIACoefficients[2, Infinity]
{{{0, 0}, {1/2, 1/2}}, {1/2, 1/2}, {0, 1}}

But when I try:

NDSolve[{y'[x] == Cos[x], y[0] == 0}, y, {x, 0, 1},
  Method -> {"FixedStep", Method -> {"ImplicitRungeKutta", "DifferenceOrder" -> 2, 
             "Coefficients" -> ImplicitRungeKuttaLobattoIIIACoefficients}},
  StartingStepSize -> 0.1]

I get an error warning:

  Singular coefficient matrix encountered for
  NDSolve`ImplicitRungeKuttaLobattoIIIACoefficients, which is not suitable for stiff systems.

Question: Why this?

(I have Mathematica 8. Also tested on Mathematica 9, same behavior.)

share|improve this question
This might have some useful info:… It doesn't answer the questions about the error message, but it might provide a path to implement a Crank-Nicolson method to use with NDSolve. – chuy Aug 5 '13 at 20:47
up vote 1 down vote accepted

I am quite blind. That was not an error, just a warning. After the warning, Mathematica also gives the solution:

{{y -> InterpolatingFunction[{{0., 1.}}, <>]}}

and that works just fine.

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.