\documentclass[reqno]{amsart}
\usepackage{hyperref}

\AtBeginDocument{{\noindent\small
\emph{Electronic Journal of Differential Equations},
Vol. 2015 (2015), No. 28, pp. 1--11.\newline
ISSN: 1072-6691. URL: http://ejde.math.txstate.edu or http://ejde.math.unt.edu
\newline ftp ejde.math.txstate.edu}
\thanks{\copyright 2015 Texas State University - San Marcos.}
\vspace{9mm}}

\begin{document}
\title[\hfilneg EJDE-2015/28\hfil Volterra integro-differential equations]
{Numerical solutions for Volterra integro-differential forms
of Lane-Emden equations of first and second kind using Legendre multi-wavelets}

\author[P. K. Sahu, S. Saha Ray \hfil EJDE-2015/28\hfilneg]
{Prakash Kumar Sahu, Santanu Saha Ray}

\address{Prakash Kumar Sahu \newline
National Institute of Technology Rourkela, Department of Mathematics,
Rourkela, Odisha-769008, India}
\email{prakash.2901@gmail.com}

\address{Santanu Saha Ray \newline
National Institute of Technology Rourkela, Department of Mathematics,
Rourkela, Odisha-769008, India}
\email{santanusaharay@yahoo.com}

\thanks{Submitted June 23, 2014 Published January 29, 2015.}
\subjclass[2000]{45D05, 45J05}
\keywords{Legendre multi-wavelet; Volterra integral equation;
\hfill\break\indent integro-differential equation; Lane-Emden equation}

\begin{abstract}
 A numerical method based on Legendre multi-wavelets is applied for solving
 Lane-Emden equations which form Volterra integro-differential equations.
 The Lane-Emden equations are converted to Volterra integro-differential
 equations and then are solved by the Legendre multi-wavelet method.
 The properties of Legendre multi-wavelets are first presented.
 The properties of Legendre multi-wavelets are used to reduce the system of
 integral equations to a system of algebraic equations which can be solved
 by any numerical method. Illustrative examples are discussed to show
 the validity and applicability of the present method.
\end{abstract}

\maketitle
\numberwithin{equation}{section}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{example}[theorem]{Example}
\allowdisplaybreaks

\section{Introduction}

In this article, we discuss a Lane-Emden equation of first kind
\cite{3,1,2,4,5} of the form
\begin{equation}\label{1.1}
y''+\frac{\kappa}{x}y'+y^{m}=0,\quad y(0)=1,\quad y'(0)=0,\quad \kappa >1
\end{equation}
and Lane-Emden equation of second kind \cite{6,8,7} of the form
\begin{equation}\label{1.2}
y''+\frac{\kappa}{x}y'+e^{y}=0,\quad y(0)=1,\quad y'(0)=0,\quad \kappa \geq 1
\end{equation}
where $\kappa $ is the shape factor.

Equation \eqref{1.1} is a basic equation in the theory of stellar 
structure \cite{Chandrasekhar:1967}. It is used in astrophysics for 
computing the structure of interiors of polytropic stars. This equation 
describes the temperature variation of a spherical gas cloud under the mutual 
attraction of its molecules and subject to the laws of thermodynamics \cite{2}. 
 The Lane-Emden equation of the first kind appears also in other contexts such 
as radiative cooling, self-gravitating gas clouds, mean-field treatment of a 
phase transition in critical adsorption, and  modeling of clusters of galaxies.

Equation \eqref{1.2} is the Lane-Emden equation of the second kind that models 
the non-dimensional density distribution $y(x)$  in an isothermal gas sphere 
\cite{9}. In the study of stellar structures one considers the star as a
 gaseous sphere in thermodynamic and hydrostatic equilibrium for a certain 
equation of state \cite{10}.

The well-known Lane-Emden equation has been 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, 
the theory of thermionic currents, and in the modeling of clusters of galaxies.
 A substantial amount of work has been done on these types of problems for 
various structures. The singular behavior that occurs at $x=0$ is the main 
difficulty of eqs. \eqref{1.1}--\eqref{1.2}.

In this article, our main work is to establish Volterra integro-differential 
equation equivalent to the Lane-Emden equation of first and second kind. 
The newly established Volterra integro-differential equation will be solved
 by using the Legendre multi-wavelet method (LMWM). Legendre multi-wavelet 
method has been applied to solve the integral equations and 
integro-differential equations of different forms \cite{11,12,13,14,15}. 
The Legendre multi-wavelet method converts the Volterra integro-differential
 equation to a system of algebraic equations and that algebraic equations 
system again can be solved by any of the usual numerical methods.

\section{Volterra integro-differential form of the Lane-Emden equation}
\label{sec:2}

Let us consider the  Lane-Emden equation
\begin{equation}\label{2.1}
y''(x)+\frac{\kappa}{x}y'(x)+f(y)=0,\quad y(0)=\alpha ,\quad y'(0)=0,\quad 
 \kappa \geq 1.
