# Modified Crank-Nicolson Difference Schemes for Nonlocal Boundary Value Problem for the Schrödinger Equation

Authors: Allaberen Ashyralyev; Ali Sirma
Journal: Discrete Dynamics in Nature and Society
 (2009)

---

## Abstract

The nonlocal boundary value problem for Schrödinger equation in a Hilbert space
is considered. The second-order of accuracyr-modified Crank-Nicolson difference schemes for the
approximate solutions of this nonlocal boundary value problem are presented. The stability of these
difference schemes is established. A numerical method is proposed for solving a one-dimensional
nonlocal boundary value problem for the Schrödinger equation with Dirichlet boundary condition.
A procedure of modified Gauss elimination method is used for solving these difference schemes. The method is illustrated by numerical examples.


---

## Body

## 1. Introduction

In this article, the nonlocal boundary value problem for the Schrödinger equation(1.1)iu′(t)+Au(t)=f(t),0<t<T,u(0)=∑m=1pαmu(λm)+φ,0<λ1<λ2<⋯<λp≤T
in a Hilbert space H with the self-adjoint operator A is considered. The Schrödinger equation plays an important role in the modeling of many phenomena. Methods of solutions for the Schrödinger equation have been studied extensively by many researchers (see, e.g., [1–9] and the references given therein).The idea in this work is inspired from the works [2, 3, 10, 11]. In the articles [2, 3] the existence and the uniqueness of the solution of the nonlocal boundary value problem (1.1) and its general form under some conditions are studied. In the article [8], to find an approximate solution of the problem (1.1), first-order of accuracy Rothe difference scheme and second-order of accuracy Crank-Nicolson difference scheme are presented. The stability estimates for the solution of this problem and the stability of these difference schemes are established.The main aim of this paper is to studyr modified Crank-Nicolson difference schemes for the approximate solution of problem (1.1). The paper is organized as follows. In Section 2, we establish estimates for the stability of higher order derivatives of the solution of problem (1.1). In Section 3, the second-order of accuracy r modified Crank-Nicolson difference schemes for the approximate solution of problem (1.1) are presented. The stabilities of these difference schemes are established. In Section 4, we study the convergence of these difference schemes. In Section 5, a numerical example is exposed in order to validate the schemes. A procedure involving the modified Gauss elimination method is used for solving these difference schemes.Throughout this paper, the constants used are not necessarily the same at different occurrences.


## 2. Nonlocal Boundary Value Problem

Theorem 2.1.
Assume thatf(t)∈C1([0,T],H),φ∈D(A) and
(2.1)∑m=1p|αm|<1.
Then there exists a unique solution u(t) of problem (1.1) and the following inequalities are satisfied:
(2.2)max0≤t≤T∥u(t)∥H≤C(α1,…,αp)[∥φ∥H+Tmax0≤t≤T∥f(t)∥H],(2.3)max0≤t≤T∥u′(t)∥H+max0≤t≤T∥Au(t)∥H≤C(α1,…,αp)[∥Aφ∥H+Tmax0≤t≤T∥f′(t)∥H+∥f(0)∥H].Proof.
The proof of the estimate (2.2) is given in [8]. Now we will obtain the estimate (2.3).
It is known that for smooth data of the problem(2.4)iu′(t)+Au(t)=f(t),0<t<T,u(0)=ξ,
there exists a unique solution of the problem (1.1), and the following formula holds:
(2.5)u(t)=eiAtξ-∫0teiA(t-s)if(s)ds.
Therefore we have
(2.6)Au(t)=eiAtAξ+f(0)+∫0tf′(s)ds-f(0)eiAt-∫0teiA(t-s)f′(s)ds.
So that we get the estimate
(2.7)max0≤t≤T∥u(t)∥H≤∥Aξ∥H+2∥f(0)∥H+2Tmax0≤t≤T∥f′(t)∥H.
Using the condition u(0)=∑m=1pαmu(λm)+φ and the formula (2.6) we get
(2.8)Aξ=R{∑m=1pαmf(0)+∑m=1pαm∫0λmf′(s)ds-f(0)∑m=1pαmeiAλm-∑m=1pαm∫0λmeiA(λm-s)f′(s)ds+Aφ},
where
(2.9)R=(I-∑m=1pαmeiAλm)-1.
By using estimates
(2.10)∥R∥H→H≤11-∑m=1p|αm|≤C(α1,…,αp),∥eiAt∥H→H≤1,
and the assumption ∑m=1p|αm|<1, we get
(2.11)∥Aξ∥H≤C(α1,…,αp){2∥f(0)∥H+2Tmax0≤t≤T∥f′(t)∥H+∥Aφ∥H}.
By using the estimates (2.7) and (2.11) we obtain an estimate for Au. Then by using the estimate for Au, the relation iu′(t)=f(t)-Au=f(0)+∫0tf′(s)ds-Au and the triangle inequality we can obtain estimate (2.3). This completes the proof of Theorem 2.1.


