# Implicit and Explicit ODE

I wish to solve the following ODE:

$$\frac{dy}{dt}=f(y) - y$$

$f$ is a nonlinear function of $y$. I found a paper online that solves the ODE using a "second-order backward difference for $\frac{\partial y}{\partial t}$ and a second-order Adams-Bashforth for the explicit treatment of the nonlinear term." These authors arrive at: $$(3+2\Delta t) * y(t+2\Delta t)=4y(t + \Delta t)-y(t)+2\Delta t*[2f(t+ \Delta t)-f(t)]$$ The backwards finite difference expansion of the PDE leads to: $$(3+2\Delta t) * y(t+2\Delta t)=4y(t + \Delta t)-y(t)+2\Delta t*2f(t+ 2\Delta t)$$ I am confused as to how we can combine the Adams-Bashforth method with the backwards finite difference method to arrive at the authors' derived equation. 

EDIT 1:

Now that I understand that the method is called IMEX, I am confused on how we can combine an explicit method and an implicit method. For the above ODE, the implicit backwards finite difference method on the linear term gives: $$3* y(t+2\Delta t)-4y(t + \Delta t)+y(t)=-2\Delta t * y(t+2\Delta t)$$

The Adams-Bashforth explicit method on the nonlinear term gives: $$y(t+2\Delta t) = y(t+\Delta t) + \Delta t*[(3/2)*f(t+\Delta t) - (1/2)*f(t)]$$

How can we combine these two finite difference methods into one IMEX equation? What algebraic manipulations must we perform?

 EDIT 2:

So the IMEX method of a second order backward finite difference and an Adams-Bashforth would give:

$$\frac{3* y(t+2\Delta t)-4y(t + \Delta t)+y(t)}{2\Delta t}=\underbrace{-y(t+2\Delta t)}_\text{Implict} + \underbrace{[(3/2)*f(t+\Delta t) - (1/2)*f(t)]}_\text{Adams-Bashforth}$$

Yet the authors in https://www.sciencedirect.com/science/article/pii/S001046559700115X use the same IMEX method and get (equation 9): $$\frac{3 * y(t+2\Delta t)-4y(t + \Delta t)+y(t)}{2 \Delta t}=\underbrace{-y(t+2\Delta t)}_\text{Implicit}+\underbrace{[2f(t+ \Delta t)-f(t)]}_\text{Adams-Bashforth}$$

Am I missing something or is the paper incorrect?

First, it is not a PDE you have but an ODE. Secondly, what you have written about what the authors wrote in some paper makes no sense to me as you haven't provided any context.

However, it seems that you need help in understanding what an IMEX (implicit/explicit) approach is. In an IMEX method, you treat the linear terms of your DE with an implicit numerical scheme (in the example you gave, they used backwards difference) and the nonlinear terms with an explicit scheme (Adams-Bashforth) so that you have a linear algebraic equation to solve at each step.

For example, if we have an ODE of the form

$$y' = L(y,t) + N(y,t)$$

where $L$ is a function of the linear terms and $N$ a function of the nonlinear terms. Then applying an IMEX approach would yield

$$\frac{y_{n+1} - y_{n}}{\Delta t} = \underbrace{L(t_{n+1}, y_{n+1})}_{\text{Implicitly done}} + \underbrace{N(t_{n}, y_{n})}_{\text{Explicitly done}} \quad (*)$$

where $y_{n} = y(t_{n})$ is the value of $y$ at the $n^{th}$ timestep. Rearranging, we can write $(*)$ as

\begin{align} y_{n+1} - \Delta t \cdot L(t_{n+1}, y_{n+1}) = y_{n} + \Delta t \cdot N(t_{n}, y_{n}) \end{align}

and using the linearity of $L$ means we can factor the $y_{n+1}$ term from $L$ and make it the subject

\begin{align} y_{n+1} (1 - \Delta t \cdot L^{*}(t_{n+1})) &= y_{n} + \Delta t \cdot N(t_{n}, y_{n}) \\\\ \implies y_{n+1} &= \frac{y_{n} + \Delta t \cdot N(t_{n}, y_{n})}{1 - \Delta t \cdot L^{*}(t_{n+1})} \end{align}

where $L^{*}$ just denotes a linear operator that is different from $L$. As a particular example, consider the ODE you gave

$$y' = f(y) - y$$

where $f(y) = \sin(y)$ (hence $f$ is nonlinear). Then if we were to use a backwards difference (implicit) on the linear term $y$ and a forward difference (explicit) on the nonlinear term $\sin(y)$, then we would get