\end{equation}
Multiplying by $x^{\kappa}$ and integrating on $[0,x]$ we have
\begin{equation}\label{2.4}
y'(x)=-\int_{0}^{x}\big( \frac{t^{\kappa }}{x^{\kappa }}\big) f(y(t))dt \quad
 \kappa \geq  1, \quad y(0)=\alpha.
\end{equation}
Integrating again on $[0,x]$, \eqref{2.1} becomes
\begin{equation}\label{2.2}
y(x)=\alpha -\frac{1}{\kappa -1}\int_{0}^{x}t
\Big( 1-\frac{t^{\kappa -1}}{x^{\kappa -1}}\Big) f(y(t))dt.
\end{equation}

\section{Properties of Legendre multi-wavelets}
\label{sec:3}

Wavelets constitute a family of functions constructed from dilation and 
translation of a single function called mother wavelet. When the dilation 
parameter $a$ and the translation parameter $b$ vary continuously, we have 
the following family of continuous wavelets as
\begin{equation}\label{3.1}
\Psi_{a,b}(x)=\vert a\vert^{-1/2}\Psi \big( \frac{x-b}{a}\big) ,\quad 
a,b\in \mathbb{R},\; a\neq 0
\end{equation}
If we restrict the parameters $a$ and $b$ to discrete values as 
$ a=a_{0}^{-k} $, $ b=nb_{0}a_{0}^{-k} $, $ a_{0}>1 $, $ b_{0}>0 $ and $n$, 
and $k$ are positive integers, we have the following family of discrete wavelets:
$$
\psi _{k,n}(x)=\vert a_{0}\vert^{-k/2}\psi (a_{0}^{k}x-nb_{0}),
$$
where $\psi _{k,n}(x)$ forms a wavelet basis for $L^{2}(\mathbb {R})$. 
In particular, when $a_{0}=2$ and $b_{0}=1$, then $\psi _{k,n}(x)$ 
form an orthonormal basis.

Legendre multi-wavelets $\psi _{n,m}(x)=\psi (k,n,m,x)$ have four arguments.
 $n=0,1,2,\dots ,2^{k}-1$, $k\in \mathbb{Z^{+}}$,  where
$m$ is the order of Legendre polynomials and $x$ is normalized time. 
These functions  are defined on $[0,T)$ as (see \cite{16})
\begin{equation}\label{3.2}
\psi _{n,m}(x)=\begin{cases}
\sqrt{2m+1}\big( \frac{2^{k/2}}{\sqrt{T}}\big) 
P_{m}\big( \frac{2^{k}x}{T}-n\big) , &  
\frac{nT}{2^{k}}\leq x< \frac{(n+1)T}{2^{k}} \\
0, &  \text{otherwise},
\end{cases}
\end{equation}
where $m=0,1,\dots ,M-1$ and $n=0,1,2,\dots ,2^{k}-1$.
The dilation parameter is $a=2^{-k}T$ and translation parameter is $b=n2^{-k}T$.

Here $P_{m}(x)$  are the well-known shifted Legendre polynomials of order $m$, 
which are defined on the interval $[0,1]$, and can be determined with the 
aid of the following recurrence formulae
\begin{gather*}
P_{0}(x)=1,\quad
P_{1}(x)=2x-1,\\
P_{m+1}(x)=\big(\frac{2m+1}{m+1}\big)(2x-1)P_{m}(x)
-\big(\frac{m}{m+1}\big)P_{m-1}(x),\quad m=1,2,3,\dots
\end{gather*}


\section{Function approximation by Legendre multi-wavelets}
\label{sec:4}

A function $f(x)$ defined over $[0,T)$ can be expressed by the Legendre 
multi-wavelets as
\begin{equation}\label{4.1}
f(x)=\sum_{n=0}^{\infty}\sum_{m=0}^{\infty}c_{n,m}\psi _{n,m}(x)
\end{equation}
where $c_{n,m}=\langle f(x),\psi _{n,m}(x)\rangle$, in which 
$\langle \cdot ,\cdot \rangle$ denotes the inner product. 
If the infinite series in  \eqref{4.1} is truncated, then  \eqref{4.1} can be 
written as
\begin{equation}\label{4.2}
f(x) \cong  \sum_{n=0}^{2^{k}-1}\sum_{m=0}^{M}c_{n,m}\psi _{n,m}(x)=C^{T}\Psi (x)
\end{equation}
where $C$ and $\Psi (x)$ are $(2^{k}(M+1)\times 1)$ matrices given by
\begin{gather}\label{4.3}
C=[c_{0,0},c_{0,1},\dots ,c_{0,M},c_{1,0},\dots ,c_{1,M},\dots ,
c_{2^{k}-1,0},\dots ,c_{2^{k}-1,M}]^{T},\\
\label{4.4}
\Psi (x)=[\psi _{0,0}(x),\psi _{0,1}(x),\dots ,\psi_{0,M}(x),\dots ,
\psi _{2^{k}-1,0}(x),\dots ,\psi _{2^{k}-1,M}(x) ]^{T}.
\end{gather} 

\section{Legendre multi-wavelet method for Volterra integro-differential 
equation form of Lane-Emden equation}
\label{sec:5}

