In Hesthaven book (Nodal Discontinuous Galerkin Methods) he uses SSP Runge-Kutta time method which is explicit.

How can I change the explicit RK to an implicit one?

  • $\begingroup$ Why do you want to do so? $\endgroup$ Commented Apr 11, 2017 at 12:26
  • $\begingroup$ oh hello. As in some papers with Gottlieb and C.W. Shu it says that there is restriction in the time step where the CFL comes into play. In my case the dt is really small, like 10^{-7}. I have a different model than the one I mentioned in my first post. $\endgroup$
    – Geo
    Commented Apr 12, 2017 at 10:46

1 Answer 1


You cannot merely adjust an explicit RK scheme into an implicit one, implicit routines are much more involved because each intermediate slope can depend upon slopes 'in the future'. This introduces a (possibly nonlinear) system of equations that needs to be solved within each RK step. That is nowhere to be found in the explicit method you posted above.

If by 'adjustment' to this routine, you are willing to consider adding a solver for the resulting system of equations required by implicit RK methods, then I would say yes it's possible to adjust your routine. That being said, implicit methods are much more involved than explicit methods for this very reason, and I would caution you that it is not a small adjustment.

A good starting point would be looking at how stiff ODEs are solved. I would advise you to implement your own version of a simple implicit method to solve a test problem, and then see for yourself how the explicit method implementated by Hesthaven can be extended to be solved implicitly.

Edit: I found the textbooks by Hairer to be very helpful when I was learning about explicit and implicit RK methods:

Hairer, Solving Ordinary Differential Equations I and II

The first goes over explicit methods and the second goes over implicit ones - both contain examples to compare your own codes to.

Further, if you are want to see how I implemented a few explicit and implicit RK methods, take a look at my github project written in Fortran: github.com/cbcoutinho/generic_rk

  • $\begingroup$ That's also an option instead of writing your own solver. Then you're going to write a wrapper function that combines all of the RK coefficients/slopes to use with fsolve, but the idea is the same. If you need any help feel free to comment. Best of luck! $\endgroup$
    – cbcoutinho
    Commented Apr 12, 2017 at 12:51
  • $\begingroup$ fsolve is just a solver for systems on nonlinear equations. Implicit RK methods usually require a solver like this for the reasons I included in my answer, so instead of writing your own solver you could use fsolve. But that means that inside every RK step, you will need to call fsolve to calculate what all of the intermediate slopes are. I tend to think that Matlab's codes are generally overkill for what I do so I write my own simpler solvers, but it may be easier for you to use fsolve in this case. $\endgroup$
    – cbcoutinho
    Commented Apr 13, 2017 at 12:44
  • $\begingroup$ Hi @Geo, Yes I implemented implicit RK methods in my generic_rk fortran project. If you are not interested in reading Fortran, then I would advise you to look at the textbook examples I mentioned in my answer. $\endgroup$
    – cbcoutinho
    Commented May 11, 2017 at 13:34

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.