**1. Introduction**

The singular initial value problem

$$\begin{aligned} \frac{d^2y}{dx^2} + \frac{\chi}{\varkappa} \frac{dy}{d\varkappa} + r(\varkappa, y) &= s(\varkappa), \; 0 < \varkappa, \; \varkappa > 0\\ y(0) &= a, \frac{dy}{d\varkappa}(0) = 0, a \in \mathbb{R} \end{aligned} \tag{1}$$

for the Lane-Emden Eq. (1) models several phenomena such as the thermal behaviour of a spherical cloud of gas acting under the mutual attraction of its molecules [1], the temperature variation of a self gravitating star, the kinetics of combustion [2], thermal explosion in a rectangular slab [3] and the density distribution in isothermal gas spheres [4]. Moreover, Eq. (1) has been used many a time as a benchmark for new methods.

A particular case of Eq. (1) is the Emden-Fowler equation of the first kind:

$$\frac{d^2\mathbf{y}}{d\mathbf{x}^2} + \frac{2}{\mathbf{x}}\frac{d\mathbf{y}}{d\mathbf{x}} + \mathbf{y}^m = \mathbf{0}, \mathbf{y}(\mathbf{0}) = \mathbf{1}, \frac{d\mathbf{y}}{d\mathbf{x}}(\mathbf{0}) = \mathbf{0}, m \in \mathbb{N} \tag{2}$$

As mentioned in [5], Eq. (2) represents the dimensionless form of the governing equation for the gravitational potential of a Newtonian self-gravitating, spherically

symmetric, polytropic fluid. The equation provides a useful approximation for stars.

A more general form for Eq. (2) is the Emden-Fowler equation

$$\frac{d^2y}{d\mathfrak{x}^2} + \frac{\chi}{\mathfrak{x}}\frac{dy}{d\mathfrak{x}} + f(\mathfrak{x})\mathfrak{g}(y) = \mathbf{0} \tag{3}$$

on the problem domain 0, ½ � *L* and the method makes use of Radial basis functions.

In Section 2 we describe the MSRM for the model problem. In Section 3 we make use of examples to demonstrate the accuracy and computational efficiency of the

*<sup>x</sup> <sup>y</sup>*<sup>0</sup> <sup>þ</sup> *f x*ð Þ*g y*ð Þ¼ 0, 0 <sup>&</sup>lt;*x*≤*L*, *<sup>y</sup>*ð Þ¼ <sup>0</sup> *<sup>α</sup>*, *<sup>y</sup>*<sup>0</sup>

The method by Ramos proceeds by using the same linearisation method on the subintervals *Im*,ð Þ *m* ¼ 1, ⋯, *M* of *I* � *Iε*, i.e. *away from the singularity*. To this end, at the interface *xm*�<sup>1</sup> of *Im*�<sup>1</sup> and *Im* we make use the solution of Eq. (3) restricted to *Im*�<sup>1</sup> to generate the initial conditions for Eq. (3) restricted to *Im*. This ensures continuity of the solution. In this chapter we avoid linearisation on *I* � *I<sup>ε</sup>* by making use of the SRM on the subintervals of *I* � *Iε*. However, as was done in [23] we make use of linearisation on *Iε*. This approach results in the MSRM. A detailed description

Let *ε*∈ð Þ 0, *L* be a sufficiently small number. Restrict problem (5) to 0, ½ � *ε* and

*<sup>m</sup>*¼<sup>1</sup>*Im* where *Im* <sup>¼</sup> ½ � *xm*�1, *xm* , *<sup>x</sup>*<sup>0</sup> <sup>¼</sup> *<sup>ε</sup>* and*xM* <sup>¼</sup> *<sup>L</sup>* (6)

where *γ* >0, *L*, *α* are given constants and *f* and *g* are given functions. We follow the idea behind the solution method by Ramos [23], where the singularity at *x* ¼ 0 is isolated in a sufficiently small subinterval *I<sup>ε</sup>* ¼ ½ � 0, *ε* of *I* ¼ ½ � 0, *L* where *ε* >0. The point *x* ¼ *ε* splits interval *I* into two subintervals: *I<sup>ε</sup>* and *I* � *I<sup>ε</sup>* ¼ ½ � *ε*, *L* . A linearisation method is used to solve Eq. (5) restricted to *Iε*, i.e., *near the singularity* at *x* ¼ 0. In order to improve the accuracy of the method on the

ð Þ¼ 0 0 (5)

Unlike making use of collocation methods for solving Eq. (3) Van Gorder and Vajravelu [1] used the Runge–Kutta-Felhberg 4-5 (RKF45) method to validate the analytical solutions that they obtained from using the HAM and from using the traditional power series method. The RKF45 method is an embedded Runge–Kuttapair which makes use of an adaptive stepsize to control the method and to ensure stability properties such as *A*-stability. See [16] for more details on the RKF45 method. In this chapter we make use of a modified version of the spectral relation method (SRM) to solve an initial value problem for Eq. (3). We denote our method by MSRM. The SRM was successfully used to solve fluid flow problems by for example Motsa [17], Motsa *et al.* [18], Shateyi *et al.* [19] and Gangadhar *et al.* [20] to mention a few. In [17–20] the SRM was shown to be accurate, computationally efficient and easy to implement. Moreover, the SRM was applied only after transforming the governing partial differential differential equations to ordinary differential equations. However, not so long ago the SRM was modified in such a way that it was directly applicable to partial differential equations. See for example [21]. The SRM was used to solve other types of problems such as hyperchaotic systems [22]. It is to the best of our knowledge that the MSRM has not been used in existing literature. We chose the MSRM because it