Consider the Volterra integro-differential equation given in 
 \eqref{2.4} which is the form of Lane-Emden equation defined in  \eqref{2.1}. 
To apply the Legendre multi-wavelets, we first approximate the unknown function  
$y(x)$ as
\begin{equation}\label{5.1}
y(x)=C^{T}\Psi (x),
\end{equation}
where $C$ is defined similar to  \eqref{4.3}.

Integrating  \eqref{2.4} and using the initial condition $y(0)=\alpha $, we have
\begin{equation}\label{5.2}
y(x)=\alpha -\int_{0}^{x}\Big[ \int_{0}^{z}
\Big( \frac{t^{\kappa}}{z^{\kappa}}\Big)f(y(t))dt\Big] dz,\quad \kappa \geq 1
\end{equation}
Then from  \eqref{5.1} and \eqref{5.2}, we have
\begin{equation} \label{5.3}
\begin{aligned}
C^{T}\Psi (x)&=\alpha -\int_{0}^{x}
\Big[ \int_{0}^{z}\Big( \frac{t^{\kappa}}{z^{\kappa}}\Big)f(C^{T}\Psi (t))dt\Big] dz,
\quad \kappa \geq 1  \\
&= \alpha -\int_{0}^{x}H(z)dz,
\end{aligned}
\end{equation}
where
\begin{equation*}
H(z)=\int_{0}^{z}\Big(\frac{t^{\kappa}}{z^{\kappa}}\Big)f(C^{T}\Psi (t))dt.
\end{equation*}
Now we collocate   \eqref{5.3} at $x_{i}=\frac{(2i-1)T}{2^{k+1}(M+1)}$,
$i=1,2,\dots ,2^{k}(M+1)$ as
\begin{equation}\label{5.4}
 C^{T}\Psi (x_{i})=\alpha -\int_{0}^{x_{i}}H(z)dz
 \end{equation}
To use the Gaussian integration formula for  \eqref{5.4}, we transfer
the interval  $[0,x_{i}]$ into the interval $[-1, 1]$ by means of the
transformation
$$
\tau =\frac{2}{x_{i}}z-1
$$
Equation  \eqref{5.4} can be written as
\begin{equation}\label{5.5}
C^{T}\Psi (x_{i})=\alpha -\frac{x_{i}}{2}\int _{-1}^{1}
H\big( \frac{x_{i}}{2}(\tau +1)\big)d\tau.
\end{equation}
Using the Gaussian integration formula, we obtain
\begin{equation}\label{5.6}
C^{T}\Psi (x_{i})\cong \alpha -\frac{x_{i}}{2}\sum_{j=1}^{s}w_{j}
 H\big( \frac{x_{i}}{2}(\tau _{j} +1)\big),
\end{equation}
where $\tau _{j}$  are  $s$ zeros of  Legendre polynomials $P_{s+1}$
and $w_{j}$ are the corresponding weights. The idea behind the
above approximation is the exactness of the Gaussian integration formula
for polynomials of degree not exceeding $2s+1$. Equation \eqref{5.6}
gives a system of $2^{k}(M+1)$ nonlinear algebraic equations with same
number of unknowns for coefficient matrix $C$. Solving this system
numerically by Newton's method, we can get the values of unknowns for $C$
and hence we obtain the solution $y(x)=C^{T}\Psi (x)$.

\section{Convergence analysis}
\label{sec:6}

\begin{theorem} \label{thm1} 
 The series solution 
$y(x)=\sum_{n=0}^{\infty}\sum_{m=0}^{\infty}c_{n,m}\psi _{n,m}(x)$ 
defined in  \eqref{4.1} using Legendre multi-wavelet method converges to $y(x)$.
\end{theorem}

\begin{proof} 
The set $\{\psi _{n,m}; n, m = 0, 1, \ldots\}$ is a complete orthonormal set 
in the Hilbert space $L^{2}(\mathbb{R})$.
Let $y(x)=\sum _{m=0}^{M}C_{n,m}\psi _{n,m}(x)$ where 
$C_{n,m}=\langle y(x), \psi _{n,m}(x)\rangle$, for  fixed $n$.
Let us denote $\psi _{n,m}(x)=\psi (x)$ and let 
$\alpha _{j}=\langle y(x),\psi (x)\rangle$.
Now we define the sequence of partial sum $\{ S_{n}\} $
of $\big( \alpha _{j}\psi (x_{j})\big)$. 
 Let $\{ S_{n}\}$ and $\{ S_{m}\}$ be the partial sums
