Homotopy Analysis Method for Solving Initial Value Problems of Second Order with Discontinuities
Abstract: In this paper, the standard homotopy analysis method was applied to initial value problems of the second order with some types of discontinuities, for both linear and nonlinear cases. To show the high accuracy of the solution results compared with the exact solution, a comparison of the numerical results was made applying the standard homotopy analysis method with the iteration of the integral equation and the numerical solution with the Simpson rule. Also, the maximum absolute error, , the maximum relative error, the maximum residual error and the estimated order of convergence were given. The research is meaningful and I recommend it to be published in the journal.

1. Introduction

Liao Shijun    proposed in 1992 in his Ph.D. dissertation a new and fruitful method (Homotopy Analysis Method (HAM)) for solving linear and nonlinear (ordinary differential, partial differential, integral, etc.) equations. It has been shown that this method yields a rapid convergence of the solutions series to linear and nonlinear deterministic.

In recent literature, Al-Hayani and Casasùs   applied the Adomian decomposition method (ADM) to the initial value problems (IVPs) with discontinuities. Ji-Huan  used the homotopy perturbation method (HPM) solving for nonlinear oscillators with discontinuities.

In the consulted bibliography we have not found any results of the application of the HAM to differential problems with discontinuities. For this reason, this paper systematically analyzes its application to IVPs of ODEs of second order with independent non-continuous term. We have treated functions with a discontinuous derivative, with some of Heaviside step function and with Dirac delta function.

In what follows, we give a brief review of the HAM.

2. Basic Idea of HAM

In this article, we apply the HAM to the discussed problem. To show the basic idea, we consider the following differential equation

$\mathcal{N}\left[u\left(x\right)\right]=k\left(x\right),$ (2.1)

where $\mathcal{N}$ is a nonlinear operator, x denotes independent variable, $u\left(x\right)$ is an unknown function, and $k\left(x\right)$ is a known analytic function. For simplicity, we ignore all boundary or initial conditions, which can be treated in the similar way. By means of generalizing the traditional homotopy method, Liao    constructs the so-called zero-order deformation equation

$\left(1-q\right)\mathcal{L}\left[\varphi \left(x;q\right)-{u}_{0}\left(x\right)\right]=qhH\left(x\right)\left\{\mathcal{N}\left[\varphi \left(x;q\right)\right]-k\left(x\right)\right\},$ (2.2)

where $q\in \left[0,1\right]$ is an embedding parameter, $h\ne 0$ , is a non-zero auxiliary parameter $H\left(x\right)\ne 0$ is an auxiliary function, $\mathcal{L}$ is an auxiliary linear operator, ${u}_{0}\left(x\right)$ is an initial guess of $u\left(x\right)$ and $\varphi \left(x;q\right)$ is an unknown function. It is important to note that one has great freedom to choose auxiliary objects such as h and $\mathcal{L}$ in the HAM. Obviously when $q=0$ and $q=1$ , both

$\varphi \left(x;0\right)={u}_{0}\left(x\right)\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{and}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\varphi \left(x;1\right)=u\left(x\right)$ (2.3)

hold. Thus as q increases from 0 to 1, the solution $\varphi \left(x;q\right)$ varies from the initial guess ${u}_{0}\left(x\right)$ to the solution $u\left(x\right)$ . Expanding $\varphi \left(x;q\right)$ in Taylor series with respect to q, one has

$\varphi \left(x;q\right)={u}_{0}\left(x\right)+\underset{m=1}{\overset{+\infty }{\sum }}{u}_{m}\left(x\right){q}^{m},$ (2.4)

where

${u}_{m}={\frac{1}{m!}\frac{{\partial }^{m}\varphi \left(x;q\right)}{\partial {q}^{m}}|}_{q=0},$ (2.5)

If the auxiliary linear operator, the initial guess, the auxiliary parameter h, and the auxiliary function are so properly chosen, then the series (2.4) converges at $q=1$ and one has

$\varphi \left(x;1\right)={u}_{0}\left(x\right)+\underset{m=1}{\overset{+\infty }{\sum }}{u}_{m}\left(x\right),$ (2.6)

which must be one of the original non-linear equation, as proved by Liao    . If $h=-1$ , Equation (2.2) becomes

$\left(1-q\right)\mathcal{L}\left[\varphi \left(x;q\right)-{u}_{0}\left(x\right)\right]+q\left\{\mathcal{N}\left[\varphi \left(x;q\right)-k\left(x\right)\right]\right\}=0,$ (2.7)

which is used mostly in the HPM   .

According to Equation (2.5), the governing equations can be deduced from the zeroth-order deformation Equations (2.2). We define the vectors

${u}_{i}=\left\{{u}_{0}\left(x\right),{u}_{1}\left(x\right),\cdots ,{u}_{i}\left(x\right)\right\}.$ (2.8)

Differentiating Equation (2.2) m times with respect to the embedding parameter q and then setting $q=0$ and finally dividing them by $m!$ , we have the so-called mth-order deformation equation

$\mathcal{L}\left[{u}_{m}\left(x\right)-{\mathcal{X}}_{m}{u}_{m-1}\left(x\right)\right]=h{\mathcal{R}}_{m}\left({u}_{m-1}\right),$ (2.9)