\begin{align} \frac{y_{n+1} - y_{n}}{\Delta t} &= \sin(y_{n}) - y_{n+1} \\\\ \implies y_{n+1} - \Delta t y_{n+1} &= y_{n} + \Delta t \sin(y_{n}) \\\\ \implies y_{n+1} &= \frac{y_{n} + \Delta t \sin(y_{n})}{1 - \Delta t} \end{align}

Edit

I was asked to apply the Adams-Bashforth method to the nonlinear term. The two step AB scheme for the ODE $y'= g(t,y)$ is given by

$$\frac{y_{n+2} - y_{n+1}}{\Delta t} = \frac{3}{2} g(t_{n+1}, y_{n+1}) - \frac{1}{2} g(t_{n}, y_{n})$$

Applying this to the given ODE $y' = f(y) - y$, using AB on the nonlinear term only and backward difference on the linear term, yields

\begin{align} \frac{y_{n+2} - y_{n+1}}{\Delta t} &= \underbrace{\frac{3}{2} f(t_{n+1}, y_{n+1}) - \frac{1}{2} f(t_{n}, y_{n})}_{\text{Adams-Bashforth}} - \underbrace{y_{n+2}}_{\text{Backward}} \\\\ \implies y_{n+2} + \Delta t \cdot y_{n+2} &= y_{n+1} + \frac{3 \Delta t}{2} f(t_{n+1}, y_{n+1}) - \frac{\Delta t}{2} f(t_{n}, y_{n}) \\\\ \implies y_{n+2} &= \frac{y_{n+1} + 3 \gamma f(t_{n+1}, y_{n+1}) - \gamma f(t_{n}, y_{n})}{1 + \Delta t} \qquad \text{with $\gamma = \Delta t/2$} \end{align}

Edit 2

This is in response to the last comment. The authors of the paper cited use a second order BDF scheme on the linear term, two step AB on the nonlinear term. Because an explicit scheme isn't dependent on the future time step, the authors discretise the derivative $y'$ using the BDF formula. Hence, you should get

\begin{align} \underbrace{\frac{3y_{n+2} - 4y_{n+1} + y_{n}}{2 \Delta t}}_{\text{BDF on $y'$}} &= \underbrace{\frac{3}{2} f(t_{n+1}, y_{n+1}) - \frac{1}{2} f(t_{n}, y_{n})}_{\text{Adams-Bashforth on $f(y)$}} - \underbrace{y_{n+2}}_{\text{BDF on $y$}} \\\\ \implies 3y_{n+2} - 4y_{n+1} + y_{n} &= 2 \Delta t \left[ \frac{3}{2} f(t_{n+1}, y_{n+1}) - \frac{1}{2} f(t_{n}, y_{n}) - y_{n+2} \right] \\\\ \implies (3 + 2 \Delta t)y_{n+2} &= 4y_{n+1} - y_{n} + 2 \Delta t \left[ \frac{3}{2} f(t_{n+1}, y_{n+1}) - \frac{1}{2} f(t_{n}, y_{n}) \right] \end{align}

Note that the bracketed term on the RHS above doesn't match the paper, so unless the authors were using some modified AB formula, I believe there is a typo in the paper.

• Thank you for your response. I am still a little confused on how we can do higher order approximations using the IMEX method. Could you please walk me through such a derivation? For example, let us consider $\frac{dy}{dt} = f(y)-y$. The implicit backwards finite difference method on the linear term gives $3* y(t+2\Delta t)-4y(t + \Delta t)+y(t)=-2\Delta t * y(t+2\Delta t)$. The Adams-Bashforth explicit method on the nonlinear term gives $y(t+2\Delta t) = y(t+\Delta t) + \Delta t*[(3/2)*f(t+\Delta t) - (1/2)*f(t)]$. How can we combine these two finite difference methods into one IMEX equation? – Geoffrey Xiao Apr 11 '18 at 22:08
• @GeoffreyXiao See edit. – mattos Apr 11 '18 at 22:44
• Thank you again for your comments. I have one more question which I have added as an edit to my original question. In essence, the paper I reference uses the same IMEX method to get a different result, which I am confused about. – Geoffrey Xiao Apr 12 '18 at 3:14
• @GeoffreyXiao Next time you ask a question, you need to provide more context than what you did. We could have saved ourselves a lot of time if you had given the paper or copied/pasted what the authors wrote. I'll make an edit to my post now. – mattos Apr 12 '18 at 3:33