2
$\begingroup$

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.

$\endgroup$
1
$\begingroup$

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.

$\endgroup$
1
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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