*A Modified Spectral Relaxation Method for Some Emden-Fowler Equations*

*DOI: http://dx.doi.org/10.5772/intechopen.96611*

is not computationally intensive and it is easy to implement.

MSRM. Section 4 concludes this chapter.

**2. The MSRM for the model problem**

We seek an approximate solution to

*<sup>y</sup>*<sup>00</sup> <sup>þ</sup> *<sup>γ</sup>*

subinterval *I* � *I<sup>ε</sup>* we form a partition

*<sup>I</sup>* � *<sup>I</sup><sup>ε</sup>* <sup>¼</sup> <sup>∪</sup>*<sup>M</sup>*

of the MSRM is given in Sections 2.1 and 2.2.

**2.1 Near the singularity**

re-arrange to get

**117**

which can be written as

$$h(py')' + qy = h(\mathfrak{x}, \mathfrak{y}, \mathfrak{y}') \text{ where} \\ \mathrm{()}' = \frac{d}{d\mathfrak{x}}\, (\text{)}, \tag{4}$$

an equation which was discussed in [6]. An existence result for the solution is given therein under certain conditions on *p x*ð Þ, *q x*ð Þ and *h x*, *y*, *y*<sup>0</sup> ð Þ.

Exact solutions are available for particular cases of Eq. (3) [7], but not for the general case according to the best of our knowledge. This is motivation enough for seeking approximate solutions. To this end several approximate analytical methods were used by other researchers to solve Eq. (3). Van Gorder [8] made use of the Homotopy analysis method (HAM) and its variant, the Optimal homotopy analysis method, to solve a boundary value problem for the Lane-Emden equation of the second kind. The two respective analytical solutions that they obtained were in strong agreement. The Homotopy perturbation method (HPM) is another variant of the HAM that was used by Chowdhury and Hashim [9] to solve an initial value problem for Eq. (3). Their analytical solutions were the same as those that were obtained by Wazwaz [10] using the Adomian decomposition method (ADM). Chowdhury and Hashim observed that the HPM was less computationally expensive than the ADM. Wazwaz [11] made use of the variational iteration method (VIM) to solve both initial value problems and boundary value problems for Eq. (3) and for some inhomogeneous Emden-Fowler equations. The results that they obtained demonstrated the reliability and effectiveness of the VIM.

Some numerical methods have been used by other researchers to approximate solutions to Eq. (3). Many of these numerical methods fall in the class of *collocation methods*. Examples of these collocation methods include but are not limited to the Chebyshev wavelet finite difference method (CWFDM) [12], the Haar wavelet collocation method (HWCM) [13], the Taylor wavelet method (TWM) [14] and the Radial basis function - differential quadrature method (RDF-DQM) [15]. One distinct feature of these collocation methods is the choice of collocation points for discretizing the problem domain. Another distinct feature is the choice of basis functions that are used either for constructing numerical solutions or for numerical differentiation. The CWFDM makes use of Chebyshev-Gauss-Lobatto collocation points and Chebyshev wavelet finite difference basis functions. The HWCM makes use of the collocation points

$$\mathbf{x}\_{j} = (\mathbf{j} - \mathbf{0}.\mathbf{5})/2\mathbf{M}, j = \mathbf{1}, \cdots, \mathbf{2M}$$

on the problem domain 0, ½ � *L* , and the method uses integrals of Haar wavelets as basis functions. The TWM uses roots of shifted Legendre polynomials as collocation points, and as basis functions the method uses Taylor wavelets which are special functions that defined in terms of Taylor polynomials. Convergence results for the Taylor wavelet solution were presented in [14]. The RDF-DQM uses collocation points

$$\mathbf{x}\_{j} = \frac{2}{L} \left( \mathbf{1} - \cos \left( \frac{j - 1}{N - 1} \right) \right), j = 1, \dots, N$$

#### *A Modified Spectral Relaxation Method for Some Emden-Fowler Equations DOI: http://dx.doi.org/10.5772/intechopen.96611*

on the problem domain 0, ½ � *L* and the method makes use of Radial basis functions. Unlike making use of collocation methods for solving Eq. (3) Van Gorder and Vajravelu [1] used the Runge–Kutta-Felhberg 4-5 (RKF45) method to validate the analytical solutions that they obtained from using the HAM and from using the traditional power series method. The RKF45 method is an embedded Runge–Kuttapair which makes use of an adaptive stepsize to control the method and to ensure stability properties such as *A*-stability. See [16] for more details on the RKF45 method.

In this chapter we make use of a modified version of the spectral relation method (SRM) to solve an initial value problem for Eq. (3). We denote our method by MSRM. The SRM was successfully used to solve fluid flow problems by for example Motsa [17], Motsa *et al.* [18], Shateyi *et al.* [19] and Gangadhar *et al.* [20] to mention a few. In [17–20] the SRM was shown to be accurate, computationally efficient and easy to implement. Moreover, the SRM was applied only after transforming the governing partial differential differential equations to ordinary differential equations. However, not so long ago the SRM was modified in such a way that it was directly applicable to partial differential equations. See for example [21]. The SRM was used to solve other types of problems such as hyperchaotic systems [22]. It is to the best of our knowledge that the MSRM has not been used in existing literature. We chose the MSRM because it is not computationally intensive and it is easy to implement.

In Section 2 we describe the MSRM for the model problem. In Section 3 we make use of examples to demonstrate the accuracy and computational efficiency of the MSRM. Section 4 concludes this chapter.