where

${\mathcal{R}}_{m}\left({u}_{m-1}\right)={\frac{1}{\left(m-1\right)!}\frac{{\partial }^{m-1}\left\{\mathcal{N}\left[\varphi \left(;q\right)\right]-k\left(x\right)\right\}}{\partial {q}^{m-1}}|}_{q=0},$ (2.10)

and

${\mathcal{X}}_{m}=\left\{\begin{array}{l}0,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }m\le 1,\\ 1,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}m>1.\end{array}$ (2.11)

It should be emphasized that ${u}_{m}\left(x\right)$ $\left(m\ge 1\right)$ are governed by the linear equation (2.9) with the linear boundary conditions that come from the original problem, which can be easily solved by symbolic computation softwares such as Maple and Mathematica.

3. HAM Applied to an IVP of the Second Order

Consider the general IVP of the second order  :

$\begin{array}{l}{u}^{″}+g\left(u,{u}^{\prime }\right)+{k}^{2}u=\lambda f\left(x,u,{u}^{\prime }\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}0\le x\le T,\\ u\left(0\right)=\alpha ,\text{\hspace{0.17em}}\text{\hspace{0.17em}}{u}^{\prime }\left(0\right)=\beta ,\end{array}$ (3.1)

where $k,\lambda ,\alpha$ and $\beta$ are real constants, g is a (possibly) nonlinear function of $u,{u}^{\prime }$ and f is a function with some discontinuity.

To sole Equation (3.1) by means of the standard HAM, we choose the initial approximations

$u\left(0\right)=\alpha ,\text{\hspace{0.17em}}\text{\hspace{0.17em}}{u}^{\prime }\left(0\right)=\beta ,$ (3.2)

and the linear operator

$\mathcal{L}\left[\varphi \left(x;q\right)\right]=\frac{{\partial }^{2}\varphi \left(x;q\right)}{\partial {x}^{2}},$ (3.3)

with the property

$\mathcal{L}\left[{c}_{1}+{c}_{2}x\right]=0,$ (3.4)

where ${c}_{1}$ and ${c}_{2}$ are constants of integration. Furthermore, Equation (3.1) suggests that we define the nonlinear operator as

$\begin{array}{c}\mathcal{N}\left[\varphi \left(x;q\right)\right]=\frac{{\partial }^{2}\varphi \left(x;q\right)}{\partial {x}^{2}}+g\left(\varphi \left(x;q\right),\frac{\partial \varphi \left(x;q\right)}{\partial x}\right)+{k}^{2}\varphi \left(x;q\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}-\lambda f\left(x,\varphi \left(x;q\right),\frac{\partial \varphi \left(x;q\right)}{\partial x}\right),\end{array}$ (3.5)

Using the above definition, we construct the zeroth-order deformation equation as in (2.2) and (2.3) and the mth-order deformation equation for $m\ge 1$ is

$\mathcal{L}\left[{u}_{m}\left(x\right)-{\mathcal{X}}_{m}{u}_{m-1}\left(x\right)\right]=h{R}_{m}\left({u}_{m-1}\right),$ (3.6)

with the initial conditions

${u}_{m}\left(0\right)=0,\text{\hspace{0.17em}}\text{\hspace{0.17em}}{{u}^{\prime }}_{m}\left(0\right)=0,$ (3.7)

where

${R}_{m}\left({u}_{m-1}\right)={{u}^{″}}_{m-1}+g\left({u}_{m-1},{{u}^{\prime }}_{m-1}\right)+{k}^{2}{u}_{m-1}-\lambda f\left(x,{u}_{m-1},{{u}^{\prime }}_{m-1}\right)$ (3.8)

Now, the solution of the mth-order deformation Equation (3.6) for $m\ge 1$ is

${u}_{m}\left(x\right)={\mathcal{X}}_{m}{y}_{m-1}\left(x\right)+h{\int }_{0}^{x}{\int }_{0}^{x}{R}_{m}\left({u}_{m-1}\right)\text{d}x\text{d}x,$ (3.9)

Thus, the approximate solution in a series form is given by

$u\left(x\right)={u}_{0}\left(x\right)+\underset{m=1}{\overset{+\infty }{\sum }}{u}_{m}\left(x\right)\text{ }\text{ }.$ (3.10)

3.1. Linear Case

Let $g\left(u,{u}^{\prime }\right)={u}^{\prime }$ , $\alpha =0$ and $\beta =1$ .

Case 3.1.1 If we take $\lambda =10,k=10$ and the function $f\left(x,u\right)$ is continuous, but not differentiable, for example

$f\left(x,u\right)=\left\{\begin{array}{l}x-\frac{1}{2},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}x\ge \frac{1}{2}\\ -x+\frac{1}{2},\text{\hspace{0.17em}}\text{\hspace{0.17em}}x<\frac{1}{2}\end{array}$ (3.11)

From Equation (3.9) the first iterations are then determined in the following recursive way:

${u}_{0}\left(x\right)=x,$

