Homotopy Analysis Method for Solving Initial Value Problems of Second Order with Discontinuities ()
1. Introduction
Liao Shijun [1] [2] [3] 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 [4] [5] applied the Adomian decomposition method (ADM) to the initial value problems (IVPs) with discontinuities. Ji-Huan [6] 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
(2.1)
where
is a nonlinear operator, x denotes independent variable,
is an unknown function, and
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 [1] [2] [3] constructs the so-called zero-order deformation equation
(2.2)
where
is an embedding parameter,
, is a non-zero auxiliary parameter
is an auxiliary function,
is an auxiliary linear operator,
is an initial guess of
and
is an unknown function. It is important to note that one has great freedom to choose auxiliary objects such as h and
in the HAM. Obviously when
and
, both
(2.3)
hold. Thus as q increases from 0 to 1, the solution
varies from the initial guess
to the solution
. Expanding
in Taylor series with respect to q, one has
(2.4)
where
(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
and one has
(2.6)
which must be one of the original non-linear equation, as proved by Liao [1] [2] [3] . If
, Equation (2.2) becomes
(2.7)
which is used mostly in the HPM [6] [7] .
According to Equation (2.5), the governing equations can be deduced from the zeroth-order deformation Equations (2.2). We define the vectors
(2.8)
Differentiating Equation (2.2) m times with respect to the embedding parameter q and then setting
and finally dividing them by
, we have the so-called mth-order deformation equation
(2.9)
where
(2.10)
and
(2.11)
It should be emphasized that
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 [4] :
(3.1)
where
and
are real constants, g is a (possibly) nonlinear function of
and f is a function with some discontinuity.
To sole Equation (3.1) by means of the standard HAM, we choose the initial approximations
(3.2)
and the linear operator
(3.3)
with the property
(3.4)
where
and
are constants of integration. Furthermore, Equation (3.1) suggests that we define the nonlinear operator as
(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
is
(3.6)
with the initial conditions
(3.7)
where
(3.8)
Now, the solution of the mth-order deformation Equation (3.6) for
is
(3.9)
Thus, the approximate solution in a series form is given by
(3.10)
3.1. Linear Case
Let
,
and
.
Case 3.1.1 If we take
and the function
is continuous, but not differentiable, for example
(3.11)
From Equation (3.9) the first iterations are then determined in the following recursive way:
and so on, in this manner the rest of the iterations can be obtained. Thus, the approximate solution in a series form when
is
(3.12)
where
and
This series has the closed form as
(3.13)
where
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 (
), 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),
, the Maximum Relative Error (MRE), the Maximum Residual Error (MRR), obtained by the HAM with the exact solution (3.13) on the interval
. 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
and our approximation by HAM (
) within the interval
.
For
, the application of the HAM requires approximants of order
if we want to arrive beyond the discontinuity (at
).
Case 3.1.2 Taking
and
(3.14)
The Heaviside step function at
. We now successively obtain
Figure 1. Continuous line:
.
Table 1. Numerical results for the case 3.1.1.
Table 2. MAE,
, MRE and MRR for the case 3.1.1.
and so on, in this manner the rest of the iterations can be obtained. Thus, the approximate solution in a series form when
is
(3.15)
where
and
This series has the closed form as
(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 (
), 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,
, the MRE, and the MRR, obtained by the HAM with the exact solution (3.16) on the interval
. The EOC for different values of the constant k are given in Table 6.
Figure 2 represents both the exact solution
and our approximation by HAM (
) within the interval
.
Case 3.1.3 Taking
and
, the Dirac delta function at
. We now successively obtain
Figure 2. Continuous line:
.
Table 4. Numerical results for the case 3.1.2.
Table 5. MAE,
, MRE and MRR for the case 3.1.2.
and so on, in this manner the rest of the iterations can be obtained. Thus, the approximate solution in a series form when
is
(3.17)
This series has the closed form as
(3.18)
which is exactly the exact solution for the case 3.1.3.
In Table 7 we list the MAE,
, the MRE, and the MRR, obtained by the HAM with the exact solution (3.18) on the interval
. The EOC are 1.0984 at
and 1.1156 at
.
Figure 3 gives both the exact solution
and our approximation by HAM (
) within the interval
.
3.2. Non-Linear Case
Let
and
.
Case 3.2.1 Taking
, and
(3.19)
Using the Adomian polynomials [8] [9] for calculation the nonlinear term
is given by
(3.20)
We now successively obtain
Figure 3. Continuous line:
.
Table 7. MAE,
, MRE and MRR for the case 3.1.3.
and so on, in this manner the rest of the iterations can be obtained. Thus, the approximate solution in a series form when
is
(3.21)
where
and
In Table 8 show a comparison of the numerical results applying the HAM (
), Iteration of the Integral Equation (IIE) (3.9), and the numerical solution of (3.9) with Simpson rule (SIMP) with the numeric solution (rkf45)
. In Table 9 we list the MAE, the MRE, and the MRR, obtained by the HAM with the numeric solution (rkf45)
on the interval
.
Figure 4 represents both the numeric solution (rkf45)
with a very small error and our approximation by HAM (
) within the interval
.
Case 3.2.2 Taking
, and
(3.22)
Using the Adomian polynomials [8] [9] for calculation the nonlinear term
is given by
Figure 4. Continuous line:
.
Table 8. Numerical results for the case 3.2.1.
Table 9. MAE, MRE and MRR for the case 3.2.1.
(3.23)
we now successively obtain
and so on, in this manner the rest of the iterations can be obtained. Thus, the approximate solution in a series form when
is
(3.24)
In Table 10 we list the MAE, the MRE, and the MRR, obtained by the HAM with the numeric solution (rkf45)
on the interval
.
Figure 5 represents both the numeric solution (rkf45)
with a very small error and our approximation by HAM (
) within the interval
.
Figure 5. Continuous line:
.
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
) 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
.
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.