# Matched Asymptotic Expansions with Logarithmic Terms
[motivation]
## Motivation
### The problem: differential equations we cannot solve exactly
Many differential equations in physics and engineering contain a small parameter $\epsilon$ — a dimensionless number measuring the ratio of two disparate scales. For example, $\epsilon$ might be the ratio of the thickness of a fluid [boundary](/page/Boundary) layer to the length of an airfoil, or the ratio of a reaction rate to a diffusion rate. When $\epsilon$ is small, we would like to exploit this smallness to find an approximate solution: rather than solving the full equation exactly (which is often impossible), we seek an *asymptotic approximation* — an expression that becomes increasingly accurate as $\epsilon \to 0$.
The most natural attempt is to expand the solution as a [power series](/page/Power%20Series) in $\epsilon$:
\begin{align*}
y(x;\epsilon) \sim y_0(x) + \epsilon \, y_1(x) + \epsilon^2 \, y_2(x) + \cdots
\end{align*}
Substituting into the differential equation and matching powers of $\epsilon$ produces a hierarchy of simpler equations for $y_0, y_1, \ldots$ This is called a **regular perturbation expansion**, and it works beautifully when the character of the equation does not change as $\epsilon \to 0$.
### When regular perturbation fails: singular perturbation
But sometimes setting $\epsilon = 0$ fundamentally changes the equation. The most common scenario is when $\epsilon$ multiplies the highest-order derivative: for instance, in
\begin{align*}
\epsilon \, y'' + y' + y = 0, \qquad y(0) = 0, \quad y(1) = 1,
\end{align*}
setting $\epsilon = 0$ reduces the equation from second order to first order. A first-order equation can satisfy only *one* boundary condition, not two. No matter how we choose $y_0$, the leading-order approximation will fail to satisfy one of the boundary conditions. The error is not small — the approximation is completely wrong near one of the boundaries. This is a **singular perturbation**.
What happens physically is that the solution develops a **boundary layer**: a thin region (of width proportional to some power of $\epsilon$) where the solution changes rapidly, transitioning between the value forced by the boundary condition and the value predicted by the "outer" approximation that ignores that boundary condition. Outside this thin layer, the regular perturbation expansion works fine; *inside* the layer, a completely different approximation is needed.
### The method of [matched asymptotic expansions](/page/Matched%20Asymptotic%20Expansions)
The strategy for solving singular perturbation problems is to construct *two separate approximations*:
**The outer expansion** is the regular perturbation expansion valid away from the boundary layer. It satisfies the differential equation (with $\epsilon = 0$) and the boundary conditions that are *not* in the layer.
**The inner expansion** is obtained by "zooming in" on the boundary layer. We introduce a rescaled variable $\xi = x/\delta(\epsilon)$, where $\delta(\epsilon)$ is the boundary-layer width. In terms of $\xi$, the thin layer becomes an $O(1)$ region, and the equation takes a new form that retains the highest derivative. The inner expansion satisfies this rescaled equation and the boundary condition that lies inside the layer.
Neither approximation is valid everywhere. The outer expansion breaks down inside the boundary layer, and the inner expansion breaks down far from it. But there is an **overlap region** — the zone where $x$ is small (so the outer expansion is near its [limit](/page/Limit) of validity) but $\xi$ is large (so the inner expansion is near its limit of validity). In this overlap region, both approximations must agree. This requirement, called **asymptotic matching**, determines the free constants that were left undetermined by the boundary conditions alone. Together, the matched inner and outer expansions provide an accurate approximation across the entire domain.
### Why logarithms cause special trouble
The standard matching procedure works smoothly when the inner solution, expanded for large $\xi$, grows as a *power* of $\xi$ — say, $Y \sim C\xi$ as $\xi \to \infty$. Re-expressed in terms of the outer variable $x = \delta \xi$, this becomes $C x/\delta$, and matching against the outer expansion is straightforward because powers of $\delta$ and powers of $\epsilon$ sit at well-separated asymptotic orders.
But some problems produce inner solutions that grow only *logarithmically*: $Y \sim C \ln \xi$ as $\xi \to \infty$. This is where things become subtle. To see why, consider what happens when we re-express $\ln \xi$ in terms of the outer variable. If $\xi = x/\epsilon$, then
\begin{align*}
\ln \xi = \ln \frac{x}{\epsilon} = \ln x - \ln \epsilon.
\end{align*}
The term $\ln \epsilon$ is large (it diverges as $\epsilon \to 0$), but it diverges only *logarithmically* — much more slowly than any negative power of $\epsilon$. It sits at an awkward intermediate asymptotic order: it is larger than any constant, yet smaller than $1/\epsilon$. This means the inner and outer expansions cannot be matched order by order in the usual way. The inner solution's logarithmic growth forces the outer expansion to include terms at "unexpected" orders — terms proportional to $1/\ln \epsilon$, $1/\ln^2 \epsilon$, etc. — that do not appear in a standard power series. This phenomenon is called **switchback**, because matching at one order "switches back" and forces corrections at a nominally higher order.
This page explains how to handle these logarithmic complications, through two detailed examples that illustrate both the difficulty and its resolution.
[/motivation]
## The Key Idea: Generalised Expansions
Rather than trying to track every logarithmic sub-order separately (which leads to a proliferating number of terms), the preferred approach is to **group terms by algebraic order** and allow the coefficients to depend on $\ln \epsilon$.
What does "algebraic order" mean? When logarithms are present, the clean power-[series](/page/Series) hierarchy $1 \gg \epsilon \gg \epsilon^2 \gg \cdots$ is replaced by a finer [sequence](/page/Sequence):
\begin{align*}
\underbrace{\cdots \gg \ln\epsilon \gg 1 \gg \frac{1}{\ln\epsilon} \gg \frac{1}{\ln^2\epsilon} \gg \cdots}_{\text{algebraic order } \epsilon^0} \quad \gg \quad \underbrace{\cdots \gg \epsilon\ln\epsilon \gg \epsilon \gg \frac{\epsilon}{\ln\epsilon} \gg \cdots}_{\text{algebraic order } \epsilon^1} \quad \gg \quad \cdots
\end{align*}
Within each group, successive terms differ by a factor of $1/\ln\epsilon$ — a gap that shrinks very slowly. Between [groups](/page/Group), the gap is a full factor of $\epsilon$ — a genuine asymptotic separation. "Matching at algebraic order" means drawing the dividing lines at the **big gaps** and lumping everything within each group together. The coefficient $a_0(\epsilon)$ is allowed to depend on $\ln\epsilon$ precisely because it encodes the entire internal structure of its algebraic-order bucket, and matching determines it in one equation rather than order by order.
Concretely, instead of writing
\begin{align*}
y \sim y_{0,0}(x) + \frac{1}{\ln \epsilon}\,y_{0,1}(x) + \epsilon \ln \epsilon \, y_{1,0}(x) + \epsilon \, y_{1,1}(x) + \cdots,
\end{align*}
which becomes unwieldy, we write
\begin{align*}
y(x;\epsilon) \sim y_0(x;\epsilon) + \epsilon \, y_1(x;\epsilon) + \epsilon^2 \, y_2(x;\epsilon) + \cdots,
\end{align*}
where each $y_k(x;\epsilon)$ is allowed to depend on $\ln \epsilon$ (but *not* on powers of $\epsilon$). For example, $y_0$ might turn out to be $x + 1 - (\ln x)/\ln \epsilon$. The key point is that at each algebraic order there is only one term to manage, and Van Dyke's matching principle can be applied to these generalised expansions without modification — provided we never try to match at an intermediate logarithmic order. That is, we can match to order $1$, or order $\epsilon$, or order $\epsilon^2$, but *never* to order $\epsilon \ln \epsilon$ on its own.
[remark: Why Generalised Expansions Are Legitimate]
A natural concern is whether allowing $y_0(x;\epsilon)$ to depend on $\ln\epsilon$ changes the differential equation it satisfies. It does not. The ODE involves [derivatives](/page/Derivative) with respect to the spatial variable $x$ (or the inner variable $\xi$) only — $\epsilon$ is a parameter, not a variable being differentiated. So any $\epsilon$-dependent factor that multiplies the solution passes straight through the differential operator.
For example, if the leading-order inner equation is $Y_0'' + Y_0' = 0$ and we write $Y_0(\xi;\epsilon) = A_0(\epsilon)\ln(1+\xi)$, then
\begin{align*}
Y_0'' + Y_0' = A_0(\epsilon)\bigl[(\ln(1+\xi))'' + (\ln(1+\xi))'\bigr] = A_0(\epsilon) \cdot 0 = 0
\end{align*}
regardless of what $A_0(\epsilon)$ is. The differential operator acts on $\xi$; the factor $A_0(\epsilon)$ is just a constant as far as $\partial/\partial\xi$ is concerned.
In a standard Poincaré expansion, the gauge [functions](/page/Function) $\mu_k(\epsilon)$ carry the $\epsilon$-dependence and the coefficient functions $y_k(x)$ are $\epsilon$-independent. A generalised expansion simply absorbs some of the gauge-function structure (specifically, the $\ln\epsilon$-dependent part) into the coefficient: instead of separating $\frac{1}{\ln\epsilon}\hat{Y}_0(\xi) + \frac{1}{\ln^2\epsilon}\hat{Y}_1(\xi) + \cdots$ into infinitely many logarithmic sub-orders, we package them all as $A_0(\epsilon)\,f(\xi)$ where $A_0$ is determined by matching. The ODEs at each algebraic order are identical to those in the standard approach — only the bookkeeping of integration constants changes.
[/remark]
## Example I: A Linear Problem with a Degenerate Operator
[example: Linear Boundary-Value Problem with Logarithmic Switchback]
Consider the boundary-value problem
\begin{align*}
(\epsilon + x)\frac{d^2 y}{dx^2} + \frac{dy}{dx} = 1, \qquad y(0) = 0, \quad y(1) = 2, \qquad \epsilon \searrow 0.
\end{align*}
### Step 1: Try the outer expansion
Setting $\epsilon = 0$ gives $x \, y_0'' + y_0' = 1$, which has general solution
\begin{align*}
y_0 = x + a_0 \ln x + b_0.
\end{align*}
Notice something important: the equation is *still second order* after setting $\epsilon = 0$ — the order has not been reduced. So why can't the outer solution satisfy both boundary conditions? The reason is that the operator $x \, d^2/dx^2 + d/dx$ is **degenerate at $x=0$**: its leading coefficient vanishes there. The general solution involves $\ln x$, which diverges as $x \to 0$. If we demand $y_0(0) = 0$ and $y_0(1) = 2$, we need $a_0 = 0$ (to avoid the logarithmic divergence) and then $b_0 = 0$ and $b_0 = 1$ simultaneously — a contradiction.
The resolution: a boundary layer forms at $x = 0$, of width $O(\epsilon)$, where the $\epsilon \, y''$ term regularises the degenerate operator. We apply only the condition at $x = 1$ to the outer expansion, giving $b_0 = 1$:
\begin{align*}
y_0(x;\epsilon) = x + 1 + a_0(\epsilon)\ln x,
\end{align*}
where we allow $a_0$ to depend logarithmically on $\epsilon$ (this is the generalised-expansion philosophy).
### Step 2: The inner expansion
Zooming in on the boundary layer by writing $x = \epsilon \xi$, the equation becomes
\begin{align*}
(1+\xi)Y_0'' + Y_0' = 0, \qquad Y_0(0) = 0,
\end{align*}
with solution $Y_0(\xi;\epsilon) = A_0(\epsilon)\ln(1+\xi)$.
The crucial observation: as $\xi \to \infty$, the inner solution grows like $A_0 \ln \xi$, which is *logarithmic*. This is much slower than algebraic growth, and it is the source of all the complications that follow.
### Step 3: Why naive matching fails
To see the difficulty concretely, introduce an intermediate variable $\eta = x/\epsilon^\alpha$ with $0 < \alpha < 1$, so that $x = \epsilon^\alpha \eta$ and $\xi = \epsilon^{\alpha-1}\eta$. Expanding both approximations in the intermediate region:
\begin{align*}
y_0 &\sim \alpha \, a_0 \ln \epsilon + a_0 \ln \eta + 1, \\
Y_0 &\sim A_0(\alpha - 1)\ln \epsilon + A_0 \ln \eta.
\end{align*}
Comparing $\ln \eta$ coefficients gives $a_0 = A_0$. Comparing $\ln \epsilon$ coefficients gives $\alpha \, a_0 = (\alpha - 1)A_0$. Substituting $a_0 = A_0$, we get $\alpha A_0 = (\alpha - 1)A_0$, which forces $A_0 = 0$. But $A_0 = 0$ makes the inner solution trivially zero — it cannot satisfy $y(0) = 0$ in a nontrivial way.
The way out is to recognise that the matching *can* work if $a_0 = A_0 = -1/\ln\epsilon$. Then the $\ln\epsilon$ terms become $-\alpha$ and $-(\ \alpha - 1)$... which still do not match! But this is because we are trying to match one-term expansions. The point is that the leading inner solution is $O(1/\ln\epsilon)$ — logarithmically small — and its logarithmic growth forces terms at the order $1/\ln\epsilon$ into the outer expansion. This is the switchback.
### Step 4: Carry out the generalised expansion to $O(\epsilon)$
Working with generalised expansions from the start:
\begin{align*}
y^{\text{outer}} &\sim y_0(x;\epsilon) + \epsilon \, y_1(x;\epsilon), \\
Y^{\text{inner}} &\sim Y_0(\xi;\epsilon) + \epsilon \, Y_1(\xi;\epsilon).
\end{align*}
**Leading outer:** $y_0 = x + 1 + a_0(\epsilon)\ln x$ (as before).
**$O(\epsilon)$ outer:** The equation $x\,y_1'' + y_1' = -y_0''$ with $y_1(1) = 0$ gives
\begin{align*}
y_1(x;\epsilon) = a_0(\epsilon)\!\left(\frac{1}{x} - 1\right) + a_1(\epsilon)\ln x.
\end{align*}
**Leading inner:** $Y_0 = A_0(\epsilon)\ln(1+\xi)$ (as before).
**$O(\epsilon)$ inner:** The equation $(1+\xi)Y_1'' + Y_1' = 1$ with $Y_1(0)=0$ gives
\begin{align*}
Y_1(\xi;\epsilon) = A_1(\epsilon)\ln(1+\xi) + \xi - \ln(1+\xi).
\end{align*}
### Step 5: Van Dyke matching
We re-expand the two-term outer expansion for $\xi$ fixed (substitute $x = \epsilon\xi$, expand to algebraic order $\epsilon$) and the two-term inner expansion for $x$ fixed (substitute $\xi = x/\epsilon$, expand to algebraic order $\epsilon$). Demanding these agree gives:
\begin{align*}
a_0 = A_0 = -\frac{1}{\ln\epsilon}, \qquad a_1 = A_1 - 1 = -\frac{1}{\ln^2\epsilon}.
\end{align*}
All four free constants are now determined. The final matched expansions are:
\begin{align*}
y^{\text{outer}} &\sim 1 + x - \frac{\ln x}{\ln\epsilon} + \frac{\epsilon}{\ln\epsilon}\!\left(1 - \frac{1}{x}\right) - \frac{\epsilon\ln x}{\ln^2\epsilon}, \\[6pt]
Y^{\text{inner}} &\sim -\frac{\ln(1+\xi)}{\ln\epsilon} + \epsilon\!\left[\xi - \frac{\ln(1+\xi)}{\ln^2\epsilon}\right],
\end{align*}
with errors algebraically small compared to the last retained term. Notice the characteristic signature of logarithmic switchback: the coefficients involve inverse powers of $\ln\epsilon$ rather than powers of $\epsilon$.
[/example]
## Example II: A Nonlinear Problem
[example: Nonlinear Problem with Logarithmic Boundary Layer]
Consider
\begin{align*}
x^2 y'' - \epsilon \, y \, y' = 0, \qquad y(0) = 1, \quad y(1) = 0, \qquad \epsilon \searrow 0.
\end{align*}
This problem illustrates a different mechanism: the leading-order outer solution has no difficulty satisfying both boundary conditions. The trouble appears at the *next* order.
### Step 1: Outer expansion
At $O(1)$, the equation $x^2 y_0'' = 0$ yields $y_0 = 1 - x$, which satisfies $y_0(0) = 1$ and $y_0(1) = 0$ perfectly. So far, no singular behaviour.
At $O(\epsilon)$, the equation becomes $x^2 y_1'' = y_0 y_0' = -(1-x)$ with $y_1(0) = y_1(1) = 0$. Solving and applying the condition at $x = 1$:
\begin{align*}
y_1 = a_1 x + 1 - a_1 + x\ln x + \ln x - x.
\end{align*}
Now the problem reveals itself: $\ln x \to -\infty$ as $x \to 0$, so $y_1(0)$ diverges and the boundary condition there cannot be satisfied. A boundary layer of width $O(\epsilon)$ forms at $x = 0$. We allow $a_1 = a_1(\epsilon)$ and proceed with the generalised outer expansion.
### Step 2: Inner expansion
Setting $x = \epsilon\xi$ and noting that $y \to 1$ as $x \to 0$ (from the outer limit), we write $Y \sim 1 + \epsilon Y_1$. This linearises the equation to
\begin{align*}
\xi^2 Y_1'' - Y_1' = 0, \qquad Y_1(0) = 0.
\end{align*}
The solution involves an [integral](/page/Integral):
\begin{align*}
Y_1(\xi;\epsilon) = A(\epsilon)\int_\infty^{1/\xi} u^{-2}e^{-u}\,du.
\end{align*}
For large $\xi$ (small $\rho = 1/\xi$), [integration by parts](/theorems/210) gives
\begin{align*}
\int_\infty^{\rho} u^{-2}e^{-u}\,du = \rho^{-1} + \ln\rho + \gamma - 1 + O(\rho),
\end{align*}
where $\gamma$ is the Euler–Mascheroni constant. The presence of $\ln\rho = -\ln\xi$ in this expansion means the inner solution has logarithmic growth — exactly the situation that produces switchback.
### Step 3: Matching
Re-expanding outer for $\xi$ fixed: $\;y^{\text{outer}} \sim 1 - \epsilon\xi + \epsilon\{1 - a_1 + \ln\epsilon + \ln\xi\}$.
Re-expanding inner for $x$ fixed: $\;Y^{\text{inner}} \sim 1 + A\epsilon\xi - \epsilon A\ln\xi + \epsilon A(\gamma - 1)$.
Comparing term by term determines $A = -1$ and $a_1(\epsilon) = \ln\epsilon + \gamma$. Note that $A$ turned out to be a pure number — only $a_1$ needed logarithmic dependence on $\epsilon$.
**Final result:**
\begin{align*}
y^{\text{outer}} &\sim 1 - x + \epsilon\ln\epsilon\,(x-1) + \epsilon\bigl[(x+1)\ln x + (\gamma - 1)x + (1-\gamma)\bigr], \\[6pt]
Y^{\text{inner}} &\sim 1 - \epsilon\int_\infty^{1/\xi} u^{-2}e^{-u}\,du.
\end{align*}
[/example]
## Summary of the Strategy
The procedure for problems with logarithmic boundary layers can be summarised in four steps.
**Diagnose the problem.** After constructing the leading-order outer solution, check whether it involves $\ln x$ terms that diverge at the boundary. If so, a boundary layer is needed. Zoom in with $x = \epsilon\xi$ and solve the inner equation. If the inner solution grows like $\ln\xi$ for large $\xi$, logarithmic switchback will occur.
**Use generalised expansions.** Organise inner and outer expansions by *algebraic* powers of $\epsilon$, allowing each coefficient to depend on $\ln\epsilon$. This avoids proliferating terms and keeps the matching tractable.
**Match at algebraic orders only.** Apply Van Dyke matching between the inner and outer expansions, re-expanding each in terms of the other's variable. The crucial rule is to **never cut between logarithms**: match to full algebraic orders ($1$, $\epsilon$, $\epsilon^2$, ...) only, never to intermediate orders like $\epsilon\ln\epsilon$ alone.
**Determine the constants.** The matching conditions yield equations for the free constants, which may themselves be functions of $\ln\epsilon$. The appearance of factors like $-1/\ln\epsilon$ is the hallmark of switchback: it is the mechanism by which the logarithmically growing inner solution communicates with the algebraically ordered outer expansion.
## References
- Hinch, E. J. *Perturbation Methods*. Cambridge University Press, 1991.
- Van Dyke, M. *Perturbation Methods in Fluid Mechanics*. Annotated Edition, Parabolic Press, 1975.
- Bender, C. M. and Orszag, S. A. *Advanced Mathematical Methods for Scientists and Engineers*. Springer, 1999.
- Schnitzer, O. *Asymptotic Analysis*, Imperial College London, Autumn 2025. Lecture notes §5.4.