Analytical Solution for the Time-Dependent Emden-Fowler Type of Equations by Homotopy Analysis Method with Genetic Algorithm

In this paper, Homotopy Analysis method with Genetic Algorithm is presented and used to obtain an analytical solution for the time-dependent Emden-Fowler type of equations and wave-type equation with singular behavior at x = 0. The advantage of this single global method employed to present a reliable framework is utilized to overcome the singularity behavior at the point x = 0 for both models. The method is demonstrated for a variety of problems in one and higher dimensional spaces where approximate-exact solutions are obtained. The results obtained in all cases show the reliability and the efficiency of this method.


Introduction
In many previous works of the diffusion of heat perpendicular to the surfaces of parallel planes are modeled by the heat equation ( ) where ( ) ( ) ( ) , , f x t g y h x t + is the nonlinear heat source, ( ) , y x t is the tem-perature, and t is the dimensionless time variable.For the steady-state case, and for 2 r = , ( ) , 0 h x t = , Equation ( 2) is the Emden-Fowler equation [1] [2] [3] given by ( ) ( ) ( ) ( ) 0 2 0, 0 , 0 0, y y af x g y y y y where ( ) f x and ( ) g y are some given functions of x and y respectively.For ( ) 1 f x = and ( ) n g y y = , Equation ( 3) is the standard Lane-Emden equation that was used to model the thermal behavior of a spherical cloud of gas acting under the mutual attraction of its molecules [1] and subject to the classical laws of thermodynamics.For other special forms of ( ) g y , the well-known Lane-Emden equation was used to model several phenomena in mathematical physics and astrophysics such as the theory of stellar structure, the thermal behavior of a spherical cloud of gas, isothermal gas spheres, and theory of thermionic currents [1] [2] [3].A substantial amount of work has been done on this type of problems for various structures of ( ) g y in [1]- [7].On the other hand, the wave type of equations with singular behavior is given by ( ) x x y af x t g y h x t y x L t T r will be examined as well, where ( ) ( ) ( ) , , f x t g y h x t + is a nonlinear source, t is the dimensionless time variable, and ( ) , y x t is the displacement of the wave at the position x and at time t.The singularity behavior that occurs at the point 0 x = is the main difficulty in the analysis of Equations ( 2) and (5).Wazwaz [8] used the Adomian decomposition method (ADM) to get an analytical solution for the time-dependent Emden-Fowler type of equations and wave-type equation with singular behavior.
The main objective of this paper is to apply Homotopy Analysis Method (HAM) to obtain approximate-exact solutions for different models for the timedependent Emden-Fowler type of equations and wave-type equation with singular behavior at 0 x = .While the VIM [9] [10] requires the determination of Lagrange multiplier in its computational algorithm, HAM is independent of any such requirements, HAM handles linear and nonlinear terms in a simple and straightforward manner without any additional requirements.Also, in this paper we apply Genetic Algorithm (GA) to obtain an approximate solution of the same equations.
In what follows, we give a brief review of Homotopy analysis method and Genetic algorith.

Analysis of the Homotopy Analysis Method
To describe the basic ideas of the HAM, we consider the following differential where N is a nonlinear operator, x and t denote the independent variables, ( ) , y x t is an unknown function and ( ) , k x t 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 [11] constructs the so called zero-order deformation equation where [ ] 0,1 q ∈ is an embedding parameter, h is a nonzero auxiliary parameter, L is an auxiliary linear operator, ( ) 0 , y x t is an initial guess of ( ) , y x t and ( ) , ; x t q φ is an unknown function.It is important, that one has great freedom to choose auxiliary objects such as h and L in HAM.Obviously, when 0 q = and respectively.Thus, as q increases from 0 to 1, the solution ( ) , ; x t q φ varies from the initial guess ( ) 0 , y x t to the solution ( ) , y x t .Expanding ( ) Taylor series with respect to q, we have x t q y x t y x t q where If the auxiliary linear operator, the initial guess, the auxiliary parameter h, and the auxiliary function are so properly chosen, the above series (9) converges at which must be one of the solutions of the original nonlinear equation, as proved by Liao [11].If which is used mostly in the Homotopy perturbation method [12].
Differentiating Equation ( 7) m times with respect to the embedding parameter q and then setting 0 q = and finally dividing them by !m , we have the so- called mth-order deformation equation , , , where and It should be emphasized that ( ) are governed by the linear Equation ( 14) 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.The simplest form of genetic algorithm involves three types of operators: selection, crossover and mutation.

