Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. 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

We are supposed to write a program to solve the following initial value problem numerically using 4th order Runge-Kutta. That algorithm isn't a problem and I can post my solution when I finish.

The problem is, separating it out cleanly into something I can put into Runge-Kutta.



Any ideas what type of ODE this is called? I feel more confident with CS skills and programming numerical methods than I do in math... so any insights into this problem would be helpful.

share|cite|improve this question
up vote 1 down vote accepted

This is called an implicit ODE. One method to solve it would be to convert it into a differential-algebraic equation (DAE) and then use a method for solving DAEs. There are DAE solvers based on Runge-Kutta methods.

Another possibility is to do a nonlinear solve in the function for computing the right-hand side of the ODE. I mean the following. The standard form for ODE solvers is $x' = f(t,x)$ and if you implement a Runge-Kutta method, your program has to be able to evaluate the function $f$. For your equation, $f(t,x)$ is the solution of $e^{-y} = y - x + e^{-t^3}$, seen as an (algebraic) equation in $y$. If you know a method to solve this equation numerically, you can use that inside your Runge-Kutta program.

share|cite|improve this answer

Unless you're prepared to tangle with Lambert's function (if $y=u+\exp(u)$, then $u=y-W(\exp(y))$), you won't be able to use Runge-Kutta on your ODE as it stands.

share|cite|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.