with $n\geq m$. We have to prove $\{ S_{n}\}$ is a Cauchy
sequence in the Hilbert space.
Let $S_{n}=\sum _{j=1}^{n}\alpha _{j}\psi (x_{j})$.
Now 
$$
\langle y(x),S_{n} \rangle = \langle y(x),
\sum _{j=1}^{n}\alpha _{j}\psi (x_{j})\rangle 
= \sum _{j=1}^{n}\vert \alpha _{j}\vert ^{2}.
$$
We claim that 
$$
\| S_{n}-S_{m}\|^{2}=\sum _{j=m+1}^{n}\vert \alpha _{j}\vert ^{2},\quad n>m.
$$
Now 
$$
\| \sum _{j=m+1}^{n}\alpha _{j} \psi (x_{j})\|^{2}
=\langle \sum _{j=m+1}^{n}\alpha _{j} \psi (x_{j}), 
\sum _{j=m+1}^{n}\alpha _{j} \psi (x_{j})\rangle 
=\sum _{j=m+1}^{n}\vert \alpha _{j}\vert ^{2},
$$
for $n>m$.
Therefore,
$$ 
\| \sum _{j=m+1}^{n}\alpha _{j} \psi (x_{j})\|^{2}
=\sum _{j=m+1}^{n}\vert \alpha _{j}\vert ^{2}, \quad\text{for } n>m.
$$
From Bessel's inequality, we have 
$\sum _{j=1}^{\infty }\vert \alpha _{j}\vert ^{2}$ is convergent and hence
$$
\| \sum _{j=m+1}^{n}\alpha _{j} \psi (x_{j})\|^{2}\to 0\quad \text{as }
 n \to \infty.
$$
So,
 $$ 
 \| \sum _{j=m+1}^{n}\alpha _{j} \psi (x_{j})\| \to 0
$$
and $\{ S_{n}\}$ is a Cauchy sequence and it converges to $s$ (say).

We assert that $y(x)=s$.  In fact,
\begin{align*}
\langle s-y(x),\psi (x_{j})\rangle
&= \langle s,\psi (x_{j})\rangle-\langle y(x), \psi (x_{j})\rangle\\
&= \langle \lim_{n\to \infty}S_{n}, \psi (x_{j})\rangle-\alpha _{j}\\
&=  \alpha _{j}-\alpha _{j}.
\end{align*}
This implies
$ \langle s-y(x), \psi (x_{j})\rangle=0$, which gives
 $y(x)=s$ and $\sum _{j=1}^{n}\alpha _{j}\psi(x_{j})$ converges
 to $y(x)$ as $n\to \infty$ and completes the proof.
\end{proof}

\section{Illustrative examples}
\label{sec:7}

\begin{example} \label{examp1}\rm
Consider the generalized form of Lane-Emden equation of first kind
$$
y''(x)+\frac{\kappa }{x}y'(x)+y^{m}(x)=0,\quad \kappa \geq 1,\quad
 y(0)=1,\quad y'(0)=0.
$$
This equation is equivalent to the  integro-differential equation
$$
y'(x)=-\int_{0}^{x}\big( \frac{t^{\kappa }}{x^{\kappa }}\big) y^{m}(t)dt,
\quad y(0)=1,\quad \kappa \geq 1.
$$
The exact solutions of this problem for $\kappa =2$ and $m=0,1,5$ respectively 
are 
\begin{gather*}
y(x)=1-\frac{1}{3!}x^{2}\\
y(x)=\frac{\sin x}{x}\\
y(x)=\big( 1+\frac{x^{2}}{3}\big)^{-1/2}
\end{gather*}
The approximate solutions obtained by Legendre multi-wavelet method 
$(M=7, k=1)$ for shape factor  $\kappa =2$ and $m=0,1,5$  with their 
corresponding exact solutions and absolute errors have been shown in 
Tables \ref{table1}--\ref{table3} respectively.
\end{example}

\begin{table}[htb]
\begin{center}
    \begin{tabular}{|l|l|l|l|}
    \hline
    $x$   & LMWM solution        & Exact solution & Absolute error\\ \hline
    0.2 & 0.993333 & 0.993333     & 2.66664E-12  \\ \hline
    0.4 & 0.973333 & 0.973333     & 2.13333E-11   \\ \hline
    0.6 & 0.940000 & 0.940000     & 7.20001E-11  \\ \hline
    0.8 & 0.893333 & 0.893333     & 1.70667E-10   \\ \hline
    1   & 0.833333 & 0.833333     & 3.33333E-10   \\ \hline
   \end{tabular}
\end{center}
    \caption{Numerical solutions for Example \ref{examp1} when $\kappa =2$, $m=0$}
\label{table1}
\end{table}

\begin{table}[htb]
\begin{center}
    \begin{tabular}{|l|l|l|l|}
    \hline
    $x$   & LMWM solution        & Exact solution & Absolute error\\ \hline
    0.2 & 0.993347 & 0.993347     & 2.45593E-9  \\ \hline
    0.4 & 0.973546 & 0.973546     & 5.46664E-10   \\ \hline
    0.6 & 0.941071 & 0.941071     & 2.45289E-10  \\ \hline
    0.8 & 0.896695 & 0.896695     & 1.94895E-10   \\ \hline
    1   & 0.841471 & 0.841471     & 2.45936E-10    \\ \hline
    \end{tabular}
\end{center}
    \caption{Numerical solutions for Example \ref{examp1} when $\kappa =2$, $m=1$}
\label{table2}
\end{table}