Genetic Algorithms
Selection: This operator selects chromosomes in the population for reproduction.The fitter the chromosome, the more times it is likely to be selected to reproduce.
Crossover: This operator randomly chooses a locus and exchanges the subsequences before and after that locus between two chromosomes to create two offspring.For example, the strings 10000100 and 11111111 could be crossed over after the third locus in each to produce the two offspring 10011111 and 11100100.
The crossover operator roughly mimics biological recombination between two single-chromosome (haploid) organisms.
Mutation: This operator randomly flips some of the bits in a chromosome.
For example, the string 00000100 might be mutated in its second position to yield 01000100.Mutation can occur at each bit position in a string with some probability, usually very small (e.g., 0.001).Algorithm 3 A Simple Genetic Algorithm [13] [14] Given a clearly defined problem to be solved and a bit string representation for candidate solutions, a simple GA works as follows: 1. Start with a randomly generated population of n l-bit chromosomes (candidate solutions to a problem).(b) With probability pc (the "crossover probability" or "crossover rate"), cross over the pair at randomly chosen point (chosen with uniform probability) to form two offspring.If no crossover takes place, form two offspring that are exact copies of their respective parents.(Note that here the crossover rate is defined to be the probability that two parents will crossover in a single point.There are also "multi-point crossover" versions of the GA in which the crossover rate for a pair of parents is the number of points at which a crossover takes place).
(c) Mutate the two offspring at each locus with probability pm (the "mutation probability" or "mutation rate"), and place the resulting chromosomes in the new population.If n is odd, one new population member can be discarded at random.

4.
Replace the current population with the new population.

Go to step 2.
Also see the flow chart (Figure 1).

Applications of the Method
In this work, we examine six distinct models with singular behavior at 0 x = , two linear time-dependent Lane-Emden type of equations, two linear models of wave-type equation, and two nonlinear singular models.To show the high accuracy of the solution results compared with the exact solution, we give the numerical results applying the Genetic Algorithm (GA), HAM ( )

Time-Dependent Lane-Emden Type
with the property where i c ( ) are constants of integration.Furthermore, Equation ( 17) suggests that we define the nonlinear operator as .
Using the above definition, we construct the zeroth-order deformation equa-start Generate a population of chromosomes of size N: Calculate the fitness of each chromosome: Is the termination Crlterion satisfied?7) and ( 8) and the mth-order deformation equation for with the initial conditions ( ) ( ) ( ) where Now, the solution of the mth-order deformation Equation ( 23) for We now successively obtain

x t h x h x h h x h h x y x t h x h x h h x h h x h h h x h h h x
and so on, in this manner the rest of the iterations can be obtained.Thus, the approximate solution in a series form is given by Hence, the series solution when This series has the closed form as n → ∞ ( ) which is the exact solution of ( 17)-( 18) compatible with ADM [8].
Also, this example is solved by using GA as follows: We'll choose six values of x between ( ) 0,1 randomly, and converting them from the decimal format to the binary format 0.2 0.001100110011 0.9 0.111001100100 f x t is the series solution of HAM given by (29) and ( ) , is the probability of each chromosomes with The optimal solution is found after 51 generation to converge to the exact solution, where , with the property where i c ( ) are constants of integration.Furthermore, Equation (31) suggests that we define the nonlinear operator as x t q x t q N x t q x x t q x x x x t q x x t Using the above definition, we construct the zeroth-order deformation equation as in ( 7) and ( 8) and the mth-order deformation equation for , , , with the initial conditions where ) Now, the solution of the mth-order deformation Equation (37) for

x t x x h x x x h y x t h x h x h x hx h x hx h x h x h h x h h x h h x
and so on, in this manner the rest of the iterations can be obtained.Thus, the approximate solution in a series form is given by which is the exact solution of the problem (31)-(32) compatible with ADM [8].
Notice that the noise terms that appear between various components vanish in the limit.
Using GA by the same procedure as in example 1, we get the optimal solution is found after 51 generation to converge to the exact solution, where x = 4.9489E−05 and 7.6780 05 t E = − .After execute the Equation (43) many times by using GA as in Table 2 we found the optimal solution.

Singular Wave-Type Equations
Example 3. Now, we consider the inhomogeneous singular wave-type equation, ( ) , ; , ; 2 , ; , x t q x t q L x t q x x x φ φ φ with the property where i c ( ) are constants of integration.Furthermore, Equation ( 45) suggests that we define the nonlinear operator as , ; 12 5 4 .
x t q x t q N x t q x t q Using the above definition, we construct the zeroth-order deformation equation as in ( 7) and ( 8) and the mth-order deformation equation for , , , with the initial conditions ( ) ( ) ( ) where ) Now, the solution of the mth-order deformation Equation (50) for We now successively obtain

x t x x h x x x h y x t h x h x h x hx h x hx h x h x h h x h h x h h x
and so on, in this manner the rest of the iterations can be obtained.Thus, the approximate solution in a series form is given by Hence, the series solution when 1 h = − is given by ( ) which is the exact solution of the problem ( 45)-( 46) compatible with ADM [8].
Notice that the noise terms that appear between various components vanish in the limit.
Using GA by the same procedure as in example 1, we get the optimal solution is found after 51 generation to converge to the exact solution, where 0 x = and 0.879 t = . After execute the Equation (56) many times by using GA as in Table 3 we found the optimal solution Example 4. We now examine the inhomogeneous wave-type equation, ( x To solve Equations ( 58)-( 59) by means of the standard HAM, we choose the initial approximation ( ) and the linear operator with the property where i c ( ) suggests that we define the nonlinear operator as Table 3. Optimal solution of genetic algorithm for example 3.
x t q x t q N x t q x x x t q x x x x t q x x t t Using the above definition, we construct the zeroth-order deformation equation as in ( 7) and ( 8) and the mth-order deformation equation for , , , with the initial conditions ) ( ) Now, the solution of the mth-order deformation Equation (64) for We now successively obtain

