Abstract

An efficient solution algorithm for sinc-Galerkin method has been presented for obtaining numerical solution of PDEs with Dirichlet-type boundary conditions by using Maple Computer Algebra System. The method is based on Whittaker cardinal function and uses approximating basis functions and their appropriate derivatives. In this work, PDEs have been converted to algebraic equation systems with new accurate explicit approximations of inner products without the need to calculate any numeric integrals. The solution of this system of algebraic equations has been reduced to the solution of a matrix equation system via Maple. The accuracy of the solutions has been compared with the exact solutions of the test problem. Computational results indicate that the technique presented in this study is valid for linear partial differential equations with various types of boundary conditions.

1. Introduction

Sinc methods for differential equations were originally introduced by Stenger in [13]. The sinc functions were first analyzed in [4, 5] and a detailed research of the method for two-point boundary-value problems can be found in [6, 7]. In [8], parabolic and hyperbolic problems are presented in detail. To solve a problem arising from chemical reactor theory, the properties of the sinc-Galerkin method are used to reduce the computation of nonlinear two-point boundary-value problems to some algebraic equations in [9]. A computer algorithm for sinc method to solve numerically the linear and nonlinear ODEs and their simulations has been presented in [7, 10], respectively. The full sinc-Galerkin method is developed for a family of complex-valued partial differential equations with time-dependent boundary conditions [9]. A study of the performance of the Galerkin method using sinc basis functions for solving Bratu’s problem is presented in [11]. In [12] a numerical algorithm has been presented for recovering the unknown function and obtaining a solution to the inverse ill-posed problem. They have presented a Galerkin method with the sinc basis functions in both space and time domains for solving the direct problem. A sinc-collocation method has been developed for solving linear systems of integrodifferential equations of Fredholm and Volterra type with homogeneous boundary conditions in [13].

2. Sinc-Approximation Formula for PDEs

We use the sinc-Galerkin method as mentioned in [1] to derive an approximate solution of the following: For the equation given above, the sinc-Galerkin scheme can be developed in both space and time directions as follows.

In general, approximations can be constructed for infinite, semi-infinite, and infinite intervals and both spatial and time spaces will be introduced. Define the function which is a conformal mapping from , the eye-shaped domain in the -plane, onto the infinite strip, , where A more general form of sinc basis according to intervals can be given as follows: where and the conformal maps for both directions are used to define the basis functions on the intervals and , respectively. represents the mesh sizes in the space direction and the time direction, respectively. The sinc nodes and are chosen so that , .

Here the function is an inverse mapping of . We may define the range of on the real line as For the evenly spaced nodes on the real line, the image which corresponds to these nodes is denoted by where , for all .

The sinc basis functions in (4) do not have a derivative when tends to 0 or 1. We modify the sinc basis functions as where For the temporal space, we construct an approximation by defining the function which is a conformal mapping from , the wedge-shaped domain in the -plane, onto the infinite strip, , where derived from composite translated functions for .

Here and . We may define on the real line as For the evenly spaced nodes on the real line, the image which corresponds to these nodes is denoted by where , for all .

A list of conformal mappings may be found in Table 1 [14].

Definition 1. Let be the class of functions that are analytic in and satisfy where and on the boundary of satisfy
The proof of the following theorems can be found in [1].

Theorem 2. Let be , , and then for sufficiently small where

For the sinc-Galerkin method, the infinite quadrature rule must be truncated to a finite sum; the following theorem indicates the conditions under which exponential convergence results.

Theorem 3. If there exist positive constants , and such that then the error bound for the quadrature rule (19) is The infinite sum in (19) is truncated with the use of (20) to arrive at (22).
Making the selections where is integer part of statement,

Theorems 2 and 3 can be used to approximate the integrals that arise in the formulation of the discrete systems corresponding to two-point BVPs.

3. Discrete Solutions Scheme for Two-Point BVPs