${u}_{1}\left(x\right)=\left\{\begin{array}{l}\frac{1}{3}h{x}^{2}\left(55x-6\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}x<\frac{1}{2}\\ \frac{1}{12}h\left(180{x}^{3}+36{x}^{2}-30x+5\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}x\ge \frac{1}{2}\end{array},$

${u}_{2}\left(x\right)=\left\{\begin{array}{l}\frac{275}{3}{h}^{2}{x}^{5}-\frac{145}{12}{h}^{2}{x}^{4}+\frac{1}{3}h{x}^{3}\left(55+53h\right)-2h{x}^{2}\left(1+h\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }x<\frac{1}{2}\\ 75{h}^{2}{x}^{5}+\frac{115}{4}{h}^{2}{x}^{4}+h{x}^{3}\left(15-\frac{77}{3}h\right)+h{x}^{2}\left(3+\frac{271}{12}h\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}-\frac{5}{2}hx\left(1+\frac{35}{12}h\right)+\frac{5}{12}h\left(1+\frac{17}{8}h\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}x\ge \frac{1}{2}\end{array}$

$⋮$

and so on, in this manner the rest of the iterations can be obtained. Thus, the approximate solution in a series form when $h=-1$ is

$u\left(x\right)={u}_{0}\left(x\right)+\underset{m=1}{\overset{15}{\sum }}{u}_{m}\left(x\right)=\left\{\begin{array}{l}{p}_{1}\left(x\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}x<\frac{1}{2}\\ {p}_{2}\left(x\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}x\ge \frac{1}{2}\end{array}$ (3.12)

where

$\begin{array}{c}{p}_{1}\left(x\right)=x+2{x}^{2}-19{x}^{3}-\frac{143}{12}{x}^{4}+\frac{5843}{60}{x}^{5}+\frac{2819}{120}{x}^{6}-\frac{592757}{2520}{x}^{7}-\frac{252943}{20160}{x}^{8}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\frac{19842881}{60480}{x}^{9}-\frac{34234343}{1814400}{x}^{10}-\frac{5918629957}{19958400}{x}^{11}+\frac{3114021419}{79833600}{x}^{12}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\frac{52956448313}{283046400}{x}^{13}-\frac{1516727357143}{43589145600}{x}^{14}-\frac{18911788595719}{217945728000}{x}^{15}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\frac{41681620300291}{2092278988800}{x}^{16}+\frac{10930256954423}{355687428096}{x}^{17}-\frac{18736423525}{2280047616}{x}^{18}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}-\frac{32512931860625}{3801409387776}{x}^{19}+\frac{1790227609375}{691165343232}{x}^{20}+\frac{25453049921875}{13304932857216}{x}^{21}\end{array}$

$\begin{array}{c}-\frac{35542462890625}{54882848036016}{x}^{22}-\frac{2509960937500}{7172190368343}{x}^{23}\\ +\frac{25589599609375}{194200846896672}{x}^{24}+\frac{33294677734375}{631152752414184}{x}^{25}\\ -\frac{4241943359375}{186476949576918}{x}^{26}-\frac{193786621093750}{27691827012172323}{x}^{27}\\ +\frac{1964569091796875}{581528367255618783}{x}^{28}+\frac{1907348632812500}{1533120240946631337}{x}^{29}\end{array}$

and

$\begin{array}{c}{p}_{2}\left(x\right)=-\frac{28489448970108521138596665947}{226349107039736370036316569600}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\frac{2178307263376990695691557083}{1951285405514968707209625600}x\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\frac{1186572886359572970648017}{366782970961460283310080}{x}^{2}-\frac{33376213227737153324107}{1852439247280102440960}{x}^{3}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}-\frac{78674566012860119002187}{3503708621552410951680}{x}^{4}+\frac{7041702063821037891364399}{74453808207988732723200}{x}^{5}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\frac{549895593575959030863563}{9306726025998591590400}{x}^{6}-\frac{33087191796820586109271}{141624091699978567680}{x}^{7}\end{array}$

$\begin{array}{l}-\frac{392978766117540050705}{5149966970908311552}{x}^{8}+\frac{2456170645710279487}{7376767051530240}{x}^{9}\\ +\frac{41780926473659473181}{811444375668326400}{x}^{10}-\frac{306846492148853223323}{998290120065638400}{x}^{11}\\ -\frac{17826687959696195557}{1331053493420851200}{x}^{12}+\frac{50400473203539207979}{254466109036339200}{x}^{13}\\ -\frac{549653451307296101}{80966489238835200}{x}^{14}-\frac{104497168922928132917}{1113289227033984000}{x}^{15}\\ +\frac{4425289676013881327}{508932218072678400}{x}^{16}+\frac{17404262491512559}{511943651315712}{x}^{17}\end{array}$

$\begin{array}{l}-\frac{23600088137477575}{4991450600328192}{x}^{18}-\frac{20901216917575625}{2155399122868992}{x}^{19}\\ +\frac{682160726359375}{391890749612544}{x}^{20}+\frac{5546125344453125}{2514632310013824}{x}^{21}\\ -\frac{96575453125000}{216101214141813}{x}^{22}-\frac{644336083984375}{1420093692931914}{x}^{23}\end{array}$

$\begin{array}{l}+\frac{3135924072265625}{22721499086910624}{x}^{24}+\frac{212506103515625}{5680374771727656}{x}^{25}\\ -\frac{17364501953125}{18461218008114882}{x}^{26}-\frac{209045410156250}{11867925862359567}{x}^{27}\\ +\frac{1125335693359375}{193842789085206261}{x}^{28}+\frac{1907348632812500}{1873813627823660523}{x}^{29}\end{array}$

This series has the closed form as $m\to \infty$

${u}_{Exact}\left(x\right)=\left\{\begin{array}{l}{p}_{3}\left(x\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}x<\frac{1}{2}\\ {p}_{4}\left(x\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}x\ge \frac{1}{2}\end{array}$ (3.13)

where

${p}_{3}\left(x\right)=\frac{307\sqrt{399}}{57000}{\text{e}}^{-\frac{1}{2}x}\mathrm{sin}\left(\frac{\sqrt{399}}{2}x\right)-\frac{51}{1000}{\text{e}}^{-\frac{1}{2}x}\mathrm{cos}\left(\frac{\sqrt{399}}{2}x\right)+\frac{51}{1000}-\frac{1}{10}x,$

$\begin{array}{c}{p}_{4}\left(x\right)=\frac{307\sqrt{399}}{57000}{\text{e}}^{-\frac{1}{2}x}\mathrm{sin}\left(\frac{\sqrt{399}}{2}x\right)-\frac{51}{1000}{\text{e}}^{-\frac{1}{2}x}\mathrm{cos}\left(\frac{\sqrt{399}}{2}x\right)-\frac{51}{1000}+\frac{1}{10}x\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\frac{1}{500}{\text{e}}^{-\frac{1}{2}x+\frac{1}{4}}\mathrm{cos}\left(\frac{\sqrt{399}}{4}\left(2x-1\right)\right)-\frac{199\sqrt{399}}{199500}{\text{e}}^{-\frac{1}{2}x+\frac{1}{4}}\mathrm{sin}\left(\frac{\sqrt{399}}{4}\left(2x-1\right)\right),\end{array}$

which is exactly the exact solution for the case 3.1.1.

In Table 1 show a comparison of the numerical results applying the HAM ( $m=15$ ), Iteration of the Integral Equation (IIE) (3.9), and the numerical solution of (3.9) with Simpson rule (SIMP) with the exact solution (3.13). Twenty points have been used in the Simpson rule. In Table 2 we list the Maximum Absolute Error (MAE), ${‖\text{ }\cdot \text{ }‖}_{2}$ , the Maximum Relative Error (MRE), the Maximum Residual Error (MRR), obtained by the HAM with the exact solution (3.13) on the interval $\left[0,1\right]$ . The Estimated Order of Convergence (EOC) for different values of the constant k are given in Table 3.

Figure 1 represents both the exact solution ${u}_{Exact}\left(x\right)$ and our approximation by HAM ( $m=14$ ) within the interval $0\le t\le 1$ .

For $k\ge 13$ , the application of the HAM requires approximants of order $m>15$ if we want to arrive beyond the discontinuity (at $x=\frac{1}{2}$ ).

Case 3.1.2 Taking $\beta =1,k=1,\lambda =1$ and

$f\left(x,u,{u}^{\prime }\right)=H\left(x-1\right)=\left\{\begin{array}{l}0,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{if}\text{\hspace{0.17em}}x<1\\ 1,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }\text{if}\text{\hspace{0.17em}}x\ge 1,\end{array}$ (3.14)

The Heaviside step function at $x=1$ . We now successively obtain

Figure 1. Continuous line: ${u}_{Exact}\left(x\right),+:\text{HAM},\lambda =10,k=10$ .

Table 1. Numerical results for the case 3.1.1.

Table 2. MAE, ${‖\text{ }\cdot \text{ }‖}_{2}$ , MRE and MRR for the case 3.1.1.

Table 3. EOC for the case 3.1.1.

${u}_{0}\left(x\right)=x,$

${u}_{1}\left(x\right)=\left\{\begin{array}{l}\frac{1}{6}h{x}^{3}+\frac{1}{2}h{x}^{2},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}x<1\\ \frac{1}{6}h{x}^{3}+hx-\frac{1}{2}h,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }\text{ }x\ge 1\end{array},$

${u}_{2}\left(x\right)=\left\{\begin{array}{l}\frac{1}{120}{h}^{2}{x}^{5}+\frac{1}{12}{h}^{2}{x}^{4}+\frac{1}{3}h{x}^{3}\left(\frac{1}{2}+h\right)+\frac{1}{2}h{x}^{2}\left(1+h\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}x<1\\ \frac{1}{120}{h}^{2}{x}^{5}+\frac{1}{24}{h}^{2}{x}^{4}+\frac{1}{3}h{x}^{3}\left(\frac{1}{2}+h\right)+hx\left(\frac{2}{3}h+1\right)-\frac{1}{2}h\left(1+\frac{3}{4}h\right),\text{\hspace{0.17em}}x\ge 1\end{array},$

$⋮$

and so on, in this manner the rest of the iterations can be obtained. Thus, the approximate solution in a series form when $h=-1$ is

$u\left(x\right)={u}_{0}\left(x\right)+\underset{m=1}{\overset{9}{\sum }}{u}_{m}\left(x\right)=\left\{\begin{array}{l}{p}_{5}\left(x\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}x<1\\ {p}_{6}\left(x\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}x\ge 1\end{array}$ (3.15)

where

$\begin{array}{c}{p}_{5}\left(x\right)=x-\frac{1}{2}{x}^{2}+\frac{1}{24}{x}^{4}-\frac{1}{120}{x}^{5}+\frac{1}{5040}{x}^{7}-\frac{1}{40320}{x}^{8}+\frac{1}{1814400}{x}^{10}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\frac{1}{5702400}{x}^{11}+\frac{1}{17740800}{x}^{12}+\frac{1}{124540416}{x}^{13}+\frac{1}{1779148800}{x}^{14}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\frac{1}{48432384000}{x}^{15}+\frac{1}{2615348736000}{x}^{16}+\frac{1}{355687428096000}{x}^{17}\end{array}$

and

$\begin{array}{c}{p}_{6}\left(x\right)=\frac{4581894569957}{6974263296000}-\frac{294371651437}{653837184000}x+\frac{23051120003}{58118860800}{x}^{2}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}-\frac{355931929}{6227020800}{x}^{3}-\frac{215859517}{11496038400}{x}^{4}+\frac{251909}{38016000}{x}^{5}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}-\frac{422017}{870912000}{x}^{6}-\frac{80707}{914457600}{x}^{7}+\frac{11293}{541900800}{x}^{8}\end{array}$

$\begin{array}{c}-\frac{463}{304819200}{x}^{9}+\frac{401}{2612736000}{x}^{10}+\frac{211}{798336000}{x}^{11}\\ +\frac{19}{348364800}{x}^{12}+\frac{113}{18681062400}{x}^{13}+\frac{71}{174356582400}{x}^{14}\\ +\frac{1}{62270208000}{x}^{15}+\frac{1}{2988969984000}{x}^{16}+\frac{1}{355687428096000}{x}^{17}\end{array}$

This series has the closed form as $m\to \infty$

${u}_{Exact}\left(x\right)=\left\{\begin{array}{l}\frac{2\sqrt{3}}{3}{\text{e}}^{-\frac{1}{2}x}\mathrm{sin}\left(\frac{1}{2}\sqrt{3}x\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}x<1\\ \frac{2\sqrt{3}}{3}{\text{e}}^{-\frac{1}{2}x}\mathrm{sin}\left(\frac{\sqrt{3}}{2}x\right)-\frac{\sqrt{3}}{3}{\text{e}}^{-\frac{1}{2}x+\frac{1}{2}}\mathrm{sin}\left(\frac{\sqrt{3}}{2}\left(-1+x\right)\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}-{\text{e}}^{-\frac{1}{2}x+\frac{1}{2}}\mathrm{cos}\left(\frac{\sqrt{3}}{2}\left(-1+x\right)\right)+1,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}x\ge 1,\end{array}$ (3.16)

which is exactly the exact solution for the case 3.1.2.

In Table 4 show a comparison of the numerical results applying the HAM ( $m=9$ ), Iteration of the Integral Equation (IIE) (3.9), and the numerical solution of (3.9) with Simpson rule (SIMP) with the exact solution (3.16). In Table 5 we list the MAE, ${‖\text{ }\cdot \text{ }‖}_{2}$ , the MRE, and the MRR, obtained by the HAM with the exact solution (3.16) on the interval $\left[0,1\right]$ . The EOC for different values of the constant k are given in Table 6.

Figure 2 represents both the exact solution ${u}_{Exact}\left(x\right)$ and our approximation by HAM ( $m=9$ ) within the interval $0\le t\le 2$ .

Case 3.1.3 Taking $\beta =1,k=1,\lambda =1$ and

$f\left(x,u,{u}^{\prime }\right)=\delta \left(x-1\right)$ , the Dirac delta function at $x=1$ . We now successively obtain

${u}_{0}\left(x\right)=x,$

Figure 2. Continuous line: ${u}_{Exact}\left(x\right),+:\text{HAM},\lambda =1,k=1$ .

Table 4. Numerical results for the case 3.1.2.

Table 5. MAE, ${‖\text{ }\cdot \text{ }‖}_{2}$ , MRE and MRR for the case 3.1.2.

Table 6. EOC for the case 3.1.2.

${u}_{1}\left(x\right)=-\frac{1}{6}h\left(-{x}^{3}-3{x}^{2}+6H\left(x-1\right)x-6H\left(x-1\right)\right)$

$\begin{array}{l}{u}_{2}\left(x\right)=-\frac{1}{120}h\left(-h{x}^{5}-10h{x}^{4}-20{x}^{3}\left(2h+1\right)+20hH\left(x-1\right){x}^{3}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}-60{x}^{2}\left(h+1\right)+60H\left(x-1\right)x\left(h+2\right)-40H\left(x-1\right)\left(2h+3\right)\right)\end{array}$

