Boundary Layer theory can be thought of as being equivalent to the theory of matched asymptotic expansions.

# Idea

Most of the time, it's okay to throw away small things - this is true 'far away from boundary layers'. Sometimes, it's not okay to do this - this is true 'near boundary layers'.

(Sometimes it's never okay to throw away things - even exponentially small things - but that's not true here).

# Simple Example

We have an equation, such as (for a simple example)

**q * y'' + y' + y = 0** (*)

Where y' means the derivative of y with respect to x, and q is a very small number. Let's have some boundary conditions, too. Say, y(0)=0, y(1)=1. The equation we end up being interested in could describe the NSEs near a boundary, for example, or deviation from Stokes Flow, with Re as a natural choice for q.

Now, our instinct as human beings is to throw away small things. Let's throw away anything that looks small, leaving us with

**y' + y = 0**.

Hum. Alarm bells should be ringing here - we have two boundary conditions, but only a first order ODE. What we have actually assumed by throwing away our small thing is that x=ord(1). More on this in a moment, but if we've assumed x=ord(1), then it makes sense that we apply our boundary condition at x = 1. Okay, great, we know what to do. This gives us

**y = A*exp(-x) = exp(1 - x)**

And we're left pretty unhappy, because this can never satisfy our boundary condition at x = y.

We think for a little bit, and realise that we wrote down 'assumed' a few lines back, and scrabble back to look at this. x = ord(1)? x is roughly the size of 1? Well, what about when x isn't? What about when x is teeny?

(Considering the balances in the original equation (*), we see that 'teeny' here means that x = ord(q^1/2), so that the first term q*y'' is roughly the size of the last term y - but this leaves us with something nasty in the middle, so we go a little smaller to find x = ord(q) is a nice rescaling).

We'd like to look when x is teeny with the mathematical equivalent of a magnifying glass. Think of a new variable, r, which will be our magnifying glass. When x is small (around the size of q) we want r to be pretty big - around the size of 1. So let's write r=x/q, and **rewrite** (*) in terms of our new variable. I'll use capital Y instead of y to make it clear when I'm in the small bit or the big bit, respectively.

**Y'' + Y' + q*Y = 0**

Right! Let's throw away the small terms again!

**Y'' + Y' = 0 => Y = B*exp(-r) + C.**

Okay, we have two arbitrary constants, B and C. Apply our x=0 (=> r=0) boundary condition:

**Y = B*(1 - exp(-r)) = B*(1 - exp(-x/q))**.

And again, we're unhappy, because we wanted a full solution, not to have some dumb constant B left over. Arse.

We go and have a cup of tea and remember that we want y and Y to be, in some sense, two different bits of the same function. Well, in physical problems, we'd like almost all of our functions to join up in a nice way, right? In the middle, they should meet somewhere.

Okay. Let's look at y first, and imagine that x has gotten really quite small (but not quite small enough for it to make our assumptions invalid). Then

**y -> exp(1)**

As the exp(-x) has pretty much become 1. Now, let's look at Y, and let our x there get pretty big, but not big enough to make our assumptions invalid (what I'm doing here is secretly applying Van Dyke's Matching Principle. Then

**Y - > B**

As our exp(-x/q) has become pretty much zero. We frown and gurn and feel pretty guilty, and eventually decide that yes, B = exp(1).

So now, we have our full solution. It's not exact, but it's pretty good in each region. To recap:

# Outer solution (x = ord(1))

**y = exp(1-x)**

# Inner Solution (x = ord(q))

**Y = exp(1)*(1 - exp(-x/q))**