In ordinary differential equations on , sinc solution is assumed as an approximate solution in the form of series with terms The coefficients are determined by orthogonalizing the residual with respect to the sinc basis functions where . An inner product for two continuous functions such as and can be given by the following formula where is the weight function and is chosen depending on boundary conditions. If we implement the above inner product rule in orthogonalization, this yields the discrete sinc-Galerkin system: Now, we are going to derive discrete sinc-Galerkin system for PDEs. Assume is the approximate solution of (1).Then, the discrete system takes the following form: The coefficients are determined by orthogonalizing the residual with respect to the sinc basis functions where for . In this case the inner product takes the following form: The choice of the weight function in the double integrand depends on the boundary conditions, the domain, and the partial differential equation. Therefore, the discrete Galerkin system is

4. Matrix Representation of the Derivatives of Sinc Basis Functions at Nodal Points

The sinc-Galerkin method actually requires the evaluated derivatives of sinc basis functions at the sinc nodes, . The th derivative of with respect to , evaluated at the nodal point , is denoted by The expressions in (14) for each and can be stored in a matrix . For where The chain rule has been used for the -derivative of product sinc functions. For example, when , Now, we are going to develop discrete form for (1). We choose for special case the parameters as follows for the spatial dimension: and for the temporal space as The discrete form of (1) can be given the following form: We solve this by taking our approximating basis functions to be If we apply sinc-quadrature rules with the help of (32)–(37) on the definite integral given (38) by using (39), we can get the following matrix system.

Let denote a diagonal matrix, whose diagonal elements are and nondiagonal elements are zero. Then (38) reproduces the following matrixes accordingly.

Firstly we set the coefficient matrix as follows: Finally, for the right side function given (1) can be written in the following matrix form: Using (32)–(37) we arrive at a matrix system given in [1] as follows: Finally, by using Maple Computer Algebra Software, the matrix system (42) can be solved by using LU or QR decomposition method and unknown coefficients can be found. After calculation of we get approximate solution as follows:

5. Numerical Simulation

The example in this section will illustrate the sinc method.

Example 4. This problem has been addressed in [1]. The following equation is given in Dirichlet-type boundary condition: The particular solution of (44) can be calculated via separation variables rules and can be given as follows: For (44) we choose sinc components here in the following: According to the above parameters, the approximate solution simulation of (44) has been given in Figure 1 and numerical results also can be found in Table 2.

6. Conclusions

We have developed a Maple algorithm to solve and simulate second-order parabolic PDEs with Dirichlet-type boundary conditions based on sinc-Galerkin approximation on some closed real intervals and the method has been compared with the exact solutions. When compared with other computational approaches, this method turns out to be more efficient in the sense that selection parameters and changing boundary conditions and also giving different problems to the algorithms. The accuracy of the solutions improves by increasing the number of sinc grid points . The method presented here is simple and uses sinc-Galerkin method that gives a numerical solution, which is valid for various boundary conditions. Several PDEs have been solved by using our technique in less than 20 seconds. All computations and graphical representations have been prepared automatically by our algorithm.

Appendix

See Algorithm 1.

restart:
with(linalg):
with(LinearAlgebra):
N:=16:
d:=Pi/2:
h:=0.75/sqrt(N);
s:=.5/sqrt(N);
SIZE:=2*N+1;
delta0:= i,j ->piecewise(j=i,1,j<>i,0):
delta1:= i,j ->piecewise(i=j,0,i<>j,((-1) (i-j))/(i-j)):
delta2:= i,j ->piecewise(i=j,(-Pi 2)/3,i<>j,-2*(-1) (i-j)/(i-j) 2):
I_0:=Matrix(SIZE,delta0):
I_1:=Matrix(SIZE,delta1):
I_2:=Matrix(SIZE,delta2):
xk:=1/2+1/2*tanh(k*h/2);
xk_func:=unapply(xk,k);
phi:=unapply(log((x)/(1-x)),x);
Dphi:=unapply(simplify(diff(phi(x),x)),x);
g:=unapply(simplify(1/diff(phi(x),x)),x);
Dg:=unapply(diff(g(x),x),x);
gk:=unapply(subs(x=xk,g(x)),k);
Dgk:=unapply(subs(x=xk,Dg(x)),k);
g_Div_Dphi:=unapply(g(x)/Dphi(x),x);
g_Div_Dphi_k:=unapply(subs(x=xk,g_Div_Dphi(x)),k);
#Temporal  Spaces;
tl:=exp(l*s);
tl_func:=unapply(tl,l);
gamm:=unapply(log(t),t);
Dgam:=unapply(diff(gamm(t),t),t);
g_gamm:=unapply(1/diff(gamm(t),t),t);
g_gamm_l:=unapply(subs(t=tl,g_gamm(t)),l);
gamm_Div_Dgam:=unapply(g_gamm(t)/Dgam(t),t);
gamm_Div_Dgam:=  t->  t 2;
gamm_Div_Dgam_l:=unapply(subs(t=tl,gamm_Div_Dgam(t)),l);
GenerateDiagonalAm  :=  proc(  x  )
            local  i:=1:
            local  A:=Matrix(SIZE):
             for  i  from  1  by  1  to  SIZE
             do
              A i,i :=evalf(x(-N+i-1)):
             end  do:
             return  A;
          end  proc;