$⋮$

and so on, in this manner the rest of the iterations can be obtained. Thus, the approximate solution in a series form when $h=-1$ is

$\begin{array}{c}u\left(x\right)={u}_{0}\left(x\right)+\underset{m=1}{\overset{8}{\sum }}{u}_{m}\left(x\right)\\ =H\left(x-1\right)\left(-\frac{9030495007}{6227020800}+\frac{858929737}{479001600}x-\frac{2734477}{15966720}{x}^{2}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}-\frac{5271359}{21772800}{x}^{3}+\frac{653741}{8709120}{x}^{4}-\frac{14383}{4838400}{x}^{5}-\frac{7477}{3628800}{x}^{6}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\frac{293}{725760}{x}^{7}-\frac{71}{4838400}{x}^{8}-\frac{71}{8709120}{x}^{9}+\frac{23}{21772800}{x}^{10}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\frac{17}{79833600}{x}^{11}+\frac{1}{95800320}{x}^{12}+\frac{1}{6227020800}{x}^{13}\right)\end{array}$

$\begin{array}{l}+\left(x-\frac{1}{2}{x}^{2}+\frac{1}{24}{x}^{4}-\frac{1}{120}{x}^{5}+\frac{1}{5040}{x}^{7}-\frac{1}{40320}{x}^{8}-\frac{1}{362880}{x}^{9}\\ -\frac{1}{604800}{x}^{10}-\frac{1}{1900800}{x}^{11}-\frac{29}{479001600}{x}^{12}-\frac{1}{311351040}{x}^{13}\\ -\frac{1}{12454041600}{x}^{14}-\frac{1}{1307674368000}{x}^{15}\right)\end{array}$ (3.17)

