### 5.1 Example 1

Consider the inhomogeneous linear boundary value problem (BVP) with constant coefficients

\begin{array}{r}{u}_{x}-{u}_{y}+u={e}^{y}+{e}^{x},\\ u(0,y)={e}^{y}.\end{array}

(32)

By constructing the following homotopy:

H(v,p)=(1-p)({v}_{x}-{r}_{1}(x)-{t}_{1}(y))+p({v}_{x}-{v}_{y}+v-{e}^{x}-{e}^{y})=0,

(33)

which is equivalent to

H(v,p)={v}_{x}-{r}_{1}(x)-{t}_{1}(y)+p(-{v}_{y}+v+{r}_{1}(x)+{t}_{1}(y)-{e}^{x}-{e}^{y})=0,

(34)

we get the functions {r}_{1}(x), {t}_{1}(y) as it is explained in Section 4.2. It is obvious that {t}_{1}(y)={e}^{y} satisfies equation (30). Moreover, from equation (31), {r}_{1}(x) can be found as follows:

{r}_{1}(x)=\frac{{e}^{x}+{e}^{-x}}{2}.

(35)

If we put the function {r}_{1}(x) and {t}_{1}(y) in the homotopy (33) or (34), we get

H(v,p)={v}_{x}-\frac{{e}^{x}+{e}^{-x}}{2}-{e}^{y}+p(-{v}_{y}+v+\frac{{e}^{-x}-{e}^{x}}{2})=0,

(36)

and we get the following:

Hence, the solution u(x,y) becomes

u(x,y)={v}_{0}=\frac{{e}^{x}-{e}^{-x}}{2}+{e}^{y}x+{e}^{y},

(37)

which is the exact solution of the problem with minimum amount of calculation.

### 5.2 Example 2

Consider the following inhomogeneous linear BVP with variable coefficients:

\begin{array}{r}{u}_{x}+y{u}_{y}-u=2{y}^{2}+2x{y}^{2},\\ u(0,y)=0.\end{array}

(38)

In this problem, the right-hand side functionf(x,y) is a third-order polynomial. From (15), we have

f(x,y)={f}_{1}(x,y)+y{S}_{y}({f}_{1}(x,y))-S({f}_{1}(x,y)).

(39)

Based on the source function f(x,y)=2{y}^{2}+2x{y}^{2}, if we take {f}_{1}(x,y) as

{f}_{1}(x,y)={a}_{1}{x}^{3}+{a}_{2}{x}^{2}y+{a}_{3}x{y}^{2}+{a}_{4}{y}^{3}+{a}_{5}{x}^{2}+{a}_{6}xy+{a}_{7}{y}^{2}+{a}_{8}x+{a}_{9}y+{a}_{0}

(40)

and substitute (40) into (39), we obtain

\begin{array}{rcl}{a}_{7}& =& 2,\\ {a}_{1}& =& {a}_{2}={a}_{3}={a}_{4}={a}_{5}={a}_{6}={a}_{8}={a}_{9}={a}_{0}=0.\end{array}

Based on these results, we have {f}_{1}(x,y)=2{y}^{2}, {f}_{2}(x,y)=2x{y}^{2} and the homotopy is constructed in the following form:

H(v,p)={v}_{x}-2{y}^{2}+p(y{v}_{y}-v-2x{y}^{2})=0,

(41)

and we get the following:

Hence, we obtain the exact solution in the following form:

u(x,y)={v}_{0}=2x{y}^{2}

(42)

with short-length calculation.

### 5.3 Example 3

Let us find the solution of following BVP:

\begin{array}{r}{u}_{x}+{u}_{y}-xu=y{e}^{xy}+x,\\ u(0,y)=0.\end{array}

(43)

As in the previous examples, using (15) we get

y{e}^{xy}+x={f}_{1}+{S}_{y}({f}_{1})-xS({f}_{1}).

(44)

Based on the source function f(x,y)=y{e}^{xy}+x, we conclude that {f}_{1}(x,y) is in the following form:

{f}_{1}(x,y)={a}_{1}{e}^{xy}+{a}_{2}x{e}^{xy}+{a}_{3}x.

(45)

Substituting (45) into (44), we obtain

\begin{array}{rcl}{a}_{1}& =& {a}_{2}=0,\\ {a}_{3}& =& 1.\end{array}

Now, these results let us take {f}_{1}(x,y)=y{e}^{xy}, {f}_{2}(x,y)=x and construct the homotopy in the following form:

H(v,p)={v}_{x}-y{e}^{xy}+p({v}_{y}-xv-x)=0,

(46)

which leads to the following equations:

Hence, the exact solution becomes

u(x,y)={v}_{0}={e}^{xy}-1,

(47)

which is obtained by minimum amount of calculations.

### 5.4 Example 4

Let us find the solution of the following first-order non-linear BVP:

\begin{array}{r}{u}_{x}+{u}_{y}-{u}^{2}=-{e}^{2x}+3{e}^{x}-1,\\ u(0,y)=0.\end{array}

(48)

Using (15) we get

-{e}^{2x}+3{e}^{x}-1={f}_{1}+{S}_{y}({f}_{1})-{[S({f}_{1})]}^{2}.

(49)

Based on the source function f(x,y)=-{e}^{2x}+3{e}^{x}-1, we find {f}_{1}(x,y) is in the following form:

{f}_{1}(x,y)={a}_{1}{e}^{x}+{a}_{2}{e}^{2x}+{a}_{3}.

(50)

Substituting (50) into (49), we obtain

\begin{array}{rcl}{a}_{1}& =& 1,\\ {a}_{2}& =& {a}_{3}=0.\end{array}

Now we can take {f}_{1}(x,y)={e}^{x}, {f}_{2}(x,y)=-{e}^{2x}+2{e}^{x}-1 and construct the homotopy in the following form:

H(v,p)={v}_{x}-{e}^{x}+p({v}_{y}-{v}^{2}+{e}^{2x}-2{e}^{x}+1)=0,

(51)

which leads to the following equations:

Hence, we obtain the exact solution

u(x,y)={v}_{0}={e}^{x}-1

(52)

with short-length calculation.