Two linear second order constant coefficient problems, one homogenous and the other nonhomogenous are treated using the PIA(1,1) algorithm.
Example Problem 1
Consider the singular perturbation problem
$$\varepsilon y^{{\prime \prime }} + 2y^{{\prime }}  y = 0\quad y(0) = 0,\quad y(1) = 1$$
(4)
For the problem, an outer solution and an inner solution will be sought and both solutions will be matched to construct a composite solution.
The outer solution
To find the outer solution, the original equation is taken in the analysis
$$F(y,y^{{\prime }} ,y^{{\prime \prime }} ,\varepsilon ) = \varepsilon y^{{\prime \prime }} + 2y^{{\prime }}  y = 0$$
(5)
Before starting, one of the important issues is the location of the boundary layer. This requires knowledge of the physics of the problem. For variable coefficient linear second order singular equations, a systematic way of locating the boundary condition indeed exists (Nayfeh 1981). For the problem considered, the boundary layer is located near x ≈ 0. Therefore, the outer solution is not expected to satisfy the condition at x = 0. Substituting (5) into (3) and rearranging, the iteration equation is
$$2y_{n}^{\prime }  y_{n}  \varepsilon (y_{c} )_{n} + 2\varepsilon (y_{c}^{\prime } )_{n} + \varepsilon y_{n}^{\prime \prime } = 0,\quad n = 0,1,2, \ldots$$
(6)
Note that due to the small term multiplying the highest derivative, the original equation yields a first order iteration equation which leads to inconsistencies if both conditions are forced to satisfy the solution. This justifies an outer and inner solutions to be constructed separately.
Inspired by the condition at the right, a simple initial guess is suggested
to start the iteration. Substituting this initial guess into (6) and solving for \((y_{c} )_{0}\) yields
$$(y_{c} )_{0} =  \frac{1}{\varepsilon } + \frac{{c_{1} }}{2}e^{x/2}$$
(8)
Hence, the first iteration result is
$$y_{1} = y_{0} + \varepsilon (y_{c} )_{0} = \frac{{c_{1} \varepsilon }}{2}e^{x/2}$$
(9)
and imposing the right hand side boundary condition yields
$$y_{1} = e^{(x  1)/2}$$
(10)
Progressing in a similar way, the second iteration result is
$$y_{2} = e^{(x  1)/2} + \frac{\varepsilon }{8}(1  x)e^{(x  1)/2}$$
(11)
This result can also be found with the method of matched asymptotic expansions. However, with PIA(1,1), the same solution is retrieved from a very simple initial guess. This solution does not satisfy the boundary condition at the left hand side i.e. \(y_{2} (0) \ne 0\).
The inner solution
The inner solution is valid within a small region called the boundary layer where the solution has a sharp turn. The first step is to determine the boundary layer variable by stretching the coordinate inside this layer
$$\xi = \frac{x}{{\varepsilon^{\nu } }}$$
(12)
Substituting the transformed variable into the original equation yields
$$\varepsilon^{1  2\nu } \frac{{d^{2} Y}}{{d\xi^{2} }} + 2\varepsilon^{  \nu } \frac{dY}{d\xi }  Y = 0\quad \quad$$
(13)
where \(Y = Y(\xi )\). Balancing should be performed for the terms. There are two options: Balancing the first and second term or the first and third term. Balancing the second and third term is not an option because ν = 0 and the original equation is retrieved with no stretching.

1.
First and second term
For this case \(1  2\nu =  \nu \; \Rightarrow \;\nu = 1\). Equation (13) after multiplication with ε is
$$\frac{{d^{2} Y}}{{d\xi^{2} }} + 2\frac{dY}{d\xi }  \varepsilon Y = 0$$
(14)
The goal is to retain as much terms as one can at the leading order. In this case, two terms remain in the first order and the choice is admissible.