This series has the closed form as $m\to \infty$

${u}_{Exact}\left(x\right)=\frac{2\sqrt{3}}{3}\left[H\left(x-1\right){\text{e}}^{\frac{1}{2}-\frac{1}{2}x}\mathrm{sin}\left(\frac{\sqrt{3}}{2}\left(x-1\right)\right)+{\text{e}}^{-\frac{1}{2}x}\mathrm{sin}\left(\frac{\sqrt{3}}{2}x\right)\right]$ (3.18)

which is exactly the exact solution for the case 3.1.3.

In Table 7 we list the MAE, ${‖\text{ }\cdot \text{ }‖}_{2}$ , the MRE, and the MRR, obtained by the HAM with the exact solution (3.18) on the interval $\left[0,2\right]$ . The EOC are 1.0984 at $x=0.9$ and 1.1156 at $x=1.1$ .

Figure 3 gives both the exact solution ${u}_{Exact}\left(x\right)$ and our approximation by HAM ( $m=8$ ) within the interval $0\le t\le 2$ .

3.2. Non-Linear Case

Let $\alpha =0,\beta =1,\lambda =10$ and $k=1$ .

Case 3.2.1 Taking $g\left(u,{u}^{\prime }\right)=u{u}^{\prime }$ , and

$f\left(x,u,{u}^{\prime }\right)=\left\{\begin{array}{l}0,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{if}\text{\hspace{0.17em}}x<\frac{1}{2}\\ 1,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }\text{\hspace{0.17em}}\text{if}\text{\hspace{0.17em}}x\ge \frac{1}{2}\end{array}$ (3.19)

