2
$\begingroup$

I am looking for an example of a certain pair of ODEs. Consider two independent ODEs $$ \frac{\partial x}{\partial t} = f(x)\ \text{and}\ \frac{\partial y}{\partial t} = g(y) $$ where $x \in \mathbb{R}^n$ and $y \in \mathbb{R}^m$. Now we combine them into a joint ODE $$ \frac{\partial z}{\partial t} = \begin{pmatrix}f(z_{1:n})\\g(z_{n+1:n+m})\end{pmatrix} $$ where $z = \begin{pmatrix}x&y\end{pmatrix}^T \in \mathbb{R}^{n+m}$.

Is it possible to choose $f$ and $g$ and some initial conditions $x_0$ and $y_0$ in such a way that the combined ODE is markedly stiffer than the separate ones? With increased stiffness I mean here that an explicit solver needs significantly smaller time steps.

$\endgroup$
1
  • 3
    $\begingroup$ If you measure just in number of steps, you could have both systems periodic with segments of stiffness that interleave between the systems. Like two instances of a Vander Pol oscillator that are shifted by 1/4 of a period. $\endgroup$ Jul 16 at 8:56

2 Answers 2

4
$\begingroup$

If by becoming stiffer together, you mean that the time step required for a stable integration with an explicit method of both systems coupled is lower than for each system separately, this can not happen if $f$ and (or) $g$ are not functions of both $y$ and $x$. Otherwise the systems are independent, and the eigenvalues of the coupled systems is simply the union of the eigenvalues of each subsystem.

$\endgroup$
1
  • $\begingroup$ Good point, the stepsize will be approximately the smaller individual stepsize of the two equations. Now, if the first set of equations is huge and large-stepsize integrable, and the second is tiny but requires low stepsize, you'll end up with a huge system with tiny stepsize (at least schematically). One could call this stiffness, in the sense of different time scales (even if it's not the usual case as the stiffness here can naturally be cured by again decoupling the two equations). $\endgroup$
    – davidhigh
    Jul 16 at 12:09
4
$\begingroup$

Stiffness is a concept that asks whether a system of ODEs has widely different time scales. Since a scalar ODE generally has only a single time scale, a scalar ODE can not be stiff. But if you put two ODEs together, the difference of their time scales matters.

So, here is a system of two ODEs that together are stiff: $$ \frac{d}{dt} \begin{pmatrix} x(t) \\ y(t) \end{pmatrix} = \begin{pmatrix} 1 \cdot x(t) \\ 10^6 \cdot y(t) \end{pmatrix} $$

$\endgroup$
6
  • 3
    $\begingroup$ Why can scalar ODEs not be stiff? I thought that $x_t = -\lambda x$ was the prototypical stiff equation where explicit methods needs quite small time steps to remain stable. $\endgroup$
    – Marten
    Jul 15 at 21:32
  • $\begingroup$ I have played around with your proposed system of equations and solved it with RK45 in scipy. However, the number of function evaluations and the size of the time steps seem be the same for the joint system as for just the $y(t)$ equation. From your explanation I would have expected the joint system to require more evaluations / smaller time steps. $\endgroup$
    – Marten
    Jul 15 at 21:35
  • 2
    $\begingroup$ @Marten the scalar ODE $y'=\lambda y'$ can be more clearly seen as stiff if you add time $t$ as an additional variable. Then the system $(y,t)'=(\lambda y, 1)$ has eigenvalues $(\lambda,0)$ which are quite different. The component $t'=1$ is exactly solved by any consistent ODE integration method, but a correct resolution of $y'=\lambda y$ with a typical explicit method requires a time step on the order of $1/\lambda$. Also, stiffness may depend on the integration time. The ODE $y'=10^6 y$ is extremely stiff on the time interval $[0,1]$, but nonstiff on the interval $[0,10^{-9}]$ for instance. $\endgroup$
    – Laurent90
    Jul 15 at 22:09
  • 3
    $\begingroup$ To be more precise, $y'=10^6y$ requires a lot of time steps on $[0,1]$ whereas it does not on $[0,10^{-9}]$. But it is not stiff. Stiff means something different. It means that you need a lot of time steps on a time interval that is a small multiple of a typical time scale. That is the case if the system has multiple time scales, and these time scales differ by a large factor. $\endgroup$ Jul 16 at 0:12
  • 1
    $\begingroup$ @Marten: I would say the solution of a scalar equation can be unstable. As mentioned by Wolfgang, stiffness is a more abstract effect that coupled equations become unstable (maybe although the individual components might be stably solved). $\endgroup$
    – davidhigh
    Jul 16 at 12:17

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.