\begin{table}[htb]
\begin{center}
    \begin{tabular}{|l|l|l|l|}
    \hline
    $x$   & LMWM solution        & Exact solution & Absolute error\\ \hline
    0   & 1        & 1            & 2.66055E-9  \\ \hline
    0.2 & 0.993399 & 0.993399     & 1.07934E-11   \\ \hline
    0.4 & 0.974355 & 0.974355     & 1.17952E-11  \\ \hline
    0.6 & 0.944911 & 0.944911     & 1.64531E-11   \\ \hline
    0.8 & 0.907841 & 0.907841     & 2.17233E-11    \\ \hline
    \end{tabular}
\end{center}
    \caption{Numerical solutions for Example \ref{examp1} when $\kappa =2$, $m=5$}
\label{table3}
\end{table}



\begin{example} \label{examp2}\rm
Consider the Lane-Emden equation of second kind
$$
y''(x)+\frac{\kappa }{x}y'(x)+e^{y(x)}=0,\quad y(0)=y'(0)=0,\quad \kappa >1.
$$
This equation is equivalent to
$$
y'(x)=-\int_{0}^{x}\big( \frac{t^{\kappa }}{x^{\kappa }}\big) e^{y(t)}dt,
\quad y(0)=1,\quad \kappa > 1.
$$
The approximate solutions obtained by Legendre multi-wavelet method $(M=7, k=1)$ 
for shape factor   $\kappa =2,3,4$ have been compared with the solutions 
obtained by a variational iteration method (VIM) \cite{5} cited in Table 
\ref{table4}.
\end{example}

\begin{table}[htb]
\begin{center}
    \begin{tabular}{|l|ll|ll|ll|}
    \hline
 $x$& \multicolumn{2}{l|}{\quad\quad $\kappa =2$}
&\multicolumn{2}{l|}{\quad \quad $\kappa =3$}
&\multicolumn{2}{l|}{\quad \quad $\kappa =4$}  \\
          & LMWM& VIM& LMWM& VIM&LMWM  & VIM\\ \hline
    0   & -5.7433E-11 & 0         & -2.484E-11 & 0         & -1.2637E-11 & 0       \\ \hline
    0.2 & -0.006653   & -0.006653 & -0.004992  & -0.004992 & -0.003994   & -0.003994 \\ \hline
    0.4 & -0.026456   & -0.026456 & -0.019868  & -0.019868 & -0.015909   & -0.015909  \\ \hline
    0.6 & -0.058944   & -0.058944 & -0.044337  &-0.044337  & -0.035544   & -0.035544  \\ \hline
    0.8 & -0.103386   & -0.103386 & -0.077935  & -0.077935 & -0.062578   & -0.062578  \\ \hline
    \end{tabular}
\end{center}
    \caption{Numerical solutions for Example \ref{examp2}} \label{table4}
\end{table}


\begin{example} \label{examp3}\rm
Next, consider the Lane-Emden type equation given by
$$
y''(x)+\frac{8 }{x}y'(x)+(18y(x)+4y(x)\ln(y(x))=0,\quad  y(0)=1,\quad y'(0)=0
$$
The Volterra integro-differential form of this equation is given by
$$
y'(x)+\int_{0}^{x}\frac{t^{8}}{x^{8}}(18y(t)+4y(t)\ln y(t))dt=0, \quad y(0)=1
$$
with exact solution $e^{-x^{2}}$ .  The Legendre multi-wavelets solutions
 for $M=7, k=1$ along with their corresponding exact solutions and absolute 
errors have been shown in Table \ref{table5}.
\end{example}

\begin{table}[htb]
\begin{center}
    \begin{tabular}{|l|l|l|l|}
    \hline
    $x$   & LMWM solution        & Exact solution & Absolute error\\ \hline
    0   & 1        & 1            & 3.95615E-8  \\ \hline
    0.1 & 0.990050 & 0.990050     & 2.96242E-10   \\ \hline
    0.2 & 0.960789 & 0.960789     & 3.82808E-10  \\ \hline
    0.3 & 0.913931 & 0.913931     & 2.95619E-8   \\ \hline
    0.4 & 0.852143 & 0.852143     & 4.68592E-7    \\ \hline
    0.5 & 0.778797 & 0.778797     & 3.64064E-6    \\ \hline
    \end{tabular}
\end{center}
    \caption{Numerical solutions for Example \ref{examp3}} \label{table5}
\end{table}


\begin{example} \label{examp4}\rm
Consider the Lane-Emden type equation given by
$$
y''(x)+\frac{1 }{x}y'(x)+(3y^{5}(x)-y^{3}(x))=0,\quad  y(0)=1,\quad y'(0)=0
$$
The Volterra integro-differential form of this equation is given by
$$
y'(x)+\int_{0}^{x}\frac{t}{x}(3y^{5}(t)-y^{3}(t))dt=0, \quad y(0)=1
$$
with exact solution $\frac{1}{\sqrt{1+x^{2}}}$.  
The Legendre multi-wavelets solutions for $M=7, k=1$ along with their 
corresponding exact solutions and absolute errors have been shown in 
Table \ref{table6}.
\end{example}