Using the Adomian polynomials   for calculation the nonlinear term $u{u}^{\prime }$ is given by

$g\left(u,{u}^{\prime }\right)=u{u}^{\prime }=\underset{i=0}{\overset{n}{\sum }}{u}_{i}{{u}^{\prime }}_{n-i},\text{\hspace{0.17em}}\text{\hspace{0.17em}}n\ge i,\text{\hspace{0.17em}}\text{\hspace{0.17em}}n=0,1,2,\cdots$ (3.20)

We now successively obtain

${u}_{0}\left(x\right)=x,$

Figure 3. Continuous line: ${u}_{Exact}\left(x\right),+:\text{HAM},\lambda =1,k=1$ .

Table 7. MAE, ${‖\text{ }\cdot \text{ }‖}_{2}$ , MRE and MRR for the case 3.1.3.

${u}_{1}\left(x\right)=\left\{\begin{array}{l}\frac{1}{3}h{x}^{3},\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}x<\frac{1}{2}\\ \frac{1}{12}h\left(4{x}^{3}-60{x}^{2}+60x-15\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}x\ge \frac{1}{2}\end{array},$

${u}_{2}\left(x\right)=\left\{\begin{array}{l}\frac{1}{12}{h}^{2}{x}^{5}+\frac{1}{3}h{x}^{3}\left(h+1\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}x<\frac{1}{2}\\ \frac{1}{12}{h}^{2}{x}^{5}-\frac{5}{3}{h}^{2}{x}^{4}+\frac{1}{3}h{x}^{3}\left(1+\frac{17}{2}h\right)-5h{x}^{2}\left(1+\frac{5}{4}h\right)\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+5hx\left(1+\frac{25}{24}h\right)-\frac{5}{4}h\left(1+h\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}x\ge \frac{1}{2}\end{array},$

$⋮$

and so on, in this manner the rest of the iterations can be obtained. Thus, the approximate solution in a series form when $h=-1$ is

$u\left(x\right)={u}_{0}\left(x\right)+\underset{m=1}{\overset{7}{\sum }}{u}_{m}\left(x\right)=\left\{\begin{array}{l}{p}_{7}\left(x\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}x<\frac{1}{2}\\ {p}_{8}\left(x\right),\text{\hspace{0.17em}}\text{\hspace{0.17em}}x\ge \frac{1}{2}\end{array},$ (3.21)

where

${p}_{7}\left(x\right)=x-\frac{1}{3}{x}^{3}+\frac{1}{12}{x}^{5}-\frac{11}{504}{x}^{7}+\frac{211}{36288}{x}^{9}-\frac{6221}{3991680}{x}^{11}+\frac{260833}{622702080}{x}^{13}$

and

$\begin{array}{c}{p}_{8}\left(x\right)=\frac{131015952083}{98099527680}-\frac{846993899}{181665792}x+\frac{1362271259}{185794560}{x}^{2}-\frac{202153183}{37158912}{x}^{3}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\frac{44111605}{6193152}{x}^{4}-\frac{37786871}{7741440}{x}^{5}-\frac{156205}{165888}{x}^{6}+\frac{4167853}{645120}{x}^{7}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}-\frac{18511}{2016}{x}^{8}+\frac{431939}{64512}{x}^{9}-\frac{3502817}{1451520}{x}^{10}+\frac{267623}{725760}{x}^{11}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}-\frac{520067}{23950080}{x}^{12}+\frac{260833}{622702080}{x}^{13}\end{array}$