B:=  -2*h*MatrixMatrixMultiply(I_0,GenerateDiagonalAm(gk))+
MatrixMatrixMultiply(I_1,GenerateDiagonalAm(Dgk))+1/h*I_2:
DD:=h*GenerateDiagonalAm(g_Div_Dphi_k):
C:=MatrixMatrixMultiply(GenerateDiagonalAm(g_gamm_l),s*(I_0-I_1)):
E:=s*GenerateDiagonalAm(gamm_Div_Dgam_l):
Fkl:=unapply((Pi 2-4)*sin(Pi*xk_func(k-N-1))*exp(-tl_func(l-N-1)),k,l);
F:=evalf(Matrix(SIZE,Fkl)):
V:=Matrix(SIZE,v):
EQN_SYS:=evalf(
MatrixMatrixMultiply(
      MatrixMatrixMultiply(
        Matrix(inverse(DD)),B
                ),V
       )
     )
  +evalf(
    MatrixMatrixMultiply(
      MatrixMatrixMultiply(
        V,C),Matrix(inverse(E)
               )
             )
     ):
SYS:= :
   for  i  from  1  by  1  to  SIZE
    do
      for  j  from  1  by  1  to  SIZE
        do
         SYS:= op(SYS),EQN_SYS(i,j)=F(i,j) ;
        end  do:
    end  do:
vars:=seq(seq(v(i,j),i=1..2*N+1),j=1..2*N+1):
A,b:LinearAlgebra GenerateMatrix (evalf(SYS), vars ):
c:=linsolve(A,b):
CoeffMatrix=Matrix(SIZE):
cnt:=1;
for  i  to  SIZE  do
  for  j  to  SIZE  do
   CoeffMatrix j,i :=c cnt :
   cnt:=cnt+1
  end  do;
end  do;
CoeffMatrix:=Matrix(CoeffMatrix,SIZE):
ApproximateSol:=unapply(
          evalf(
              sum(
               sum("CoeffMatrix"[m+N+1,n+N+1]
        *sin(Pi*(phi(x)-m*h)/h)/(Pi*(phi(x)-m*h)/h)
       *sin(Pi*(gamm(t)-n*s)/s)/(Pi*(gamm(t)-n*s)/s)
           ,m=-N..N),
          n=-N...N)
             )
             +exp(-4*t)*sin(Pi*x)
           ,x,t):
plot3d(ApproximateSol(x,t),x=0..1,t=0..1):
Exact:=unapply(exp(-Pi 2*t)*sin(Pi*x),x,t);
plot3d(Exact(x,t),x=0..1,t=0..1);
plot3d({Exact(x,t),ApproximateSol(x,t)},x=0..1,t=0..1);
XX:=.6;
#Numerical  Comparision  EXACT
for  j  from  0.1  to  10  by  1
do
  evalf(Exact(XX,j)):
od;
#Numerical  Comparision  APPROX
for  j  from  0.1  to  10  by  1
do
  evalf(ApproximateSol(XX,j)):
od;
#Numerical  Comparision  ERROR
for  j  from  0.1  to  10  by  1
do
  abs(evalf(evalf(ApproximateSol(XX,j)-Exact(XX,j)))):
od;

Conflict of Interests

The author declares that he has no conflict of interests.