\begin{table}[htb]
\begin{center}
    \begin{tabular}{|l|l|l|l|}
    \hline
    $x$   & LMWM solution        & Exact solution & Absolute error\\ \hline
    0   & 1        & 1            & 9.41731E-8  \\ \hline
    0.2 & 0.980581 & 0.980581     & 8.91026E-10   \\ \hline
    0.4 & 0.928477 & 0.928477     & 1.53517E-9  \\ \hline
    0.6 & 0.857493 & 0.857493     & 1.16852E-9   \\ \hline
    0.8 & 0.780869 & 0.780869     & 1.55470E-9    \\ \hline
    \end{tabular}
\end{center}
    \caption{Numerical solutions for Example \ref{examp4}} \label{table6}
\end{table}


\begin{example} \label{examp5}\rm
Consider the Lane-Emden type equation given by
$$
y''(x)+\frac{2 }{x}y'(x)+4\Big( 2e^{y(x)}+e^{\frac{y(x)}{2}}\Big)=0,\quad  
y(0)=y'(0)=0.
$$
The Volterra integro-differential form of this equation is given by
$$
y'(x)+\int_{0}^{x}\frac{t^{2}}{x^{2}}
\Big(  4\Big( 2e^{y(t)}+e^{\frac{y(t)}{2}}\Big) \Big) dt=0, \quad y(0)=0
$$
with exact solution $-2\ln (1+x^{2})$.  
The Legendre multi-wavelets solutions for $M=7, k=1$ along with their 
corresponding exact solutions and absolute errors have been shown 
in Table \ref{table7}.
\end{example}

\begin{table}[htb]
\begin{center}
    \begin{tabular}{|l|l|l|l|}
    \hline
    $x$   & LMWM solution        & Exact solution & Absolute error\\ \hline
    0   & 1.1743E-7& 0            & 1.17430E-7  \\ \hline
    0.2 & -0.078441& -0.078441    & 1.25003E-9   \\ \hline
    0.4 & -0.296840& -0.296840    & 1.65908E-7  \\ \hline
    0.6 & -0.614985& -0.614969    & 1.52712E-5   \\ \hline
    0.8 & -0.989704& -0.989392    & 3.11348E-4    \\ \hline
    \end{tabular}
\end{center}
    \caption{Numerical solutions for Example \ref{examp5}} \label{table7}
\end{table}


\begin{example} \label{examp6}\rm
Consider the system of nonlinear Lane-Emden type equations given by
\begin{gather*}
y_{1}''(x)+\frac{8}{x}y_{1}'(x)+(18y_{1}(x)-4y_{1}(x)\ln y_{2}(x))=0\\
y_{2}''(x)+\frac{4}{x}y_{2}'(x)+(4y_{2}(x)\ln y_{1}(x)-10y_{2}(x))=0
\end{gather*}
with initial conditions
\begin{gather*}
y_{1}(0)=1,\quad y_{1}'(0)=0, \\
y_{2}(0)=1,\quad y_{2}'(0)=0
\end{gather*}
The system of nonlinear Volterra integro-differential form of the above 
system is given by
\begin{gather*}
y_{1}'(x)+\int_{0}^{x}\frac{t^{8}}{x^{8}}(18y_{1}(t)-4y_{1}(t)\ln y_{2}(t))dt=0,\\
y_{2}'(x)+\int_{0}^{x}\frac{t^{4}}{x^{4}}(4y_{2}(t)\ln y_{1}(t)-10y_{2}(t))dt=0,
\end{gather*}
with initial conditions $y_{1}(0)=1,\quad y_{2}(0)=1$.
The corresponding exact solutions of this system are
\[
y_{1}(x)=e^{-x^{2}},\quad 
y_{2}(x)=e^{x^{2}}
\]
The approximate solutions obtained by Legendre multi-wavelet method
for $M=7, k=1$ along with their corresponding exact solutions and
absolute errors have been shown in Table \ref{table8}.
\end{example}

\begin{table}[htb]
\begin{center}
   \begin{tabular}{|l|ll|ll|ll|}
    \hline
   $x$ & \multicolumn{2}{l|}{LMWM solution}&\multicolumn{2}{l|}{Exact solution}
 & \multicolumn{2}{l|}{Absolute error}\\
    &$y_{1}(x)$ &$y_{2}(x)$&$y_{1}(x)$&$y_{2}(x)$&$y_{1}(x)$&$y_{2}(x)$\\ \hline
    0   & 1& 1             & 1& 1             & 7.15876E-8& 8.44232E-8  \\ \hline
    0.1 & 0.99005& 1.01005 & 0.99005& 1.01005 & 5.61584E-10& 6.59049E-10 \\ \hline
    0.2 & 0.960789& 1.04081 & 0.960789& 1.04081& 9.69923E-10& 3.34747E-10  \\ \hline
    0.3 & 0.913931& 1.09417& 0.913931& 1.09417     & 3.5286E-8&4.47131E-8  \\ \hline
    0.4 & 0.852144& 1.17351 & 0.852144& 1.17351    & 6.22823E-7& 8.00388E-7    \\ \hline
    0.5 & 0.778805& 1.28402 & 0.778801& 1.28403    & 4.48153E-6& 7.03964E-6   \\ \hline
    \end{tabular}
