Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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.

$$\exp(-x^\prime)=x^\prime-x+\exp(-t^3)$$

$$x(0)=1$$

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|improve this question

2 Answers 2

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|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|improve this answer

Your Answer

 
discard

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.