y x t hx hx y x t h x h x h h x h h x y x t h x h x h h x h h x h h h x h h h x
and so on, in this manner the rest of the iterations can be obtained.Thus, the approximate solution in a series form is given by Thus, the series solution when 1 h = − is given by Using GA by the same procedure as in example 1, we get the optimal solution is found after 51 generation to converge to the exact solution, where x = 4.6903E−06 and 1.1498 06 t E = − .After execute the Equation (70) many times by using GA as in Table 4 we found the optimal solution , ; , ; 5 , ; , x t q x t q L x t q x x x φ φ φ with the property where i c ( ) are constants of integration.Furthermore, Equation (72) suggests that we define the nonlinear operator as , ; , ; 5 , ; 24 16 e , ; 2 e .
x t q x t q x t q x t q N x t q t t x Using the above definition, we construct the zeroth-order deformation equation as in (7) and ( 8) and the mth-order deformation equation for and Now, the solution of the mth-order deformation Equation (78) for

y x t ht x hx htx y x t h t h t h x h t h t x h t ht h h x h h tx
and so on, in this manner the rest of the iterations can be obtained.Thus, the approximate solution in a series form is given by , ; , ; 6 , ; , x t q x t q L x t q with the property where i c ( ) are constants of integration.Furthermore, Equation (87) suggests that we define the nonlinear operator as x t q x t q N x t q t x x t q x x x x t q t x t q x t q t φ φ φ φ φ φ φ   Thus, the series solution when 1 h = − is given by ( )  which is the exact solution of the problem (87)-(88) compatible with ADM [8].

y x t hx htx y x t h x h tx h h x h t x h h tx y x t h x h tx h h x h t x h h tx h t h h x h h t x
Using GA by the same procedure as in example 1, we get the optimal solution is found after 51 generation to converge to the exact solution, where 0.270 x = and 0.935 t = . After execute the Equation (100) many times by using GA as in Table 6 we found the optimal solution.

Conclusions
To our best knowledge, this is the first result on the application of the HAM with GA to solve models of the time-dependent Emden-Fowler type of equations and wave-type equation with singular behaviors.The HAM with GA has been successfully applied to solve models of the time-dependent Emden-Fowler type of equations and wave-type equation with singular behaviors.The HAM with GA has worked effectively to handle these models giving it a wider applicability.The proposed scheme of HAM has been applied directly without any need for transformation formulae or restrictive assumptions.The solution process of HAM is compatible with those methods in the literature providing analytical approximation such as ADM.
The approach of HAM with GA has been tested by employing the method to obtain approximate-exact solutions of six examples.The results obtained in all cases demonstrate the reliability and the efficiency of this method.

2 .
Calculate the fitness ( ) , f x t of each chromosome x and t in the population.3. Repeat the following steps until n offspring have been created: (a) Select a pair of parent chromosomes from the current population, the probability of selection being an increasing function of fitness.Selection is done "with replacement," meaning that the same chromosome can be selected more W. Al-Hayani et al. than once to become a parent.
Padé approximants (PA) of order [ ] p q , and the numerical solution with the Simpson rule (SIMP).Twenty points have been used in the Simpson rule.The computations associated with the examples were performed using a Maple 13 package with a precision of 20 dgits.

Figure 1 .
Figure 1.Flow Chart of Genetic Algorithm.
Select a pair of chromosome for mating With the crossover probability p c , exchange parts of the two selected chromosomes and create two offspring With the mutation probability p m , randomly change the gene values in the two offspring chromosomes Place the resulting chromosomes in the new population Is the size of the new population equal to N ?Replace the current chromosome population with the new population stop Yes No No Yes tion as in (

∑
We arrange the chromosomes an ascending order and then choose less than four chromosomes to find the best solution In this step of GA, crossover operation (two points) is done as follows:In the last step of GA a mutation operation (bit inverse, 3 m = ) and then converting them from the binary format to the decimal format: x exact solution of the problem (58)-(59) compatible with ADM [8].
Thus, the series solution when 1 h = − is given by

(
Example 1. Firstly, let us consider the following linear homogeneous equation

Table 1 .
Optimal solution of genetic algorithm for example 1.
and 2.2287430 05 t E = − .After executethe Equation (29) many times by using GA as in Table1we found the optimal solution.

Table 2 .
Optimal solution of genetic algorithm for example 2.

Table 4 .
Optimal solution of genetic algorithm for example 4.

Table 5 .
Optimal solution of genetic algorithm for example 5.
, in this manner the rest of the iterations can be obtained.Thus, the approximate solution in a series form is given by

Table 6 .
Optimal solution of genetic algorithm for example 6.