\end{center}
    \caption{Numerical solutions for Example \ref{examp6}} \label{table8}
\end{table}

\begin{example} \label{examp7}\rm
To verify the accuracy of the presented method, we have considered a fractional 
order integro-differential equation \cite{Zhu-2012} as
\begin{equation*}
D^{\alpha}y(x)-\int_{0}^{1}xt[y(t)]^{2}dt=1-\frac{x}{4},\quad 
0\leq x<1,\; 0<\alpha \leq 1,
\end{equation*}
with initial condition $y(0)=0$ and the exact solution $y(x)=x$ when
 $\alpha =1$. This problem has been solved by Chebyshev wavelet 
method (CWM) in \cite{Zhu-2012} for $\alpha=1$. The results obtained 
by the Chebyshev wavelet method \cite{Zhu-2012} have been compared with 
the results obtained by presented method and the root mean square 
errors (RMSE) of these two methods have been cited in Table \ref{table9}.
\end{example}

\begin{table}[htb]
\begin{center}
    \begin{tabular}{|l|l|lll|}
    \hline
    Error & LMWM & & CWM \cite{Zhu-2012} & \\
          & $k=3,M=2$& $k=3,M=2$& $k=4,M=2$&$k=5,M=2$\\ \hline
     RMSE & 3.92041E-10&2.9700E-7&1.8610E-8&1.1645E-9\\ \hline
    \end{tabular}
\end{center}
    \caption{Root mean square errors for Example \ref{examp7}} \label{table9}
\end{table}


\begin{example} \label{examp8}\rm
Again to verify the accuracy of the  method here presented, we consider 
the nonlinear Volterra-Fredholm integro-differential equation 
(see \cite{Maleknejad-2011})
\begin{equation*}
y'(x)+y(x)+\frac{1}{2}\int_{0}^{x}xy^{2}(t)dt
-\frac{1}{4}\int_{0}^{1}ty^{3}(t)dt=g(x),
\end{equation*}
with $g(x)=2x+x^{2}+\frac{1}{10}x^{6}-\frac{1}{32}$ and initial 
condition $y(0)=0$. The exact solution of this problem is $x^{2}$. 
This problem has been solved by hybrid Legendre polynomials and 
Block-Pulse functions (HLPBPF) in \cite{Maleknejad-2011}. 
The results obtained using HLPBPF \cite{Maleknejad-2011} are 
compared with the results obtained by presented method and cited in 
Table \ref{table10}. The maximum absolute errors obtained by these 
two methods has been cited in Table \ref{table11}.
\end{example}

\begin{table}[htb]
\begin{center}
    \begin{tabular}{|l|l|lll|l|}
    \hline
    $x$   & LMWM & & HLPBPF \cite{Maleknejad-2011}&  & Exact \\
          & $M=8,k=1$ & $M=8,n=2$ & $M=8,n=4$&$M=8,n=4$ &  \\ \hline
   0   & 0     & 0   &  0       & 0             & 0  \\ \hline
   0.1 &  0.01  & 0.010917 & 0.010256& 0.010031 & 0.01 \\ \hline
   0.2 & 0.04 & 0.041703 & 0.040487  & 0.040075 & 0.04 \\ \hline
   0.3 & 0.09 & 0.092364 & 0.090698 & 0.090171 & 0.09 \\ \hline
   0.4 & 0.16 & 0.162911 & 0.160866 & 0.160094 & 0.16 \\ \hline
   0.5 & 0.25 & 0.253371 & 0.250997 &0.250228 & 0.25 \\ \hline
   0.6 & 0.36 & 0.364244 & 0.361061 & 0.360502 & 0.36 \\ \hline
   0.7 & 0.49 & 0.493830 & 0.490969 & 0.490583 & 0.49 \\ \hline
   0.8 & 0.64 & 0.642375 & 0.640830 &  0.640374 & 0.64 \\ \hline
   0.9 & 0.81 & 0.810337 & 0.810183 &  0.810047 & 0.81  \\ \hline
  \end{tabular}
\end{center}
    \caption{Numerical solutions for Example \ref{examp8}} \label{table10}
\end{table}


\begin{table}[htb]
\begin{center}
    \begin{tabular}{|l|l|lll|}
    \hline
    Error & LMWM & & HLPBPF \cite{Maleknejad-2011} & \\
          & $M=8,k=1$& $M=8,n=2$& $M=8,n=4$&$M=8,n=8$\\ \hline
     Max. Abs. Err. & 1.85984E-9&4.244E-3&1.0610E-3&5.83E-4\\ \hline
    \end{tabular}
\end{center}
    \caption{Maximum absolute errors for Example \ref{examp8}} \label{table11}
\end{table}


\subsection*{Conclusion}
%\label{sec:8}
Using the equivalence between the Lane-Emden equations of first and second 
kind  and  Volterra integro-differential equations
a numerical method that overcomes the difficulty of the singular behavior
 at $x=0$ is established. The numerical method is reduced