In Table 8 show a comparison of the numerical results applying the HAM ( $m=7$ ), Iteration of the Integral Equation (IIE) (3.9), and the numerical solution of (3.9) with Simpson rule (SIMP) with the numeric solution (rkf45) ${u}_{N}\left(x\right)$ . In Table 9 we list the MAE, the MRE, and the MRR, obtained by the HAM with the numeric solution (rkf45) ${u}_{N}\left(x\right)$ on the interval $\left[0,1\right]$ .

Figure 4 represents both the numeric solution (rkf45) ${u}_{N}\left(x\right)$ with a very small error and our approximation by HAM ( $m=7$ ) within the interval $0\le t\le 1$ .

Case 3.2.2 Taking $g\left(u,{u}^{\prime }\right)={u}^{2}$ , and

$f\left(x,u,{u}^{\prime }\right)=\left\{\begin{array}{l}0,\text{\hspace{0.17em}}\text{ }\text{ }\text{\hspace{0.17em}}\text{if}\text{\hspace{0.17em}}x<1\\ 1,\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{if}\text{\hspace{0.17em}}x\ge 1\end{array}$ (3.22)

Using the Adomian polynomials   for calculation the nonlinear term ${u}^{2}$ is given by

Figure 4. Continuous line: ${u}_{N}\left(x\right),+:\text{HAM},\lambda =10,k=1$ .

Table 8. Numerical results for the case 3.2.1.

Table 9. MAE, MRE and MRR for the case 3.2.1.

$g\left(u,{u}^{\prime }\right)={u}^{2}=\underset{i=0}{\overset{n}{\sum }}{u}_{i}{u}_{n-i},\text{\hspace{0.17em}}\text{\hspace{0.17em}}n\ge i,\text{\hspace{0.17em}}\text{\hspace{0.17em}}n=0,1,2,\cdots$ (3.23)

we now successively obtain

${u}_{0}\left(x\right)=x,$

${u}_{1}\left(x\right)=\frac{1}{12}h\left({x}^{4}+2{x}^{3}\right)-5hH\left(x-1\right)\left({x}^{2}-2x+1\right),$

$\begin{array}{c}{u}_{2}\left(x\right)=-\frac{1}{2520}hH\left(x-1\right)\left(1260h{x}^{5}-3150h{x}^{4}+18900h{x}^{2}-31500hx\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+12600{x}^{2}+14490h-25200x+12600\right)+\frac{1}{2520}h\left(10h{x}^{7}+35h{x}^{6}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+21h{x}^{5}+210h{x}^{4}+420h{x}^{3}+210{x}^{4}+420{x}^{3}\right),\end{array}$

$⋮$

and so on, in this manner the rest of the iterations can be obtained. Thus, the approximate solution in a series form when $h=-1$ is

$\begin{array}{c}u\left(x\right)={u}_{0}\left(x\right)+\underset{m=1}{\overset{8}{\sum }}{u}_{m}\left(x\right)\\ =H\left(x-1\right)\left(\frac{41629462050061}{11263435223040}-\frac{2498253046769}{563171761152}x-\frac{18764031409}{4704860160}{x}^{2}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\frac{1761739129}{274450176}{x}^{3}-\frac{502232959}{181621440}{x}^{4}+\frac{1677121153}{242161920}{x}^{5}-\frac{10243801115}{581188608}{x}^{6}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\frac{341190523}{13453440}{x}^{7}-\frac{150931763}{6209280}{x}^{8}+\frac{11334138401}{670602240}{x}^{9}-\frac{2673838147}{304819200}{x}^{10}\\ \text{\hspace{0.17em}}\text{\hspace{0.17em}}+\frac{2650717003}{79833600}{x}^{11}-\frac{1572737}{1905120}{x}^{12}+\frac{88586453}{1089728640}{x}^{13}+\frac{213052381}{8717829120}{x}^{14}\end{array}$

$\begin{array}{c}-\frac{6247867}{605404800}{x}^{15}+\frac{71250341}{58118860800}{x}^{16}+\frac{48109}{823350528}{x}^{17}\\ -\frac{1322521}{59281238016}{x}^{18}+\frac{74645}{140792940288}{x}^{19}+\frac{157891}{1126343522304}{x}^{20}\right)\\ +\left(x-\frac{1}{6}{x}^{3}-\frac{1}{12}{x}^{4}+\frac{1}{120}{x}^{5}+\frac{1}{72}{x}^{6}+\frac{19}{5040}{x}^{7}-\frac{1}{960}{x}^{8}\\ -\frac{299}{362880}{x}^{9}-\frac{43}{362880}{x}^{10}+\frac{3239}{39916800}{x}^{11}+\frac{869}{21772800}{x}^{12}\end{array}$

$\begin{array}{c}+\frac{8201}{6227020800}{x}^{13}-\frac{53}{10644480}{x}^{14}-\frac{2150341}{1307674368000}{x}^{15}\\ +\frac{1660739}{10461394944000}{x}^{16}+\frac{20675}{79041650688}{x}^{17}+\frac{11819}{209227898880}{x}^{18}\\ -\frac{12799}{750895681536}{x}^{19}-\frac{743}{56458321920}{x}^{20}-\frac{803}{252975550464}{x}^{21}\\ -\frac{73}{252975550464}{x}^{22}\right)\end{array}$ (3.24)

In Table 10 we list the MAE, the MRE, and the MRR, obtained by the HAM with the numeric solution (rkf45) ${u}_{N}\left(x\right)$ on the interval $\left[0,2\right]$ .

Figure 5 represents both the numeric solution (rkf45) ${u}_{N}\left(x\right)$ with a very small error and our approximation by HAM ( $m=8$ ) within the interval $0\le t\le 2$ .

Figure 5. Continuous line: ${u}_{N}\left(x\right),+:\text{HAM},\lambda =10,k=1$ .

Table 10. MAE, MRE and MRR for the case 3.2.2.

4. Conclusions

In this work, the HAM has been successfully applied to solve IVPs of second order with discontinuities. The size of the jump (given by $\lambda$ ) does not affect the convergence of the method, which behaves equally well on both sides of the discontinuity. In this IVPs, the application by the HAM with k, does not converge even for small values of the parameter like $\lambda$ .

The proposed scheme of the HAM has been applied directly without any need for transformation formulae or restrictive assumptions. The solution process by the HAM is compatible with the method in the literature providing analytical approximation such as ADM. The approach of the HAM has been tested by employing the method to obtain approximate-exact solutions of the linear case. The results obtained in all cases demonstrate the reliability and the efficiency of this method.

Cite this paper: Al-Hayani, W. and Fahad, R. (2019) Homotopy Analysis Method for Solving Initial Value Problems of Second Order with Discontinuities. Applied Mathematics, 10, 419-434. doi: 10.4236/am.2019.106030.
References

   Liao, S.J. (1992) The Proposed Homotopy Analysis Technique for the Solution of Nonlinear Problems. Doctoral Dissertation, Ph.D. Thesis, Shanghai Jiao Tong University, Shanghai.

   Liao, S.J. (1999) An Explicit, Totally Analytic Approximation of Blasius' Viscous Flow Problems. International Journal of Non-Linear Mechanics, 34, 759-778.
https://doi.org/10.1016/s0020-7462(98)00056-0

   Liao, S.J. (2003) Beyond Perturbation: Introduction to the Homotopy Analysis Method. CRC Press, Boca Raton.

   Casasús, L. and Al-Hayani, W. (2002) The Decomposition Method for Ordinary Differential Equations with Discontinuities. Applied Mathematics and Computation, 131, 245-251.
https://doi.org/10.1016/s0096-3003(01)00142-4

   Al-Hayani, W. and Casasús, L. (2006) On the Applicability of the Adomian Method to Initial Value Problems with Discontinuities. Applied Mathematics Letters, 19, 22-31.
https://doi.org/10.1016/j.aml.2005.03.004

   He, J.-H. (2004) The Homotopy Perturbation Method for Nonlinear Oscillators with Discontinuities. Applied Mathematics and Computation, 151, 287-292.
https://doi.org/10.1016/s0096-3003(03)00341-2

   He, J.-H. (2003) Homotopy Perturbation Method: A New Nonlinear Analytical Technique. Applied Mathematics and Computation, 135, 73-79.
https://doi.org/10.1016/s0096-3003(01)00312-5

   Adomian, G. (1986) Nonlinear Stochastic Operator Equations. Academic Press, New York.

   Wazwaz, A.M. (2000) A New Algorithm for Calculating Adomian Polynomials for Nonlinear Operators. Applied Mathematics and Computation, 111, 53-69.
https://doi.org/10.1016/s0096-3003(99)00063-6

Top