## 3. Difference Schemes, Stability

In this section, we presentr-modified Crank-Nicolson difference schemes for the approximate solutions of problem (1.1) and establish the stabilities of these difference schemes. It is assumed that 2τ≤λm for 1≤m≤p. Let us associate the nonlocal boundary value problem (1.1) with the corresponding second-order of accuracy r-modified Crank-Nicolson difference schemes:
(3.1)iuk-uk-1τ+A2(uk+uk-1)=φk,r+1≤k≤N,iuk-uk-1τ+Auk=φk,1≤k≤r,u0=∑rτ≥λmαm((I+il0mA)ulm-il0mφlm)+∑rτ<λmλm/τ∈Z+αmulm+∑rτ<λmλm/τ∉Z+αm(I+idmA)12(ulm+ulm+1)-i∑rτ<λmλm/τ∉Z+αmdmφlm+φ,0<λ1<λ2<⋯<λp≤T,
for the approximate solutions of this nonlocal boundary value problem. Z+ denotes here the set {2,…,n,…} and lm=⌊λm/τ⌋,l0m=λm-⌊λm/τ⌋τ,dm=λm-⌊λm/τ⌋τ-τ/2, φk=f(tk-τ/2),  tk=kτ, where ⌊x⌋ stands for the greatest integer part of the real number x.By [10],
(3.2)uk={Rkξ-iτ∑j=1kRk-j+1φj,k=1,…,r,Bk-rRrξ-iτ∑j=1rBk-rRr-j+1φj-iτ∑j=r+1kBk-jCφj,k=r+1,…,N
is the solution of the r-modified Crank-Nicolson difference schemes for the approximate solutions of Cauchy problem
(3.3)iuk-uk-1τ+A2(uk+uk-1)=φk,r+1≤k≤N,iuk-uk-1τ+Auk=φk,1≤k≤r,u0=ξ.
Here
(3.4)R=(I-iτA)-1,C=(I-iA2τ)-1,B=(I+iA2τ)C.
For u0, using the formula (3.2) and the condition we obtain
(3.5)ξ=Tτ{(-iτ∑rτ≥λmαm(I+il0mA)∑j=1lmRlm-j+1φj-i∑rτ≥λmαml0mφlm)-iτ∑rτ<λmλm/τ∈Z+αm(∑j=1rBlm-rRr-j+1φj+∑j=r+1lmBlm-jCφj)-iτ∑rτ<λmλm/τ∉Z+αm(I+idmA)12((I+B)(∑j=1rBlm-rRr-j+1φj+∑j=r+1lmBlm-jCφj)+Cφlm+1)-i∑rτ<λmλm/τ∉Z+αmdmA+φ},
where
(3.6)Tτ=(I-∑rτ≥λmαm(I+il0mA)Rlm-∑rτ<λmλm/τ∈Z+αmBlm-rRr-∑rτ<λmλm/τ∉Z+αm(I+idmA)12(I+B)Blm-rRr)-1.
Note that, here we considered  ∑k=r+1lmBlm-jCφj=0 for lm=r. So, for the solution of  problem  (3.2),  we have the following formula:
(3.7)uk={Rku0-iτ∑j=1kRk-j+1φj,k=1,…,r,Bk-rRru0-iτ∑j=1rBk-rRr-j+1φj-iτ∑j=r+1kBk-jCφj,k=r+1,…,N,Tτ{-iτ∑rτ≥λmαm(I+il0mA)∑j=1lmRlm-j+1φj-i∑rτ≥λmαml0mφlm-iτ∑rτ<λmλ/τ∈Z+αm(∑j=1rBlm-rRr-j+1φj+∑j=r+1lmBlm-jCφj)-iτ∑rτ<λmλ/τ∉Z+αm(I+idmA)×12((I+B)(∑j=1rBlm-rRr-j+1φj+∑j=r+1lmBlm-jCφj)+Cφlm+1)-i∑rτ<λmλ/τ∉Z+αmdmφlm+φ},k=0.Theorem 3.1.
Assume thatφ∈D(A) and
(3.8)∑m=1p|αm|<1.
Then the solutions of the difference schemes (3.1) satisfy the stability inequalities
(3.9)max0≤k≤N∥uk∥H≤C(α1,…,αp)[∥φ∥H+Tmax1≤k≤N∥φk∥H],(3.10)max1≤k≤N∥uk-uk-1τ∥H+max1≤k≤r∥Auk∥H+maxr+1≤k≤N∥Auk+uk-12∥H≤C(α1,…,αp)[∥Aφ∥H+∥φ1∥HTmax2≤k≤N∥φk-φk-1τ∥H].Proof.
Using the estimates(3.11)∥R∥H→H≤1,∥B∥H→H≤1,∥C∥H→H≤1,
and the formula (3.2), we can obtain
(3.12)max1≤k≤N∥uk∥H≤[∥u0∥H+Tmax1≤k≤N∥φk∥H].
Using the spectral representation of the self-adjoint operators one can establish
(3.13)∥Tτ∥H→H≤11-∑m=1p|αm|≤C(α1,…,αp).
Estimate for ∥u0∥H should also be examined. By using formula (3.7), the triangle inequality, and estimates (3.11), (3.13) the following estimate is obtained:
(3.14)∥u0∥H≤C(α1,…,αp)[∥φ∥H+2Tmax1≤k≤N∥φk∥H].
The proof of the estimate (3.9) for the difference schemes (3.1) is based on the last estimate and estimate (3.12).
Now, estimate (3.10) will be obtained. Using (3.2), we get
(3.15)Auk={RkAξ-iτ∑j=1kARk-j+1φj,k=1,…,r,Bk-rRrAξ-iτ∑j=1rBk-rARr-j+1φj-iτ∑j=r+1kBk-jACφj,k=r+1,…,N.
So that
(3.16)Auk={RkAξ+(∑j=2kRk-j+1(φj-1-φj)+φk-Rkφ1),k=1,…,r,Bk-rRrAξ+∑j=2rBk-rRr-j+1(φj-1-φj)-Bk-rRrφ1+∑j=r+1kBk-j+1(φj-1-φj)+φk,k=r+1,…,N.
For the estimate (3.10)  the two cases should be examined separately: (i) k=1,…,r,  (ii) k=r+1,…,N. Let 1≤k≤r. Then, using (3.16) we get
(3.17)max1≤k≤r∥Auk∥H≤∥RAξ∥H+2Nmax2≤k≤N∥φk-φk-1∥H+2∥φ1∥H.
Therefore,
(3.18)max1≤k≤r∥Auk∥H≤∥RAξ∥H+2Tmax2≤k≤N∥φk-φk-1τ∥H+2∥φ1∥H.
Estimate for ∥RAξ∥H should also be obtained. Using the formula (3.5) and the formula (3.16) we get
(3.19)ξ=Tτ{∑rτ≥λmαm(I+il0mA)R(∑j=2lmRlm-j+1(φj-1-φj)+φlm-Rlmφ1)-i∑rτ≥λmαml0mRAφlm+∑rτ<λmλm/τ∈Z+αmR(∑j=2rBlm-rRr-j+1(φj-1-φj)-Rrφ1)+∑rτ<λmλm/τ∈Z+αmR(∑j=r+1lmBlm-jC(φj-1-φj)+φlm)+∑rτ<λmλm/τ∉Z+αm(I+idmA)×12R((∑j=2rBlm-rRr-j+1(φj-1-φj)-Rrφ1+∑j=r+1lmBlm-j+1(φj-1-φj)+φlm)+(∑j=2rBlm+1-rRr-j+1(φj-1-φj)-Rrφ1+∑j=r+1lm+1Blm-j+2(φj-1-φj)+φlm+1))-i∑rτ<λmλm/τ∉Z+αmdmARφlm+RAφ}.
So  that
(3.20)∥RAξ∥H≤C1(α1,…,αp)[∥Aφ∥H+∥φ1∥H+Tmax2≤k≤N∥φk-φk-1τ∥H].
Therefore, using the estimates (3.18) and (3.20) we obtain
(3.21)max1≤k≤r∥Auk∥H≤C2(α1,…,αp)[∥Aφ∥H+∥φ1∥H+Tmax2≤k≤N∥φk-φk-1τ∥H].
Then using the estimate for  Auk, the relation i((uk-uk-1)/τ)=φk-Auk=φ1-∑j=2k(φj-1-φj)-Auk, and the triangle inequality we get the estimate
(3.22)max1≤k≤r∥uk-uk-1τ∥H+max1≤k≤r∥Auk∥H≤C2(α1,…,αp)[∥Aφ∥H+∥φ1∥H+Tmax2≤k≤N∥φk-φk-1τ∥H].
Now, let k=r+1,…,N. Then using the formula (3.16)  and the identity (1/2)(I+B)=C   we get
(3.23)Auk+uk-12=Bk-r-1Cr-1CRAξ+∑j=2rCBk-1-rRr-j+1(φj-1-φj)-Rrφ1+∑j=r+1kCBk-j(φj-1-φj)+B(φk-1-φk)+φk+φk-12.
So that
(3.24)maxr+1≤k≤N∥Auk+uk-12∥H≤∥RAξ∥H+3Tmax2≤k≤N∥φk-φk-1τ∥H+3∥φ1∥H.
Therefore, using the estimates (3.20) and (3.24), the estimate
(3.25)maxr+1≤k≤N∥Auk+uk-12∥H≤C3(α1,…,αp)[∥Aφ∥H+∥φ1∥H+Tmax2≤k≤N∥φk-φk-1τ∥H]
is obtained. Then, by using the estimate (3.25), the relation i((uk-uk-1)/τ)=φk-A((uk+uk-1)/2)=φ1-∑j=2k(φj-1-φj)-A((uk+uk-1)/2), and the triangle inequality we get the estimate
(3.26)maxr+1≤k≤N∥uk-uk-1τ∥H+maxr+1≤k≤N∥Auk+uk-12∥H≤C4(α1,…,αp)[∥Aφ∥H+∥φ1∥H+Tmax2≤k≤N∥φk-φk-1τ∥H].
The result (3.10) follows from the estimates (3.22) and (3.26). So the proof is complete.


## 4. Convergence

Theorem 4.1.
Assume that∑m=1p|αm|<1. Assume also that Au′′(t)(0≤t≤T) and u′′′(t)(0≤t≤T) are continuous, then the solution of the difference scheme (3.1) satisfies the convergence estimate
(4.1)max0≤k≤N∥uk-u(tk)∥H≤M*(r)τ2,
where M*(r) does not depend on τ but depends on r.Proof.
If we subtract (1.1) from (3.1) we obtain
(4.2)izk-zk-1τ+A2(zk+zk-1)=Ak,r+1≤k≤N,izk-zk-1τ+Azk=Ak,1≤k≤r,z0=∑rτ≥λmαm((I+il0mA)zlm-il0mAlm)+∑rτ<λmλm/τ∈Z+αmzlm+∑rτ<λmλm/τ∉Z+αm(I+idmA)12(zlm+zlm+1)-i∑rτ<λmλm/τ∉Z+αmdmAlm+A0,0<λ1<λ2<⋯<λp≤T,
where zk=uk-u(tk) and Ak is defined by the formula
(4.3)Ak={i(ddt(u(tk-1/2))-u(tk)-u(tk-1)τ)+A(u(tk-1/2)-u(tk)),1≤k≤r,i(ddt(u(tk-1/2))-u(tk)-u(tk-1)τ)+A(u(tk-1/2)-u(tk)+u(tk-1)2),r+1≤r≤N,∑rτ≥λmαm(I+il0mA)u(tlm)+∑rτ<λmλm/τ∈Z+αmu(tlm)+∑rτ<λmλm/τ∉Z+(I+idmA)12(u(tlm)+u(tlm+1))-∑m=1pαmu(λm)+i∑rτ≥λmαml0m(Alm-φlm)+i∑rτ<λmλm/τ∉Z+αmdm(Alm-φlm),k=0.
Then the difference problem (4.2) has a solution in the form (3.7), but instead of  uk,  φk,  φ we take zk, Ak,A0,  k=1,…,N, respectively. Using the estimates
(4.4)∥R∥H→H≤1,∥B∥H→H≤1,∥C∥H→H≤1,
and the formula obtained for the solution of (4.2), we can obtain
(4.5)max1≤k≤r∥zk∥H≤[∥z0∥H+rτmax1≤k≤r∥Ak∥H],maxr+1≤k≤r∥zk∥H≤[∥z0∥H+Tmax1≤k≤r∥Ak∥H].
By the estimate (3.14) we have
(4.6)∥z0∥H≤C(α1,…,αp)[∥A0∥H+2Tmax1≤k≤N∥Ak∥H].
Therefore, in order to obtain the inequality (4.1) we need estimates for Ak for 0≤k≤N.
For0≤k≤N, by the use of the triangle inequality, Taylor's formula, continuity of Au′′(t)(0≤t≤T) and u′′′(t)(0≤t≤T), the estimates
(4.7)max1≤k≤r∥Ak∥H≤M1τ,maxr+1≤k≤N∥Ak∥H≤M2τ2,∥A0∥H≤M2τ2
are obtained. From the last estimates the result follows.


## 5. Numerical Results

In this section, the numerical experiments of the nonlocal boundary value problem(5.1)i∂u(t,x)∂t-((x+1)ux)x=f(t,x),0<t,x<1,u(0,x)=13u(12,x)+φ(x),0<x<1,u(t,0)=u(t,1)=0,0<t<1,f(t,x)=[π2sinπx-πcosπx+π2(x+1)sinπx]exp(-it),φ(x)=(1-13exp(-i2))(sinπx).
by using modified Crank-Nicolson difference scheme (3.1) are investigated. The exact solution of this problem is
(5.2)u(t,x)=(sinπx)exp(-it).
For the approximate solution of problem (5.1), the set [0,1]τ×[0,1]h of a family of grid points depending on the small parameters τ and h(5.3)[0,1]τ×[0,1]h={(tk,xn):tk=kτ,1≤k≤N-1,Nτ=1,xn=nh,1≤n≤M-1,Mh=1}
is defined.Applying the second-order of accuracy modified Crank-Nicolson difference schemes (3.1) we present following second-order of accuracy difference schemes for the approximate solutions of problem (5.1)
(5.4)iunk-unk-1τ-12(un+1k-un-1k2h+un+1k-1-un-1k-12h)-xn+12(un+1k-2unk+un-1kh2+un+1k-1-2unk-1+un-1k-1h2)=f(tk-1/2,xn),r+1≤k≤N-1,1≤n≤M-1,iunk-unk-1τ-un+1k-un-1k2h-(xn+1)un+1k-2unk+un-1kh2=f(tk-τ2,xn),1≤k≤r,1≤n≤M-1,tk-1/2=(k-12)τ,xn=nh,1≤k≤N,1≤n≤M-1,un0=13un[1/2τ]+φ(xn),1≤n≤M-1,u0k=0,uMk=0,0≤k≤N.
So for each r, we have (N+1)×(N+1) system of linear equations which can be written in the matrix form as
(5.5)AnUn+1+BnUn+CnUn-1=Dnφn,1≤n≤M-1,U0=0,UM=0,
where
(5.6)φn=[φn0φn1⋯φnN](N+1)×1,φnk={(1-13exp(-i2))(sinπxn),k=0,f(tk-1/2,xn),1≤k≤N,An=[0an0⋯0000000an⋯00000000⋯00000⋯⋯⋯⋯⋯⋯⋯⋯⋯0000enen000⋯⋯⋯⋯⋯⋯⋯⋯⋯000⋯00enen0000⋯000enen000⋯00000],Bn=[bncn0⋯0⋯000000bncn⋯0⋯00000000⋯⋯⋯00000⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯000⋯0⋯vnsn000⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯⋯000⋯0⋯00vnsn0000⋯0⋯000vnsn100⋯-13⋯00000],Cn=[0dn0⋯0000000dn⋯00000000⋯00000⋯⋯⋯⋯⋯⋯⋯⋯⋯000⋯gngn000⋯⋯⋯⋯⋯⋯⋯⋯⋯000⋯00gngn0000⋯000gngn000⋯00000],D=IN+1((N+1)×(N+1)identitymatrix),Us=[Us0Us1⋯UsN-1UsN],s=n-1,n,n+1.
In the above matrices entries are given as
(5.7)an=-12h-nh+1h2,bn=-iτ,cn=iτ+2(nh+1)h2,dn=(12h-nh+1h2)en=-14h-nh+12h2,vn=(-iτ+nh+1h2),sn=iτ+nh+1h2,gn=14h-nh+12h2.
Thus, we have the second-order difference equation (5.5) with respect to n with matrix coefficients. To solve this difference equation we have applied the same modified Gauss elimination method for the difference equation with respect to n with matrix coefficients. Hence, we seek a solution of the matrix in the following form:
(5.8)Un=αn+1Un+1+βn+1,n=M-1,…,2,1,0,
where αj(j=1,…,M) are (N+1)×(N+1) square matrices and βj(j=1,…,M) are (N+1)×1 column matrices defined by
(5.9)αn+1=-(Bn+Cnαn)-1An,βn+1=(Bn+Cnαn)-1(Dφn-Cnβn),n=1,2,3,…,M-1.
Note that for obtaining αn+1,βn+1,n=1,…,M-1, first we need to find α1,β1. As in [8], we take α1 is an identity matrix, β1 is the zero column vector.For their comparison, first the errors computed by(5.10)EMN=max1≤k≤N-1(∑n=1M-1|u(tk,xn)-unk|2h)1/2
of the numerical solutions of problem (5.1) are recorded for different values of N and M, where u(tk,xn) represents the exact solution and unk represents the numerical solution at (tk,xn). The results are shown in Table 1 for N=M=20,40,80, and 160, respectively.Table 1
Comparison of the errors for the approximate solution of problem (5.1).
MethodN=M=20N=M=40N=M=80N=M=160One-modified Crank-Nicholson0.01370.00380.00100.00025Two-modified Crank-Nicholson0.02260.00710.00190.00048Three-modified Crank-Nicholson0.02720.00990.00280.00072Second, for their comparison, the relative errors are computed by(5.11)relENM=max1≤k≤NENM(∑n=1M|u(tk,xn)|2h)1/2,
and Table 2 is constructed for N=M=20,40,80, and 160, respectively.Table 2
Relative errors for the approximate solution of problem (5.1).
MethodN=M=20N=M=40N=M=80N=M=160One-modified Crank-Nicholson0.01940.00540.00140.00035Two-modified Crank-Nicholson0.03200.01010.00270.00069Three-modified Crank-Nicholson0.03850.01410.00400.00100In the article [12] it can also be found, an example that Crank-Nicolson difference scheme is divergent but modified Crank-Nicolson is convergent.



---

*Source: 584718-2009-08-06.xml*