to solving  a system of algebraic equations. Examples that   
demonstrate the validity and applicability of the present technique
are included. These examples also exhibit the accuracy and efficiency 
of the proposed  method.


\subsection*{Acknowledgements}
The authors would like to express their sincere thanks and gratitude to 
the anonymous  reviewers for their kind suggestions for the betterment 
and improvement of the present paper.


\begin{thebibliography}{00}

\bibitem{14} J. Biazar, H. Ebrahimi; 
\emph{Legendre Wavelets for Systems of Fredholm Integral Equations 
of the Second Kind}, World Applied Sciences Journal, 
\textbf{9}(9) (2010), 1008--1012.

\bibitem{Chandrasekhar:1967} S. Chandrasekhar;
\emph{Introduction to the Study of Stellar Structure}, Dover, New York (1967).

\bibitem{10} H. Goenner, P. Havas;
 \emph{Exact solutions of the generalized Lane-Emden equation}, 
J. Math. Phys., \textbf{41} (2000), 7029--7042.

\bibitem{6} C. M. Khalique, F. M. Mohamed, B. Muatjetjeja; 
\emph{Lagrangian formulation of a generalized Lane-Emden equation and 
double reduction}, J. Nonlinear Math. Phys., \textbf{15}(2) (2008), 152--161.

\bibitem{3} P. Mach; 
\emph{All solutions of the $n = 5$ Lane-Emden equations}, 
J. Math. Phys., \textbf{53} (2012), 062503.

\bibitem{Maleknejad-2011} K. Maleknejad, B. Basirat, E. Hashemizadeh;
\emph{Hybrid Legendre polynomials and Block-Pulse functions approach 
for nonlinear Volterra-Fredholm integro-differential equations},
 Computers and Mathematics with Applications, \textbf{61} (2011), 2821--2828.

\bibitem{11} K. Maleknejad, M. T. Kajani, Y. Mahmoudi;
 \emph{Numerical solution of linear Fredholm and Volterra integral equation 
of the second kind by using Legendre wavelets}, Kybernetes, 
\textbf{32}(9/10) (2003), 1530--1539.

\bibitem{12}  K. Maleknejad, S. Sohrabi; 
\emph{Numerical solution of Fredholm integral equations of the first kind
 by using Legendre wavelets}, Appl. Math. Comput., \textbf{186} (2007), 836--843.

\bibitem{8} K. Parand, M. Shahini, M. Dehghan; 
\emph{Rational Legendre pseudospectral approach for solving nonlinear
 differential equations of Lane-Emden type}, 
J. Comput. Phys., \textbf{228} (2009), 8830--8840.

\bibitem{9} S. Srivastava; 
\emph{On the physical validity of Lane-Emden equation of index $5$},
 Math. Stud., \textbf{34} (1966), 19--26.

\bibitem{1} A. M. Wazwaz; 
\emph{Analytical solution for the time-dependent Emden-Fowler type of equations 
by Adomian decomposition method}, Appl. Math. Comput., \textbf{166} (2005), 
638--651.

\bibitem{2} A. M. Wazwaz; 
\emph{A new algorithm for solving differential equations of Lane-Emden type}, 
Appl. Math. Comput., \textbf{118} (2001), 287--310.

\bibitem{4} A. M. Wazwaz, R. Rach, J. S. Duan; 
\emph{Adomian decomposition method for solving the Volterra integral 
form of the Lane-Emden equations with initial values and boundary conditions}, 
Appl. Math. Comput., \textbf{219}(10) (2013), 5004--5019.

\bibitem{5} A. M. Wazwaz; 
\emph{The variational iteration method for solving the Volterra integro-differential 
forms of the Lane-Emden equations of the first and the second kind},
 J Math Chem., \textbf{52}(2) (2014), 613-626.

\bibitem{7} A. Yildirim, T. A–zis; 
\emph{Solutions of singular IVPs of Lane-Emden type by homotopy perturbation
 method}, Phys. Lett. A., \textbf{369} (2007), 70--76.

\bibitem{16} S. A. Yousefi;  
\emph{Legendre multiwavelet Galerkin method for solving the hyperbolic
 telegraph equation},  Numer. Methods Partial Differential Eq., 
\textbf{26} (2010), 535--543.

\bibitem{13} S. Yousefi,  M. Razzaghi; 
\emph{Legendre wavelets method for the nonlinear Volterra-Fredholm integral 
equations}, Mathematics and Computers in Simulation, \textbf{70} (2005), 1-8.

\bibitem{15} X. Zheng, X. Yang;  
\emph{Techniques for solving integral and differential equations by Legendre
 wavelets}, International Journal of Systems Science, \textbf{40}(11) (2009), 
1127--1137.

\bibitem{Zhu-2012} L. Zhu, Q. Fan;  
\emph{Solving fractional nonlinear Fredholm integro-differential equations
 by the second kind Chebyshev wavelet}, Commun. Nonlinear Sci. Numer. 
Simulat., \textbf{17} (2012), 2333--2341.

\end{thebibliography}

\end{document}