2.
First and third term
Balancing the first and third term requires \(1  2\nu = 0\; \Rightarrow \;\nu = 1/2\). Equation (13) is
$$\frac{{d^{2} Y}}{{d\xi^{2} }} + 2\varepsilon^{  1/2} \frac{dY}{d\xi }  Y = 0$$
(15)
Since the middle term is the only leading dominant term, this choice is not an admissible choice and hence discarded.
To summarize, the distinguished limit is ν = 1 and the boundary layer variable is
$$\xi = \frac{x}{\varepsilon }$$
(16)
and the transformed equation to be solved is
$$F(Y,Y^{{\prime }} ,Y^{{\prime \prime }} ,\varepsilon ) = Y^{{\prime \prime }} + 2Y^{{\prime }}  \varepsilon Y = 0$$
(17)
Equation (3) takes the special form then
$$Y_{n}^{{\prime \prime }} + 2Y_{n}^{{\prime }} + 2\varepsilon (Y_{c}^{{\prime }} )_{n} + \varepsilon (Y_{c}^{{\prime \prime }} )_{n}  \varepsilon Y_{n} = 0,\quad n = 0,1,2, \ldots$$
(18)
Using (18) and (2) and applying the boundary condition at the left, i.e. Y(0) = 0, an iteration process can be constructed. Starting from a very simple guess
The successive two iteration are
$$Y_{1} = \varepsilon c_{3} (1  e^{  2\xi } )$$
(20)
$$Y_{2} = \varepsilon c_{3} (1  e^{  2\xi } ) + \varepsilon \left\{ {c_{7} (1  e^{  2\xi } ) + \frac{{\varepsilon c_{3} }}{2}\xi \left( {1 + e^{  2\xi } } \right)} \right\}$$
(21)
Note that this solution is valid in the neighborhood of x = 0 and therefore is not expected to satisfy the boundary condition at the right hand side. The equations solved are second order while the conditions are less than the required value of 2. The undetermined coefficients will be determined by the matching conditions.
Matching
The inner and outer solutions should smoothly combine in the overlapping region which requires solutions to be matched. Employing the Van Dyke’s (1975) matching principle
$$(y_{2} )^{i} = (Y{}_{2})^{0}$$
(22)
in the overlapping region. In accordance, the outer expansion is written in terms of the inner variable, approximated and equated to the inner expansion written in terms of the outer variable and approximated. Hence
$$(y_{2} )^{i} = e^{(\varepsilon \xi  1)/2} + \frac{\varepsilon }{8}(1  \varepsilon \xi )e^{(\varepsilon \xi  1)/2}$$
(23)
and then approximation is taken up to two terms for fixed ξ
$$(y_{2} )^{i} \cong e^{  1/2} \left( {1 + \varepsilon \frac{\xi }{2}} \right) + \frac{\varepsilon }{8}e^{  1/2} + \ldots$$
(24)
Returning back to the original variable x now
$$(y_{2} )^{i} \cong e^{  1/2} \left( {1 + \frac{x}{2}} \right) + \frac{\varepsilon }{8}e^{  1/2} + \ldots$$
(25)
For the right hand side of the equation in the matching, the inner expansion is represented in terms of the outer variable x
$$(Y_{2} )^{0} = \varepsilon c_{3} (1  e^{  2x/\varepsilon } ) + \varepsilon \left( {c_{7} (1  e^{  2x/\varepsilon } ) + \frac{{\varepsilon c_{3} }}{2}\frac{x}{\varepsilon }\left( {1 + e^{  2x/\varepsilon } } \right)} \right)$$
(26)
and approximated up to two terms for fixed x
$$(Y_{2} )^{0} \cong \varepsilon c_{3} (1 + \frac{x}{2}) + \varepsilon c_{7}$$
(27)
Note that for x kept fixed and not negligibly small, \(e^{  2x/\varepsilon }\) is an exponentially small term which can be neglected. Equating (27) and (25), the constants
$$\varepsilon c_{3} = e^{  1/2} ,\quad c_{7} = \frac{1}{8}e^{  1/2}$$
(28)
are determined from the matching conditions. Hence the final inner and outer solutions in terms of the original spatial variable are
$$Y_{2} = e^{  1/2} (1  e^{  2x/\varepsilon } ) + \frac{1}{2}e^{  1/2} x(1 + e^{  2x/\varepsilon } ) + \frac{\varepsilon }{8}\,e^{  1/2} \left( {1  e^{  2x/\varepsilon } } \right)$$
(29)
$$y_{2} = e^{(x  1)/2} + \frac{\varepsilon }{8}(1  x)e^{(x  1)/2}$$
(30)
The inner solution is valid in the neighborhood of x = 0 (inside the boundary layer) and the outer solution is valid outside the boundary layer. A solution which is valid throughout the domain is desirable and one can construct a composite solution valid within all the domain of interest
$$y = Y_{2} + y_{2}  (y_{2} )^{i}$$
(31)
To construct the composite expansion, one simply adds the inner and outer solutions and subtracts the common overlapping part which is counted twice from the solution. Substituting (29), (30) and (25) into (31), the composite expansion is
$$y = e^{(x  1)/2}  \left( {1  \frac{x}{2}} \right)e^{  1/2  2x/\varepsilon } + \frac{\varepsilon }{8}\left\{ {(1  x)e^{(x  1)/2}  e^{  1/2  2x/\varepsilon } } \right\}\,$$
(32)
which is a valid approximation throughout the whole domain. This solution satisfies both of the boundary conditions and can also be retrieved by the method of matched asymptotic expansions. To compare with the exact solution of the problem
$$y = \frac{{e^{{\left( {  1 + \sqrt {1 + \varepsilon } } \right)x/\varepsilon }}  e^{{\left( {  1  \sqrt {1 + \varepsilon } } \right)x/\varepsilon }} }}{{e^{{\left( {  1 + \sqrt {1 + \varepsilon } } \right)/\varepsilon }}  e^{{\left( {  1  \sqrt {1 + \varepsilon } } \right)/\varepsilon }} }}$$
(33)
first, the Taylor series expansions are written
$$\sqrt {1 + \varepsilon } \cong 1 + \frac{1}{2}\varepsilon  \frac{1}{8}\varepsilon^{2}$$
(34)
$$e^{{(  1 + \sqrt {1 + \varepsilon } )/\varepsilon }} \cong e^{1/2  \varepsilon /8}$$
(35)
$$e^{{(  1  \sqrt {1 + \varepsilon } )/\varepsilon }} \cong e^{  2/\varepsilon  1/2 + \varepsilon /8} \cong 0$$
(36)
The second term is an exponentially small term which can be neglected. Under the approximations, the exact solution is
$$y^{e} \cong e^{  1/2 + \varepsilon /8} e^{x/2  \varepsilon x/8}  e^{  1/2 + \varepsilon /8} e^{  2x/\varepsilon  x/2 + \varepsilon x/8}$$
(37)
Approximating further the exponential terms with the perturbation parameter
$$e^{\varepsilon /8} \cong 1 + \frac{\varepsilon }{8}$$
(38)
$$e^{  \varepsilon x/8} \cong 1  \frac{\varepsilon }{8}x$$
(39)
the result is
$$y \cong e^{  1/2 + x/2}  e^{  1/2  2x/\varepsilon  x/2} + \frac{\varepsilon }{8}\left\{ {(1  x)e^{  1/2 + x/2}  (1 + x)e^{  1/2  2x/\varepsilon  x/2} } \right\}$$
(40)
This approximation is comparable with the perturbation iteration solution if further
$$e^{  x/2} \cong 1  \frac{x}{2}$$
(41)
is taken in (40).
Example Problem 2
Consider the nonhomogenous linear boundary value problem
$$\varepsilon y^{{\prime \prime }} + 2y^{{\prime }} = x\quad y(0) = \alpha ,\quad y(1) = \beta$$
(42)
The outer solution
To find the outer solution, the original equation is used
$$F(y^{{\prime }} ,y^{{\prime \prime }} ,\varepsilon ) = \varepsilon y^{{\prime \prime }} + 2y^{{\prime }}  x = 0$$
(43)
The boundary layer is located near x ≈ 0. Therefore, the outer solution is not expected to satisfy the condition at x = 0. Substituting (43) into (3) and rearranging, the iteration equation is
$$2y_{n}^{{\prime }}  x + 2\varepsilon (y_{c}^{{\prime }} )_{n} + \varepsilon y_{n}^{{\prime \prime }} = 0,\quad n = 0,1,2, \ldots$$
(44)
Choose a simple initial guess compatible with the boundary condition at the right
to start the iteration. The first iteration solution satisfying the boundary condition at the right is
$$y_{1} = \beta + \frac{{x^{2}  1}}{4}$$
(46)
This solution is not expected to satisfy the boundary condition at the left hand side i.e. \(y_{1} (0) \ne 0\).
The inner solution
The inner solution is valid within a small region called the boundary layer where the solution has a sharp turn. It turns out that the boundary layer variable by stretching the coordinate inside this layer is
$$\xi = \frac{x}{\varepsilon }$$
(47)
and the transformed equation is
$$\frac{{d^{2} Y}}{{d\xi^{2} }} + 2\frac{dY}{d\xi }  \varepsilon^{2} \xi = 0$$
(48)
Defining
$$F(Y^{{\prime }} ,Y^{{\prime \prime }} ,\varepsilon ) = Y^{{\prime \prime }} + 2Y^{{\prime }}  \varepsilon^{2} \xi = 0$$
(49)
the iteration Eq. (3) takes the form
$$Y_{n}^{{\prime \prime }} + 2Y_{n}^{{\prime }} + 2\varepsilon (Y_{c}^{{\prime }} )_{n} + \varepsilon (Y_{c}^{{\prime \prime }} )_{n} = 0,\quad n = 0,1,2, \ldots$$
(50)
Starting from a simple guess satisfying the boundary condition at the left
the first iteration is
$$Y_{1} = \alpha + \varepsilon c_{3} (1  e^{  2\xi } )$$
(52)
Note that this solution is valid in the neighborhood of x = 0 and therefore is not expected to satisfy the boundary condition at the right hand side. The undetermined coefficient will be determined by the matching conditions.
Matching
The matching of solutions requires
$$(y_{1} )^{i} = (Y{}_{1})^{0}$$
(53)
in the overlapping region. In accordance, the outer expansion is written in terms of the inner variable, approximated and equated to the inner expansion written in terms of the outer variable and approximated. Hence
$$(y_{1} )^{i} = \beta + \frac{{\varepsilon^{2} \xi^{2}  1}}{4} \cong \beta  \frac{1}{4}$$
(54)
The inner expansion is represented in terms of the outer variable x and approximated
$$(Y_{1} )^{0} = \alpha + \varepsilon c_{3} (1  e^{  2x/\varepsilon } ) \cong \alpha + \varepsilon c_{3}$$
(55)
Note that for x kept fixed and not negligibly small, \(e^{  2x/\varepsilon }\) is an exponentially small term which can be neglected. Equating (54) and (55) gives the undetermined constant
$$\varepsilon c_{3} = \beta  \frac{1}{4}  \alpha$$
(56)
Hence the inner solution in terms of the original variable is
$$Y_{1} = \beta  \frac{1}{4} + \left( {\alpha  \beta + \frac{1}{4}} \right)e^{  2x/\varepsilon }$$
(57)
The composite solution is
$$y = Y_{1} + y_{1}  (y_{1} )^{i}$$
(58)
or
$$y = \beta + \frac{{x^{2}  1}}{4} + \left( {\alpha  \beta + \frac{1}{4}} \right)e^{  2x/\varepsilon }$$
(59)
which is a valid approximation throughout the whole domain. This solution satisfies both of the boundary conditions and can also be retrieved by the method of matched asymptotic expansions.The exact solution of the problem is
$$y = \alpha + \frac{{\alpha  \beta + \frac{1}{4}  \frac{1}{4}\varepsilon }}{{1  e^{  2/\varepsilon } }}\left( {e^{  2x/\varepsilon }  1} \right) + \frac{1}{4}x^{2}  \frac{1}{4}\varepsilon x$$
(60)
Neglecting the exponentially small term \(e^{  2/\varepsilon }\) and O(ε) terms, solution (59) is obtained, hence the solution is a valid approximation of the exact solution.