74
A numerical and analytical investigation into non-Hermitian Hamiltonians. by Gert Jermia Cornelus Wessels Thesis presented at the University of Stellenbosch in partial fulfilment of the requirements for the degree of Master of Physical and Mathematical Analysis University of Stellenbosch Private Bag X1, 7602 Matieland, South Africa Study leaders: Prof. H.B. Geyer Prof. J.A.C. Weideman November 2008

A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

A numerical and analytical investigation intonon-Hermitian Hamiltonians.

by

Gert Jermia Cornelus Wessels

Thesis presented at the University of Stellenboschin partial fulfilment of the requirements for the

degree of

Master of Physical and Mathematical Analysis

University of StellenboschPrivate Bag X1, 7602 Matieland, South Africa

Study leaders:

Prof. H.B. Geyer Prof. J.A.C. Weideman

November 2008

Page 2: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Declaration

I, the undersigned, hereby declare that the work contained in this thesis ismy own original work and that I have not previously in its entirety or inpart submitted it at any university for a degree.

Signature: . . . . . . . . . . . . . . . . . . . . . . . . . .G.J.C. Wessels

Date: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

i

Page 3: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Copyright c© 2008 University of StellenboschAll rights reserved.

Page 4: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Abstract

A numerical and analytical investigation intonon-Hermitian Hamiltonians.

G.J.C. Wessels

University of StellenboschPrivate Bag X1, 7602 Matieland, South Africa

Thesis: MSc (PMA)

November 2008

In this thesis we aim to show that the Schrodinger equation, which is aboundary eigenvalue problem, can have a discrete and real energy spectrum(eigenvalues) even when the Hamiltonian is non-Hermitian. After a briefintroduction into non-Hermiticity, we will focus on solving the Schrodingerequation with a special class of non-Hermitian Hamiltonians, namely PT -symmetric Hamiltonians. PT -symmetric Hamiltonians have been discussedby various authors [1, 2, 3, 4, 5] with some of them focusing specifically onobtaining the real and discrete energy spectrum.

Various methods for solving this problematic Schrodinger equation willbe considered. After starting with perturbation theory, we will move on tonumerical methods. Three different categories of methods will be discussed.First there is the shooting method based on a Runge-Kutta solver. Next,we investigate various implementations of the spectral method. Finally,we will look at the Riccati-Pade method, which is a numerical implementedanalytical method. PT -symmetric potentials need to be solved along a con-tour in the complex plane. We will propose modifications to the numericalmethods to handle this.

After solving the widely documented PT -symmetric Hamiltonian H =p2 − (ix)N with these methods, we give a discussion and comparison of theobtained results.

Finally, we solve another PT -symmetric potential, illustrating the useof paths in the complex plane to obtain a real and discrete spectrum andtheir influence on the results.

iii

Page 5: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Uittreksel

A numerical and analytical investigation intonon-Hermitian Hamiltonians.

G.J.C. Wessels

Universiteit van StellenboschPrivaatsak X1, 7602 Matieland, Suid Afrika

Tesis: MSc (FWA)

November 2008

In hierdie tesis is die hoofdoel om die Schrodinger vergelyking, ’n randvoor-waarde probleem, op te los waar die Hamilton-operatore nie Hermities is nie.Ons probeer wys dat hierdie operatore ’n diskrete en reele energie spektrum(eiewaardes) sal gee. Na ’n kort inleiding oor nie-Hermitisiteit, los ons dieSchrodinger vergelyking op vir PT simmetriese Hamilton-operatore, wat ’nnie Hermitiese subversameling is. PT simmetriese Hamilton-operatore isal in baie besonderhede deur verskeie skrywers bespreek en opgelos met diedoel om ’n reele spektrum te kry, [1, 2, 3, 4, 5].

Ons sal verskeie metodes vir die oplos van hierdie Schrodinger verge-lykings oorweeg. Eers kyk ons na steuringsteorie voordat ons aanbeweegna die numeriese metodes. Daar word drie verskillende numeries metodesoorweeg. Eerste is die skietmetode wat Runge-Kutta gebruik om die diffe-rensiaal vergelykings op te los. Daarna kyk ons na ’n paar variasies van diespektraalmetode. Ons sluit dan hierdie gedeelte af met die Riccati-Pademetode. Die Riccati-Pade metode is nie ’n numeriese metode nie, maar ’nanalitiese metode wat numeries toegepas word.

Aangesien PT simmetriese potensiale soms langs ’n pad in die kom-plekse ruimte opgelos moet word, word ’n paar veranderinge aan die nume-riese metodes voorgestel.

Nadat ons die PT simmetriese Hamilton-operator H = p2 − (ix)N op-gelos het met hierdie metodes, word die resultate bespreek en vergelyk.

iv

Page 6: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Uittreksel v

Ons sluit af met’n ander PT simmetriese potensiaal en illustreer hoe ’nreele spektrum verkry kan word met behulp van ’n pad in die komplekseruimte en hoe verkillende paaie die resultate kan beınvloed.

Page 7: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Contents

Declaration i

Abstract iii

Uittreksel iv

Contents vi

List of Figures viii

List of Tables x

1 Introduction into non-Hermitian Hamiltonians 11.1 Hermitian and Non-Hermitian Hamiltonians . . . . . . . . . 1

1.1.1 Hermitian Hamiltonians . . . . . . . . . . . . . . . . 11.1.2 Quasi- and Pseudo-Hermitian Operators . . . . . . . 31.1.3 PT -Symmetry . . . . . . . . . . . . . . . . . . . . . 5

1.2 Contours in the Complex plane . . . . . . . . . . . . . . . . 71.2.1 Stokes Wedges . . . . . . . . . . . . . . . . . . . . . . 91.2.2 Quantum Toboggans . . . . . . . . . . . . . . . . . . 11

2 Perturbation Theory 13

3 Numerical Methods 173.1 Shooting Methods . . . . . . . . . . . . . . . . . . . . . . . . 17

3.1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . 173.1.2 Other Software Packages . . . . . . . . . . . . . . . . 24

3.2 Spectral Collocation Methods . . . . . . . . . . . . . . . . . 243.2.1 Method 1a : DMSUITE . . . . . . . . . . . . . . . . 253.2.2 Method 1b : DMSUITE, the Fourier approach . . . . 323.2.3 Method 2 : HermiteEig . . . . . . . . . . . . . . . . . 34

3.3 Riccati-Pade . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

vi

Page 8: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Contents vii

3.3.1 V (x) = x2 . . . . . . . . . . . . . . . . . . . . . . . . 403.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

4 The PT -Symmetric Potential V (x) = −(i sinhx)α coshβ x 464.1 Paths in the Complex Plane . . . . . . . . . . . . . . . . . . 47

A MATLAB code 53

B Additional Tables and Figures 59

Bibliography 61

Page 9: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

List of Figures

1.1 Spectrum for the Hamiltonian H = p2 − (ix)N as obtained by Bender andBoettcher [1]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.2 These are the Stokes wedges where N = 4.5 and the contour is z =−2i√

1 + iw. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.3 These are the Stokes wedges whereN = 10 and the contour is z = iµ(sin(α)+

sin(iw − α)). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.4 This figure displays a tobogganic contour with w = 3. . . . . . . . . . . 12

2.1 The first order approximation to the perturbed harmonic oscillator (−(ix)N )along with the spectrum of the potential. A higher order approximationwill approach the spectrum more accurately at N = 2. . . . . . . . . . . 16

3.1 Determining ψ(x) by converting the boundary value problem into two initialvalue problems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.2 The absolute error of the ground state, first and fifth energy level of theharmonic oscillator calculated with the shooting method for different valuesof L. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3.3 The matching function φ(E) for the harmonic oscillator. . . . . . . . 203.4 The effects of ode45’s relative tolerance on the accuracy and runtime (in

seconds) of the shooting method. . . . . . . . . . . . . . . . . . . . . 213.5 The eigenvalues of V (x) = −(ix)N calculated with the shooting method. . 223.6 The eigenvalues of V (x) = −(ix)N calculated with the shooting method on

the contour z = −2i√

1 + ix. . . . . . . . . . . . . . . . . . . . . . . 233.7 Figures for the ground state and first level energy of V (x) = −(ix)3, calcu-

lated for different matrix sizes (n = 32 and n = 96) and compared with theexact values of E0 of E1 respectively to illustrate the dependence on thescaling parameter c. . . . . . . . . . . . . . . . . . . . . . . . . . . 29

3.8 The logarithm of the absolute error of the ground state energy of the har-monic oscillator, N = 2, calculated at different matrix sizes and for differentc-values. c = 1 is expected to give the exact eigenvalues for the harmonicoscillator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

viii

Page 10: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

List of Figures ix

3.9 The logarithm of the absolute error calculated for the first few energy levels,k, of the harmonic oscillator for three different matrix sizes (n = 16, 32, 48)and for c = 2. This figure illustrates the dependency of the accuracy of theeigenvalues on the matrix size. . . . . . . . . . . . . . . . . . . . . . 30

3.10 The eigenvalues calculated using the Hermite spectral collocation methodwith a matrix size 128 and c = 2. . . . . . . . . . . . . . . . . . . . . 31

3.11 Spectrum obtained by solving the problem along the contour z = −2i√

1 + iw

with the Hermite based approach. . . . . . . . . . . . . . . . . . . . 313.12 Stokes wedges for N = 2 and the contour z = −2i

√1 + iw. . . . . . . . . 32

3.13 First we observe that there is an instability where N < 2 and N ≈ 6. In theother two graphs we see that the contour does not stay within the wedgeswhen N < 1 and N ≥ 7, which might explain the instability. . . . . . . . 33

3.14 The eigenvalues calculated using the Fourier interpolation. . . . . . . . . 343.15 Spectrum obtained by solving the problem along the contour z = −2i

√1 + iw

with the Fourier based approach. . . . . . . . . . . . . . . . . . . . . 343.16 The spectrum of the PT -symmetric potential V (x) = −(ix)N obtained by

the HermiteEig method. . . . . . . . . . . . . . . . . . . . . . . . . 383.17 This figure compares speed of the three techniques to calculate H2

D. Thedotted curve indicates the time it took to calculate a symbolic H using(3.26), while the other two curves used the Hankel recursion formula (3.29)to calculate it for both a symbolic and numeric matrix. All of these resultswere obtained by MATLAB, using the symbolic toolbox for the symboliccomputations. Table B.1 contains the data used to obtain this figure. . . . 42

3.18 This figure displays the combination of the solution for the potential V (x) =−(ix)N obtained by integrating on the real and the complex axis with thespectral collocation method. . . . . . . . . . . . . . . . . . . . . . . 44

4.1 Spectrum of Vα 0 related to the reference value αR = 2, the solid curve, andαR = 6, the dashed curve as it was calculated in [3, p. 3113]. . . . . . . . 47

4.2 The ground state energies of Vα β where β = 0. . . . . . . . . . . . . . 484.3 The value of the imaginary component of the contour x + iy when β = 0.

The two dashed lines, y+ and y−, indicates the boundaries of the integrationarea, while the solid line indicates the optimal y-value. . . . . . . . . . . 49

4.4 The eigenvalues of the potential V (x) = −(i sinh(x))α coshβ(x), calculatedwith the spectral collocation method for β = 0 and αR = 2. The spectrumup to α = 2 was calculated on the real axis while the spectrum α > 2 wascalculated along the contour x+ iy with the complex component (4.3). . . 50

4.5 The eigenvalues of the potential V (x) = −(i sinh(x))α coshβ(x), calculatedfor β = 0 and αR = 6. . . . . . . . . . . . . . . . . . . . . . . . . . 51

Page 11: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

4.6 The spectrum of the potential Vα 0, calculated for the two reference valuesαR = 2 (blue) and αR = 6 (red). The ground state eigenvalues determinedin [3] for α = 1, 2, 3 are included in this figure. . . . . . . . . . . . . . . 52

B.1 A log graph for the comparison of the runtime of the HermiteEig and spec-tral collocation method. . . . . . . . . . . . . . . . . . . . . . . . . 59

List of Tables

3.1 The progression of the algorithm as we approach the ground state eigenvalueof the harmonic oscillator, as computed by the secant method (3.5) usingthe initial guesses 0 and 0.75. . . . . . . . . . . . . . . . . . . . . . 21

3.2 In this table we see the estimated errors given by MATSLISE for the eigen-values of the potential V (x) = −(ix)N where N = 2 and N = 6. . . . . . 25

3.3 A MATLAB function for the computation of the eigenenergies of V (x) =−(ix)N . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

3.4 The MATLAB code for calculating the eigenvalues, L, of a potential, fun,using the HermiteEig method. . . . . . . . . . . . . . . . . . . . . . 37

3.5 The order of the determinant HdD|s=0. . . . . . . . . . . . . . . . . . . 41

3.6 The ground state eigenvalue of the harmonic oscillator (E0 = 1) calculatedwith three different implementations of the RPM. . . . . . . . . . . . . 43

4.1 This table shows for which value of α the potential Vα β real and imaginaryparts are positive or negative. After α = 4 the pattern repeats itself. . . . 47

4.2 The absolute error between the ground state eigenvalues of our spectrum,calculated with the spectral collocation method, and the eigenvalues ob-tained in [3] with the Riccati-Pade method. . . . . . . . . . . . . . . . 51

A.1 MATLAB code for calculating eigenvalues by using the shooting method. . 53A.2 The shooting method uses this MATLAB program to solve the two parts

of the eigenfunction given an eigenvalue for the defined potential. . . . . . 54A.3 For the contour calculations, the only difference in the shooting method is

the way the eigenfunctions are solved. . . . . . . . . . . . . . . . . . 55A.4 Program that implements Wynn’s epsilon algorithm. . . . . . . . . . . . 56

x

Page 12: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

List of Tables xi

A.5 This is the MATLAB code used to calculate the Hankel determinant or theRiccati-Pade method. . . . . . . . . . . . . . . . . . . . . . . . . . 57

A.6 fj is the MATLAB code used to determine the coefficients fj , (3.24), whichis the elements of the Hankel determinant calculated in Table A.5 . . . . 58

B.1 This table contains the data used to construct Figure 3.17. It shows thetime it takes to calculate H using three different techniques. The first 2columns used symbolic calculations to determine H, while the last columnused a numerical algorithm. While the first column calculated H usingbrute force, the other 2 made use of the Hankel recursion formula (3.29).All the data was obtained by taking the average from 5 runs. . . . . . . . 60

Page 13: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 1

Introduction intonon-Hermitian Hamiltonians

Traditionally Hermiticity is required, in the context of quantum mechanics,if a Hamiltonian is to have a real energy spectrum. In the last few yearsit has become clear, especially in a quantum mechanical setting, that thisis not a necessity for real energies. This implies that some complex, non-Hermitian Hamiltonians can have a discrete, positive and real spectrum.

1.1 Hermitian and Non-Hermitian

Hamiltonians

1.1.1 Hermitian Hamiltonians

For a consistent quantum mechanical theory, there need to be restrictionsor assumptions. Among these is the requirement that an observable, anoperator that describes a physical quantity, must be Hermitian1.

We start with the observable Q(x, p), where x denotes the displacementand p the momentum. The expectation value of Q can be written in termsof the inner-product,

〈Q〉 =

∫Ψ∗QΨdx = 〈Ψ|QΨ〉 , (1.1)

where Ψ is the wave function. We foresee that the expectation value ofthe observable Q will be real, and so will the average of any number of

1Ref. [6, p. 96]

1

Page 14: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 1. Introduction into non-Hermitian Hamiltonians 2

measurements2,〈Q〉 = 〈Q〉∗ .

The operator Q is constructed from Q by replacing p with p ≡(~iddx

).

Q will be Hermitian (self-adjoint) if⟨Ψ|QΨ

⟩=⟨QΨ|Ψ

⟩,

which holds for any wave function3 Ψ. Normally we would need to takethe complex conjugate4 to change the order within an inner-product. Thisleads to an important property of Hermitian observables,⟨

f |Qg⟩

=⟨Qf |g

⟩, for all f(x) and g(x).

We can therefore apply the Hermitian operator Q to the first or secondpart of the inner-product and still obtain the same results.

The Hermitian conjugate (or adjoint) of an operator Q is Q†, such that⟨f |Qg

⟩=⟨Q†f |g

⟩, for all f(x) and g(x).

This implies that the Hermitian operator Q is equal to its Hermitian con-jugate, Q = Q†.

The eigenvalues of a Hermitian operator have two important properties:the eigenvalues are real and any two eigenfunctions corresponding to twodifferent eigenvalues are orthogonal. We are interested in the first property.

Theorem 1. The eigenvalues of a Hermitian operator Q are real.

Proof. Let Qf = λf where f is the eigenfunction (f(x) 6= 0) and λ theeigenvalue, and ⟨

f |Qf⟩

=⟨Qf |f

⟩,

〈f |λf〉 = 〈λf |f〉 ,

because Q is Hermitian. We now have

λ 〈f |f〉 = λ∗ 〈f |f〉 ,

because λ is a scalar and the first function in the integral (1.1) is a complexconjugate, λ = λ∗, which completes the proof.

2Notation: ∗ denotes the complex conjugate.3In quantum mechanics the wave function lives in the Hilbert space H. In mathe-

matics H refers to the L2 space.4〈f |g〉 = 〈g|f〉∗

Page 15: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 1. Introduction into non-Hermitian Hamiltonians 3

1.1.2 Quasi- and Pseudo-Hermitian Operators

Now that we have shown that Hermitian operators have real eigenvalues,we can look at non-Hermitian operators. In a correspondence betweenBender and Bessis [1], a claim was made that non-Hermitian Hamiltonians(specifically PT -symmetric Hamiltonians) could have a real spectrum.

We start by defining a quasi-Hermitian operator as discussed by Scholtz,Geyer and Hahne, [7].

Definition 1 (Quasi-Hermitian Operator). An operator A : H → H,where H denotes the Hilbert space, is classified as quasi-Hermitian if thereexist a linear metric operator κ : Dκ → H which satisfies,

• Dκ ≡ H. (i.e. the domain of κ is H.)

• κ† ≡ κ. (i.e. κ is Hermitian.)

• 〈φ|κφ 〉 > 0 , for all φ ∈ H and φ 6= 0. (i.e. κ is positive definite.)

• ‖κ φ‖ ≤ ‖κ‖ ‖φ‖ , for all φ ∈ H. (i.e. κ is bounded.)

• κA ≡ A†κ.

We can now define an inner-product using the new metric operator κ,

〈φ|ϑ〉κ ≡ 〈φ|κ ϑ〉 , for all φ ∈ H , ϑ ∈ H. (1.2)

Suppose A is quasi-Hermitian, which implies that it might not be self-adjoint, A† 6= A. It is in fact κ-Hermitian with regards to the newly definedinner-product in the Hilbert space Hκ,

〈φ|A ϑ〉κ = 〈φ|κA ϑ〉=

⟨φ|A† κ ϑ

⟩= 〈A φ|κ ϑ〉= 〈A φ|ϑ〉κ .

Following the same reasoning as Theorem 1, we can prove that theeigenvalues of a quasi-Hermitian operator are real.

Theorem 2. The eigenvalues of a quasi-Hermitian operator A are real.

Proof. Let A f = λ f , where A is quasi-Hermitian with the inner-product(1.2) and λ is an eigenvalue of A. It can be shown that

〈f |A f〉κ = λ 〈f |f〉κ .

Page 16: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 1. Introduction into non-Hermitian Hamiltonians 4

But

〈f |A f〉κ = 〈A f |f〉κ= 〈λ f |f〉κ= λ∗ 〈f |f〉κ .

We now have λ = λ∗ which implies that the eigenvalues are real.

If the metric κ is the identity operator, κ = I, we find that A† = A. Thequasi-Hermitian operator A now falls in the Hermitian set. This impliesthat,

Hermitian ⊂ Quasi-Hermitian.

A more general operator is the pseudo-Hermitian operators [8] since itdoes not necessarily need to be positive definite.

Definition 2 (Pseudo-Hermitian Operator). An operator A : H → H,where H denotes a separable Hilbert space, is pseudo-Hermitian if there existan operator η : H → H such that,

• η−1 exists. η is invertible.

• η† = η. η is Hermitian (self-adjoint).

• η is linear.

• A† = ηAη−1.

It is clear from this definition given by Mostafazadeh [8], that if theredoes not exist an operator η as defined by Def. 2,A is not pseudo-Hermitian.If there exist infinitely many η operators that satisfy A† = ηAη−1, then Ais pseudo-Hermitian.

Given a pseudo-Hermitian operator A, we denote the set of all η op-erators satisfying A† = ηAη−1 by Ω (A). The operator A will be quasi-Hermitian, if Ω (A) includes a positive operator η+. A positive operator η+

is self-adjoint with nonnegative eigenvalues.According to Def. 2, all the elements of Ω (A) are invertible, but η+ is

positive definite and will only have positive eigenvalues.If B is a quasi-Hermitian operator, the operator η+ belonging to Ω (B)

will not be unique. Therefore, any two operators, η+ and η′+, are related.A quasi-Hermitian operator is always pseudo-Hermitian for some η,

where neither η nor −η are positive definite. We can now state that apseudo-Hermitian operator may or may not be quasi-Hermitian. There-fore,

Hermitian ⊂ Quasi-Hermitian ⊂ Pseudo-Hermitian.

Page 17: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 1. Introduction into non-Hermitian Hamiltonians 5

1.1.3 PT -Symmetry

Hermiticity is a strong mathematical restriction and the physical require-ments are quite far reaching. PT -symmetry gives a more physical restric-tion to the Hamiltonian.PT -symmetry implies that a Hamiltonian is invariant under the com-

bined reversal of parity (P) and time (T ). A PT -symmetric Hamiltonianwill not be affected by the time reversal, p → −p, x → x, i → −i andspatial reflection, p→ −p and x→ −x.

Suppose we have the PT -symmetric Hamiltonian H, then it will be truethat

PT H(PT )−1 = PT HPT = H. (1.3)

For H to have a real spectrum, PT -symmetry needs to remain unbroken[1, 2]. Although Schrodinger’s equation and the boundary conditions arePT -symmetric, the eigenfunctions may not be symmetric under the PT op-erator. When the eigenfunctions, the solutions of the Schrodinger equation,retains the PT -symmetry, we say that the PT -symmetry is unbroken.

A complex, PT -symmetric Hamiltonian will only have a real spectrumwhen the symmetry is not spontaneously broken. For example, if the poten-tial remains PT -symmetric after the transformation, but the correspondingeigenfunction does not, the symmetry is broken [9]. This implies that Hand PT must have the same eigenfunctions.

Theorem 3. Let the Hamiltonian H be PT -symmetric and assume thatthe symmetry remains unbroken, then the energy spectrum of H is real.

Proof. Assume H is PT -symmetric, φ is an eigenstate of H with the eigen-value E and φ is also the eigenstate of PT with the eigenvalue λ.

We now have

Hφ = Eφ (1.4)

PT φ = λφ. (1.5)

Next we multiply (1.5) from the left with PT . Since P and T commuteand P2 = 1 = T 2 is true5, we find that

PT PT φ = PT λφ,φ = λ∗PT φ,φ = λ∗λφ.

5In the article [10] by Bender, preceding [2], it was shown that PT -symmetry is ageneralization of Hermiticity and therefore P2 = T 2 = 1 will hold.

Page 18: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 1. Introduction into non-Hermitian Hamiltonians 6

We can now write λ as λ = eiα where α ∈ R. Now replace φ withφe−iα/2 which will give

PT φ = φ. (1.6)

By multiplying (1.4) from the left with PT , we find that

Hφ = Eφ,

PT Hφ = PT Eφ,HPT φ = E∗PT φ, H and PT commute,

Hφ = E∗φ, from (1.6),

Eφ = E∗φ,

E = E∗,

which implies that E is real.

Consider the following Hamiltonian,

H = p2 − (ix)N, N real. (1.7)

For most values of N this Hamiltonian is entirely complex. When we applythe PT operator to H,

T H = (−p)2 − (−ix)N ,

PT H = p2 − (ix)N ,

we find that it is PT -symmetric and the spectrum is real, see Figure 1.1.Another Hamiltonian p2 + (ix)3 + x is complex but when we apply the

PT operator, we find that the symmetry is broken. The energy spectrumis therefore not real.

Another way of looking at PT -symmetry is that it is a condition forselecting a specific Riemann sheet which could cope with the branch pointof the potential at x = 0, [3].

Although PT -symmetry is not a sufficient condition for a Hamilto-nian to have a real spectrum, it does open the doors to a new familyof potentials which might be useful in quantum mechanics. In this the-sis we will only consider the PT -symmetric potentials V (x) = −(ix)N

and V (x) = −(i sinhx)α coshβ x. Different numerical methods will thenbe used for solving these problems. The methods will be compared andtheir strengths and weaknesses will be discussed.

Page 19: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 1. Introduction into non-Hermitian Hamiltonians 7

Figure 1.1: Spectrum for the Hamiltonian H = p2− (ix)N as obtained by Bender andBoettcher [1].

1.2 Contours in the Complex plane

In pseudo-Hermitian quantum mechanics the physical Hilbert space Hphys

is determined by the eigenvalue problem, with a Hamiltonian that acts ona reference Hilbert space H [4]. When a system has a finite-dimensionaldomain, we define H to be the complex Euclidean space6. With PT -symmetrical systems defined on the real axis, we choose H to be L2(R).Some PT -symmetrical Hamiltonians need to be defined on a complex con-tour Γ and there is not a useful Hilbert space for these operators. We wouldlike to redefine our PT -symmetric Hamiltonians in the Hilbert space L2(R).

Suppose F is a set of analytical functions ψ : R→ C and H is a linearoperator H : F → F with the general form

H = (p− A(x))2 + V (x), (1.8)

where A(x) and V (x) are piecewise analytic functions in F and pψ(x) =−iψ′(x), for all ψ in F . Consider the potential V (x) = −(ix)N where ithas been shown that it will have a real and positive spectrum for N ≥ 0 aslong as it is solved along a contour Γ. The domain of this Hamiltonian isrelated to the choice of the asymptotic boundary conditions. It will havea real and discrete spectrum if we define the boundary conditions along an

6Complex Euclidean inner-product: 〈ψ|φ〉 = ψ∗ · φ

Page 20: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 1. Introduction into non-Hermitian Hamiltonians 8

appropriate contour in the complex plane. We therefore need to identifythe eigenvalue problem of this Hamiltonian, expressed with a new complexvariable z:[

−(d

dz− iA(z)

)2

+ V (z)

]Ψ(z) = EnΨn(z) , Ψn(z)→ 0 (1.9)

where z moves along Γ.The contour Γ is generally a smooth curve parameterized with a real pa-

rameter s. Then there exists a continuous, piecewise differentiable functionξ : R→ C, such that Γ = ξ(s)|s ∈ R.

We can now redefine the boundary conditions of (1.9) as,

lim |Ψn (ξ(s))| → 0 as s→ ±∞.

The contour Γ is not unique, but is required to stay within the Stokeswedges as |s| tends to infinity; we will discuss this in the next section.

We choose our contour z = x + iy, as well as our coordinate systemR2 = C, in such a way that it is a smooth and increasing function of x. Wecan now express the function ξ in terms of another differentiable functionf : R→ R,

ξ(x) = x+ if(x).

Now that we have defined a general formula for our contour Γ, we wouldlike to write (1.9) in terms of a complex variable, z = ξ(x), defined alongthe contour Γ. With the change of variables z = x+ if(x), we get[−g(x)2

(d

dx− ia(x)

)2

+ ig(x)3

(d2

dx2f(x)

)(d

dx− ia(x)

)+ v(x)

]ψn(x) = Enψn(x),

where the functions are defined by

g(x) = ξ′(x)−1 =

(1 + i

d

dxf(x)

)−1

a(x) = g(x)−1A(x+ if(x))

v(x) = V (x+ if(x))

ψn(x) = Ψn(x+ if(x)).

The boundary conditions of this new eigenvalue problem becomes ψ(x)→0, as x→ ±∞ and ψn(x) lives in the domain L2(R). The eigenvalue prob-lem (1.9) for the Hamiltonian (1.8) is equivalent to the eigenvalue problemof the Hamiltonian,

H ′ = g(x)2 (p− a(x))2 − g(x)3 (p− a(x))d2

dx2f(x) + v(x). (1.10)

Page 21: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 1. Introduction into non-Hermitian Hamiltonians 9

Suppose ζ : R → C is PT -symmetric, this implies that PT ζPT = ζaccording to (1.3). When we apply this to our Hamiltonian H ′, we get

PT H ′PT = (g(−x)∗)2 (p− a(−x)∗)2−(g(−x)∗)3 (p− a(−x)∗)d2

dx2f(−x)∗+v(−x)∗.

For H ′ to be PT -symmetric, the following must be true:

(g(−x)∗)2 = g(x)2,

g(−x)∗f(−x)∗ = g(−x)∗d2

dx2f(x), (1.11)

a(−x)∗ = a(x) , v(−x)∗ = v(x).

Because f is real and x can be 0, we have

f(x) = −f(x),

A(u)∗|u=−(x+if(x)) = A (x+ if(x)) , (1.12)

V (u)∗|u=−(x+if(x)) = V (x+ if(x)) . (1.13)

The conditions (1.11) imply that z(−x)∗ = z(x). The fact that H ′ isPT -symmetric therefore implies that the contour Γ has a spatial reflectionabout the imaginary axis. Because A and V can be analytically continuedonto the contour Γ, the equations (1.12) and (1.13) imply that they areseparately PT -symmetric.

We can now conclude that the Hamiltonian H (1.8) and the contourΓ are PT -symmetric if and only if the Hamiltonian H ′ (1.10) is PT -symmetric.

1.2.1 Stokes Wedges

PT -symmetric potentials, such as V (x) = −(ix)N , are usually complexexcept for some specific choices of the parameters, in this case N . Therefore,we need to calculate the energies along a contour in the complex plane.More specifically, we need to solve it between the Stokes wedges. Thesewedges are areas in the complex plane where the eigenfunctions go to zeroas x → ±∞. If we choose any contour within these wedges, we will getreal, positive eigenvalues.

For example, consider the contour

z = −2i√

1 + iw, (1.14)

where w is a real parameter.

Page 22: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 1. Introduction into non-Hermitian Hamiltonians 10

Figure 1.2: These are the Stokes wedges where N = 4.5 and the contour is z =−2i√

1 + iw.

These wedges are bounded by the Stokes lines and has an opening angleof ∆ = 2π

N+2. In the middle of each wedge, lies an anti-Stokes line at an

angle of,

θLeft = −π +π

2

(N − 2

N + 2

), (1.15)

θRight = −π2

(N − 2

N + 2

). (1.16)

Figure 1.3: These are the Stokes wedges where N = 10 and the contour is z =iµ(sin(α) + sin(iw − α)).

Page 23: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 1. Introduction into non-Hermitian Hamiltonians 11

We can solve the problem as long as the contour goes to infinity withinthese wedges. This is not always the case as it is shown in Figure 1.3. Wetherefore need to choose our contours carefully and cannot assume that acertain contour will work for all values of N .

1.2.2 Quantum Toboggans

Quantum Toboggans [11, 12] are contours with more complex geometrythan the contours we have discussed up to now.

Contours by definition can have any shape as long as they go to infinityas the real coordinate x goes to ±∞. Furthermore, the boundary conditionsneed to hold for the new complex coordinate z ∈ C(x), where x ∈ R.

Toboggans are trajectories in the complex plane that spiral around thebranch points of a potential and connect two different Riemann sheets.

We start with a basic contour

z = z(x) = x− iε, x ∈ (−∞,∞), (1.17)

where ε > 0. If we solve the anharmonic oscillator, for example,[− d2

dx2+`(`+ 1)

z2+ ω2z2

]φn(z) = En(ω)φn(z), (1.18)

we will get a real and discrete spectrum when we solve this eigenvalueproblem. As we already mentioned, a contour can have any shape. We cannow extend (1.17) to

z(x) = x− iε(x), x ∈ (−∞,∞)

where ε(x) = ε(−x) > 0. This general formula can further be transformedwith the aim to form toboggans,

z(x(γ)) = −iρ(γ)eiγ (1.19)

ρ(γ) =ε(x(γ))

cos γ

where x(γ) = ε tan γ using γ ∈(−π

2, π

2

). The choice of the function ε(x) is

entirely arbitrary given that it has the required shape and ε is sufficientlysmall.

Finally, we allow the contour to run to other Riemann sheets. We modifythe contour (1.19) for a last time by introducing a winding number w, whichallows the contour to wind w-times around a branch point,

zw(x(γ)) = −iρ(γ)2w+1eiγ(2w+1). (1.20)

Page 24: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 1. Introduction into non-Hermitian Hamiltonians 12

Figure 1.4: This figure displays a tobogganic contour with w = 3.

The new coordinate will be defined on the entire logarithmic Riemannsurface R and the eigenfunctions will all have the general form,

φ(z) ∼ c1z`+1 + c2z

−`, |z| 1,

close to the origin and only the angle of (1.20) will show distinction betweendifferent Riemann sheets.

The eigenfunctions of (1.18) are still bound but now by the asymptoticboundary conditions

limγ→±∞

φn(z(x(γ))) = 0,

which lie on two separate Riemann sheets.

Page 25: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 2

Perturbation Theory

In the book of Bender and Orszag [13, p. 330] a method is described thatcan be used to approximate eigenvalues for the Schrodinger equation of theform, (

− d2

dx2+ V (x) + εW (x)− E

)ψ(x) = 0, (2.1)

subject to the boundary conditions

limx→±∞

ψ(x) = 0.

The sum V (x) + εW (x) represents the potential and is a continuousfunction that approaches∞ as x→ ±∞. The assumption is made that thepotential V (x) +εW (x) makes it difficult to solve (2.1), except when ε = 0.When ε = 0, the potential reduces to V (x) and (2.1) is exactly solvable.We are interested in the problem(

− d2

dx2− (ix)N − E

)ψ(x) = 0 (2.2)

where the potential −(ix)N is PT -symmetric. Before we start, we need towrite equation (2.2) in the same form as (2.1).

First, we rewrite the potential by defining ε = N − 2. We continue bychoosing V (x) = x2 and W (x) = −(ix)2+ε − x2. V (x) + W (x) becomesx2 when ε tends to zero. The potential reduces to the harmonic oscillatorwhen we look at the unperturbed problem, which have a known solution,

ψp = C e−x2/2 Hep(x), p = 0, 1, 2, ..., (2.3)

Ep = 2p+ 1, (2.4)

13

Page 26: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 2. Perturbation Theory 14

where Hep(x) denotes the Hermite polynomial of degree p and C is anarbitrary normalization constant.

We have written the potential in the form V (x)+W (x) but this will notgive us a problem in the same form as (2.1). We do this by writing W (x)as a power series in ε,

−x2 − (ix)2+ε = x2 log(ix)ε+O(ε2).

This yields, to first order in ε,(− d2

dx2+ x2 + εx2 log(ix)− E

)ψ(x) = 0. (2.5)

We now try to find a solution of the form,

E =∞∑j=0

Ejεj, (2.6)

ψ(x) =∞∑j=0

ψj(x)εj. (2.7)

Substituting (2.6) and (2.7) into (2.5) and by comparing the powers ofε gives[

− d2

dx2+ x2 − E0

]ψj(x) = −

[x2 log(ix)

]ψj−1(x) +

j∑k=1

Ekψj−k(x).

We can obtain a recursion formule for Ej and ψj(x),

Ej =

∫ ∞−∞

dx ψ0(x)

(x2 log(ix)ψj−1(x)−

j−1∑k=1

Ekψj−k(x)

), (2.8)

ψj(x) = ψ0(x)

∫ x

a

dt

ψ20(t)

∫ t

−∞ds ψo(s)

(s2 log(is)ψj−1(x)−

j∑k=1

Ekψj−k(x)

).

Here a is an arbitrary constant such that ψj(a) = 0 and j = 1, 2, 3, . . ..With these recursion formulas we can calculate Ej and ψj which will be

used along with (2.6) and (2.7) to determine E and ψ.The eigenvalues and -functions of the harmonic oscillator are known and

are given by (2.3) and (2.4). To illustrate this perturbation method we willonly approximate the first two energy levels.

Page 27: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 2. Perturbation Theory 15

First, we approximate the ground level eigenvalue. By using the recur-sion formula for the eigenvalues (2.8), we have,

E1 =

∫ ∞−∞

dx ψ0

(x2 log(ix)ψ0

)=

1

4(2− γE − log 4), (2.9)

where γE is the euler-gamma constant1.By substituting these energies into (2.6) we get the approximation,

E0 =1∑j=0

Ejεj

= E0 + E1ε

= 1 +1

4(N − 2)(2− γE − log 4)

= 0.981755 + 0.00912249N. (2.10)

For the next energy level (p = 1) we have E0 = 3 and ψ0 = 2x e−x2/2He1(x),

and with the recursion formula we obtain

E1 =

∫ ∞−∞

dx ψ0

(x2 log(ix)ψ0

)=

1

4(8− 3γE − log 64). (2.11)

We again substitute these energies into (2.6) to get the approximation,

E1 =1∑j=0

Ejεj

= 1 +1

4(N − 2)(8− 3γE − log 64)

= 1.94527 + 0.527367N. (2.12)

When we continue in this fashion we can get first order approximationsto all of the energy levels. The next few values are

E2 = 1.90878 + 1.54561N,

E3 = 1.53895 + 2.73052N,

E4 = 0.835795 + 4.0821N.

1γE ≈ 0.577216.

Page 28: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 2. Perturbation Theory 16

In Figure 2.1 we see the first order approximation plotted along withnumerical results of the potential. The solution calculated with this pertur-bation method gives a good approximation for the eigenvalues near N = 2.It gets harder when we try to calculate the higher order approximations.

Figure 2.1: The first order approximation to the perturbed harmonic oscillator(−(ix)N ) along with the spectrum of the potential. A higher order approximation willapproach the spectrum more accurately at N = 2.

Page 29: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3

Numerical Methods

In this chapter we will be looking at different numerical methods for solvinga PT -symmetric problem. For each method we will look at their strengthsand weaknesses by comparing them with each other. These methods wereimplemented in MATLAB and Mathematica and most of the program codewill be provided.

3.1 Shooting Methods

3.1.1 Introduction

Shooting methods are widely used for obtaining the eigenvalues of bound-ary value problems [14]. We are only interested in the eigenvalues of theSchrodinger equation,

ψ′′(x) = (V (x)− E)ψ(x), limx→±∞

ψ(x) = 0. (3.1)

The shooting method solves the problem in two parts. First we needto choose a matching point xm, which lies within the boundaries of theproblem, as well as an estimated eigenvalue. Now we use the Runge-Kuttamethod to solve the boundary value problem as two initial value problems;each is solved by starting at a different boundary and working towards xm.When the two parts of the eigenfunction match smoothly at xm, we havechosen the correct eigenvalue.

Consider the following, more general, problem,

ψ′′(x) = w(x,E)ψ(x), x ∈ (a, b) (3.2)

17

Page 30: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 18

Figure 3.1: Determining ψ(x) by converting the boundary value problem into twoinitial value problems.

where w(x,E) represents (V (x)− E). The boundary values are defined by

a0ψ(a) + b0ψ′(a) = 0,

a1ψ(b) + b1ψ′(b) = 0,

where a0 and b0 are not simultaneously zero. The same condition appliesto a1 and b1.

Our first step is to transform this boundary value problem into two firstorder, initial value problems.

u′L(x) = w(x,E)ψL(x) u′R(x) = w(x,E)ψR(x)ψ′L(x) = uL(x) ψ′R(x) = uR(x)

ψL(a) = −b0 , ψ′L(a) = a0 ψR(b) = −b1 , ψ′R(b) = a1

Now we choose an initial estimate for the eigenvalue E and solve ψL(x)on the interval [a, xm] and ψR(x) on [xm, b]. We continue to adapt thevalue of E until the two functions are equal at the matching point, invalue and gradient; only then do we have the correct eigenvalue. Thismeans that if we have chosen the exact eigenvalue, then ψL(xm) = ψR(xm)and ψ′L(xm) = ψ′R(xm). These results can be verified by calculating themismatch function φ(E) at the match point,

Page 31: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 19

φ(E) =

∣∣∣∣ ψ′L(xm, E) ψ′R(xm, E)ψL(xm, E) ψR(xm, E)

∣∣∣∣ . (3.3)

By finding the roots of (3.3), we can find the eigenvalues.We will now apply this method to the PT -symmetric potential V (x) =

−(ix)N ,−ψ′′(x) = (E + (ix)N)ψ(x), lim

x→±∞ψ(x) = 0. (3.4)

First we create the two initial value problems. One for the functionleft of the matching point and one for the function on the right, each withtheir own initial values. For the Schrodinger problem the boundaries are(−∞,∞) and need to be restricted for practical application. We thereforeneed to introduce a new parameter L such that the new boundaries aregiven by [−L,L]. This parameter can affect the accuracy of this methodand will need to be adjusted for different potentials, Figure 3.2.

Figure 3.2: The absolute error of the ground state, first and fifth energy level of theharmonic oscillator calculated with the shooting method for different values of L.

The boundary conditions of this problem are given by

ψL(a) = 0, ψ′L(a) = 1,

ψR(b) = 0, ψ′R(b) = 1,

where a = −L and b = L.

Page 32: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 20

Figure 3.3: The matching function φ(E) for the harmonic oscillator.

In Figure 3.3 it is clearly seen that the roots of φ(E) approximate theeigenvalues1. Figures such as this can provide good initial guesses for solving

φ(E) = 0

iteratively. One iterative solver is, for example, the secant method,

En+1 = En − φ(En)En − En−1

φ(En)− φ(En−1). (3.5)

A more efficient method is the function fzero built into MATLAB, basedon Brent’s idea of inverse parabolic interpolation.

We know that if N = 2, we have the harmonic oscillator. In Table 3.1we illustrate how this algorithm approaches the exact value of the groundstate eigenvalue, E0 = 1. We choose xm = 0 and start with the initialeigenvalues 0 and 0.75.

Table 3.1 shows a rapid decrease in the matching function’s value as theeigenvalue approaches 1.

Implementation and Analysis

The MATLAB implementation of the shooting method can be found inthe Appendix, Tables A.1 and A.2. The potential is entered in line 10 of

1The eigenvalues are E = 1, 3, 5, . . . as given by (2.4).

Page 33: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 21

E 0.00000 0.75000 1.15044 0.99441 0.99994 1.00000φ(E) 2.00000 0.69615 -0.44442 0.01631 0.00018 -1.59E-7

Table 3.1: The progression of the algorithm as we approach the ground state eigenvalueof the harmonic oscillator, as computed by the secant method (3.5) using the initialguesses 0 and 0.75.

rk4 ode (Table A.2). When one runs the MATLAB code in Table A.1, built-in MATLAB functions are used to calculate the eigenvalues. For instance,ode45 was used to solve the differential equations while fzero was used tofind the roots of the matching function, which are the eigenvalues, as shownin Figure 3.3.

Before the method is applied, there are a few choices that need to bemade. The function ode45 has two options that need to be set, the AbsoluteTolerance and the Relative Tolerance. The default values (1 × 10−6 and1 × 10−3 for the absolute and relative tolerance respectively) can be usedbut will have to be adjusted if higher accuracy is required. Another functionwith an option to set is fzero. Through experimentation we found thataccuracy of the solution is not affected by adjusting the tolerances of fzero.

Figure 3.4: The effects of ode45’s relative tolerance on the accuracy and runtime (inseconds) of the shooting method.

It was found that adjusting the absolute tolerance does not show anyimprovement or decline in the accuracy or the runtime of the calculation.The default value for the absolute tolerance is therefore sufficient for thisexercise. On the other hand, adjusting the relative tolerance does affectthe solution. In Figure 3.4 we see two graphs. The first graph is a plotof the error against the relative tolerance. The accuracy of the eigenvaluesincreases dramatically as we choose a smaller relative tolerance. The price

Page 34: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 22

of this accuracy is a steep incline in the cpu-time as seen in the secondfigure.

To compare the entire spectrum of V (x) = −(ix)N , it is satisfactory touse the default values for the tolerances of ode45. When we need to inves-tigate the eigenvalues corresponding to a specific choice of the parameterN , higher accuracy may be required. For now we are interested in reliablyreproducing Figure 1.1.

Figure 3.5: The eigenvalues of V (x) = −(ix)N calculated with the shooting method.

The solution obtained with the shooting method shown in Figure 3.5compares well with the one obtained by Bender and Boettcher [1]2 exceptfor the discontinuity when N = 4. This is due to the complicated nature ofthe potential at N = 4.

When N = 4 the potential reduces to −x4. This potential is notbounded from below and therefore does not have any real eigenvalues.

Up to now, we have only worked in the real space. To compute thespectrum in the complex plane we need to solve the Schrodinger equationalong a contour within the Stokes wedges as discussed in Section 1.2.1. Afterwe choose a contour, for example z = −2i

√1 + ix, we need to incorporate

it into our Schrodinger equation (3.4). The problem can be converted tothe new contour by the following transformations:

2See Figure 1.1 for the solution obtained by Bender.

Page 35: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 23

d2ψ(z)

dz2=(−E − (iz)N

)ψ(z)

d2ψ

dx2

(dx

dz

)2

+dψ

dx

d2x

dz2=(−E − (iz)N

−d2ψ

dx2

(z2

4

)+dψ

dx

(i

2

)=(−E − (iz)N

d2ψ

dx2−(

2i

z2

)dψ

dx=(E + (iz)N

) 4

z2ψ

ψ′′(x) = −E + 2N(1 + ix)N/2

1 + ixψ(x)− i

2(1 + ix)ψ′(x).

(3.6)

By solving the resulting differential equation (3.6), we get the spectrumshown in Figure 3.6.

Figure 3.6: The eigenvalues of V (x) = −(ix)N calculated with the shooting methodon the contour z = −2i

√1 + ix.

Note that the spectrum at the previous problem area (around N = 4) isnow computed accurately. The spectrum for smaller values of N cannot beused, because a contour only gives a good approximation for certain choicesof N .

Page 36: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 24

3.1.2 Other Software Packages

There exists programs with already implemented numerical methods specif-ically designed for solving boundary value differential problems. These pro-grams give reliable solutions. We will only briefly discuss a few of theseprograms in this section.

SLEIGN2 is a FORTRAN program that uses a Prufer-based shootingmethod to compute the eigenvalues and eigenfunctions of Sturm-Liouvilleproblems (which can be converted to the Schrodinger equation),

−(py′)′ + qy = λwy , on (a, b).

These second order linear differential equations, along with their boundaryconditions, can be either regular or singular. A problem occurs when welook at the assumptions made by SLEIGN2. The assumption that hin-der our calculations, is that p, q and w should be real-valued functions onthe interval (a, b). We can therefore not use SLEIGN2 (or its predeces-sor SLEIGN) to calculate the eigenvalues of PT -symmetric potentials, atleast not without modifications. SLEDGE is another Prufer-based shootingmethod, but combines it with a piecewise constant midpoint approximation.The same assumptions prevent us from solving PT -symmetric Schrodingerequations.

MATSLISE is a MATLAB package that calculates the eigenvalues ofSturm-Liouville, Schrodinger and distorted Coulomb problems using piece-wise perturbation (PPM) and constant reference potential perturbationmethods (CPM). This package is described in chapter 7 of [14]. It hasbeen claimed that this MATLAB package is more accurate and efficientthan the well-known SLEIGN or SLEDGE FORTRAN implementations.

Although MATSLISE solves Schrodinger problems with real potentials(e.g. the harmonic oscillator), it cannot work for V (x) = −(ix)N . MAT-SLISE, like SLEIGN2, requires that the potential be real on the given in-terval. This implies that V (x) can only be solved where N gives a realpotential that is bounded from below. Table 3.2 shows us the error givenby MATSLISE for two special cases of V (x) where the potential is real andbounded, namely when N = 2 and N = 6.

3.2 Spectral Collocation Methods

Spectral methods are commonly used to solve ordinary and partial differen-tial equations. The essence of the spectral method is that it approximatesthe solution of the differential equation with a linear combination of func-tions that are continuous over the domain of the solution.

Page 37: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 25

n N = 2 N = 60 −1.2434× 10−14 3.7748× 10−15

1 −5.3291× 10−15 −7.1054× 10−15

2 3.5527× 10−14 5.3291× 10−15

3 2.6468× 10−13 −4.2633× 10−14

4 −1.7231× 10−13 −2.1316× 10−13

5 −1.4033× 10−13 −1.6698× 10−13

6 3.5527× 10−14 8.5265× 10−14

7 −1.4211× 10−14 −5.6843× 10−14

8 2.7001× 10−13 5.8975× 10−13

9 −1.0658× 10−14 2.8422× 10−14

10 9.5923× 10−14 1.0942× 10−12

Table 3.2: In this table we see the estimated errors given by MATSLISE for theeigenvalues of the potential V (x) = −(ix)N where N = 2 and N = 6.

For the spectral collocation method, we choose a grid x0, x1, . . . , xnas well as a set of basis functions for the approximation, ρ0, ρ1, . . . , ρn.

We can now approximate a function f(x) with

f(x) = a0ρ0(x) + a1ρ1(x) + a2ρ2(x) + . . .+ anρn(x). (3.7)

Furthermore, a collocation method requires that the left-hand and right-hand side of (3.7) be equal at the grid points, which gives

f(x0) = a0ρ0(x0) + a1ρ1(x0) + a2ρ2(x0) + . . .+ anρn(x0),

f(x1) = a0ρ0(x1) + a1ρ1(x1) + a2ρ2(x1) + . . .+ anρn(x1),...

......

f(xn) = a0ρ0(xn) + a1ρ1(xn) + a2ρ2(xn) + . . .+ anρn(xn).

This can be rewritten as,f(x0)f(x1)

...f(xn)

=

ρ0(x0) ρ1(x0) . . . ρn(x0)ρ0(x1) ρ1(x1) . . . ρn(x1)

......

...ρ0(xn) ρ1(xn) . . . ρn(xn)

a0

a1...an

. (3.8)

3.2.1 Method 1a : DMSUITE

The first method we are going to investigate is one proposed by Weideman[15]. We start by solving the Schrodinger equation

ψ′′(x) + (E − V (x))ψ(x) = 0 (3.9)

Page 38: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 26

for the quantum harmonic potential, V (x) = x2 [13, p. 28] where the eigen-values and eigenfunctions are known, see (2.3) and (2.4).

Considering the form of (2.3), we can use this as a basis for an approx-imation method,

ψ(x) = e−x2/2

∞∑k=0

ckHek(x), (3.10)

for −∞ < x <∞ where we need to find the coefficients.There are a few methods available for determining ck, namely Galerkin,

Rayleigh and Ritz among others. In the collocation method we would liketo rewrite the polynomial in Lagrange form. Before applying this, we needto truncate the series (3.10) and define a real valued mesh of n + 1 nodes,xnk=0.

ψ(x) ≈ e−x2/2

n∑k=0

ex2k/2ψkLk(x). (3.11)

Lk(x) represents the Lagrange interpolating polynomial

Lk(x) =n∏j=0j 6=k

x− xjxk − xj

,

and ψk ≡ ψ(xk).We now have a weighted polynomial interpolant (3.11). We can rewrite

the interpolant in a more general form,

ψn(x) =n∑k=0

w(x)

w(xk)ψkLk(x), (3.12)

where w(x) = e−x2/2 in our case.

By approximating the eigenfunction of (3.9) with (3.12) we get,

ψ′′n(x) + (E − V (x))ψn(x) ≈ 0.

Furthermore, a collocation method requires that the solution satisfiesthe given equation at all the nodes; this implies that we have equality forall x = xj, j = 0, ..., n:

− d2

dx2

n∑k=0

ψkw(xk)

[w(x)Lk(x)]x=xj + (E − V (xj))ψ(xj) = 0.

Page 39: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 27

This equation can now be converted into matrix notation,

−D(2)ψ + diag(V (xj))ψ = Eψ, (3.13)

where ψ is a vector containing the function values ψjnj=0 at the nodes

xjnj=0 and D(2) is a spectral derivative matrix given by,

D(2)j,k =

1

w(xk)(w′′(xj)Lk(xj) + 2w′(xj)Lk(xj) + w(xj)L

′′k(xj)) .

The diagonal matrix diag(V (xj)) contains the values of the potentialcalculated at the nodes. To obtain the eigenvalues and -functions, we nu-merically diagonalize the coefficient matrix in equation (3.13).

The algorithm to calculate D(2) has been implemented as a MATLABfunction called herdif and is part of the DMSUITE package [16]. Thecode uses the nodes, xjnj=0, and the weights w(xj)nj=0, w

′(xj)nj=0 and

w′′(xj)nj=0 to produce the matrices D(`) of any given order `.Theoretically, we can choose arbitrary nodes for a given weight w(x), but

best accuracy is achieved by choosing the zeros of the Hermite polynomial,Hen+1, which the function scales by a factor c at the mesh points. TheHermite differentiation matrix reproduces exact derivatives for the functionsof the form,

ψ(x) = p(x)e−12(cx)2 , (3.14)

where p(x) is any polynomial with a degree of n.According to Boyd [17], the choice of the scaling parameter c is very

important for convergence. This will be demonstrated in the next section.

Implementation and Analysis

Table 3.3 contains the MATLAB code that is used to calculate the eigen-values of a given potential; in this case V (x) = −(ix)N . The MATLABprogram herdif computes the differentiation matrices and herroots isused to calculate the roots of a Hermite polynomial of degree n. Finally itmakes use of MATLAB’s built-in function eig to calculate the eigenvaluesof the matrix A.

Before we apply the spectral collocation method on Schrodinger’s equa-tion (3.9), we need to determine which value to use for the scaling param-eter, c. If we select a good value for c, the eigenvalues determined by thespectral collocation method should be close to the exact eigenvalues. Tospeed up this process, we will only calculate the ground state energy at aspecific value of N for different values of c. By comparing these results with

Page 40: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 28

function E = spectralHerm(n, c)

[x, DM] = herdif(n, 2, c);

D2 = DM(:,:,2);

for N = linspace(0,6,500)

A = -D2+diag(-(i*x).^N);

E = sort(eig(A));

E = E(1:10);

ell = find(abs(imag(E)) < sqrt(eps));

E = E(ell);

end

Table 3.3: A MATLAB function for the computation of the eigenenergies of V (x) =−(ix)N .

an exact value, we should be able to find the optimal c value. Bender useda Runge-Kutta method in [1] to obtain E0 = 1.1562 when N = 3. For ourcomparison we need a value with higher accuracy.

We obtain a more accurate reference value by using an extrapolationmethod. The epsilon algorithm, Table A.4, uses known approximate solu-tions to obtain a more accurate solution.

We get our first set of solutions by calculating the ground state energyfor a specific c and adjusting the matrix size. Because we do not knowwhich c will give us the best solution, we repeat this method for differentvalues of c and by doing this we increase our set of solutions for the epsilonalgorithm to use.

It is clear from Figure 3.7 that c ≈ 1.8 will give us a good approximationfor a matrix of size n = 32. We run into trouble when the matrix size isincreased. Because an increase in the matrix size increases the accuracyof the eigenvalues, we need a more accurate reference value. Although thenumber of significant digits has increased from 4 to 10 by using the epsilonalgorithm, it still is not enough.

Another method for determining the scaling parameter is by comparingthe derivative of an approximate eigenfunction with the derivative matrixcalculated by herdif.

When we apply the spectral collocation method to a potential, wherethe spectrum is unknown, the choice of c is arbitrary. Although c is used tooptimize our solutions, it can have a drastic effect on the entire spectrum.Ideally we would need to get approximate eigenvalues, for a certain choiceof the parameters, obtained by another method. These eigenvalues can beused as reference values to confirm whether we have the correct spectrum

Page 41: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 29

Figure 3.7: Figures for the ground state and first level energy of V (x) = −(ix)3,calculated for different matrix sizes (n = 32 and n = 96) and compared with the exactvalues of E0 of E1 respectively to illustrate the dependence on the scaling parameter c.

for this potential.Because this method is based on the harmonic oscillator, we would ex-

pect that it would give the exact eigenvalues when N = 2 and c = 1. Wecan now use this information to illustrate the dependence of the spectrumon the scaling parameter and the matrix size. Figure 3.8 shows the errorusing the known ground state energy of the harmonic oscillator and com-paring it with the eigenvalues obtained at N = 2 for different matrix sizesand different c-values. In this figure we can see that the error decreases aswe increase the matrix size n. At a certain point it seems as if the accuracydoes not improve anymore; this is due to roundoff error.

Looking more closely at the error made at each energy level, see Figure3.9, it is clearly visible that the accuracy diminishes as we look at higherlevel eigenvalues. Bigger matrices have higher accuracy but this only appliesto the first few eigenvalues. The accuracy will start to decline at some pointwhen we look at higher order energies due to the more oscillatory nature ofthe higher order modes.

Up until now a brief analysis was made of the method’s accuracy and itconfirms that this is a highly accurate method, given a good choice of thescaling parameter, and was found that it calculates the spectrum in a shortamount of time. The rest of this section will focus on the entire spectrumof V (x) = −(ix)N , since this is what we are really interested in.

Page 42: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 30

Figure 3.8: The logarithm of the absolute error of the ground state energy of theharmonic oscillator, N = 2, calculated at different matrix sizes and for different c-values.c = 1 is expected to give the exact eigenvalues for the harmonic oscillator.

Figure 3.9: The logarithm of the absolute error calculated for the first few energylevels, k, of the harmonic oscillator for three different matrix sizes (n = 16, 32, 48) andfor c = 2. This figure illustrates the dependency of the accuracy of the eigenvalues onthe matrix size.

Figure 3.10 displays the results for the PT -symmetric potential V (x) =−(ix)N . Considering that this was done purely on the real axis, it comparesfairly well with Bender’s solution, Figure 1.1, except where N ≈ 4 andN < 0.5, where a spurious spectrum appears.

When we look closely at the potential−(ix)4, we see that it is unboundedfrom below and therefore have no real eigenvalues.

Page 43: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 31

Figure 3.10: The eigenvalues calculated using the Hermite spectral collocation methodwith a matrix size 128 and c = 2.

This is the result of our calculation on the real axis. Similar to theshooting method, we need to solve the problem along a contour that lieswithin the Stokes wedges. We will use the same contour used in Section3.1, namely z(w) = −2i

√1 + iw where w ∈ R.

The code in Table 3.3 needs to be modified for this contour calculations.We basically need to apply this change of variables to the differentiationmatrix3,

D(2) = diag

(dw

dz

)D(2) + diag

(d2w

dz2

)D(1).

Figure 3.11: Spectrum obtained by solving the problem along the contour z =−2i√

1 + iw with the Hermite based approach.

3The derivatives of w can be obtained by: dwdz = 1/ dzdw and d2w

dz2 = − d2zdw2 /

(dzdw

)3.

Page 44: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 32

In Figure 3.11 it is clearly visible that there is an improvement in theresults in the region where N = 4, but now there is a problem for N < 2.If we recall the section about Stokes wedges, a contour does not work forall values of N .

Figure 3.12: Stokes wedges for N = 2 and the contour z = −2i√

1 + iw.

In Figure 3.12 we can clearly see that the contour does not go to infinitybetween the Stokes lines and therefore we do not get good results for valuesof N around, and smaller than 2. What will happen when we choose anothercontour?

When we try the contour z = i(sinα+ sin(iw − α)) there is once againa drastic change in the spectrum. There is an improvement around N = 4,although the rest of the spectrum cannot be used.

It is clearly visible in Figure 3.13, that our results is again entirelydependent on the choice of the contour.

3.2.2 Method 1b : DMSUITE, the Fourier approach

Another approach is to solve the differential equation on a periodic domain.Previously we used the zeros of the Hermite polynomial when we calculatedthe differentiation matrix as well as the Lagrange interpolant; this Fouriermethod uses a trigonometric polynomial where the nodes are equispaced ona domain [0, 2π]. This can be rescaled to a more general domain [−L,L],by the transformation x→ (x− π)L/π. The interpolant on [0, 2π] is givenby

tN(x) =N∑j=1

ϕj(x)ψj (3.15)

Page 45: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 33

Figure 3.13: First we observe that there is an instability where N < 2 and N ≈ 6.In the other two graphs we see that the contour does not stay within the wedges whenN < 1 and N ≥ 7, which might explain the instability.

where

ϕj(x) =

1N

sin(N2

(x− xj))

cot(

12(x− xj)

), N even,

1N

sin(N2

(x− xj))

csc(

12(x− xj)

), N odd.

Although the Schrodinger equation is not periodic, the solutions tend tozero as x→ ±∞ and can therefore be approximated as a periodic problem.

We can now solve the potential V (x) = −(ix)N using the Fourier ap-proach. In Figure 3.14 we see that there is only a slight improvement in theresults compared to the spectrum obtained with the Hermite approach inthe previous section; the spurious eigenvalues for N < 0.5 dissapears whilethe rest of the energies are as we expected from Figure 3.10.

As before we can solve our Schrodinger equation along a contour. Bycomparing Figure 3.15 with Figure 3.11 it is visible that once again we getmore or less the same spectrum as with the Hermite based spectral method.

Page 46: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 34

Figure 3.14: The eigenvalues calculated using the Fourier interpolation.

Figure 3.15: Spectrum obtained by solving the problem along the contour z =−2i√

1 + iw with the Fourier based approach.

3.2.3 Method 2 : HermiteEig

Another Hermite-based spectral method was recently implemented in MAT-LAB by Damien Trif [18]. It starts of by introducing the linear transfor-mation ξ = cx, where c > 0. The constant c, as in the spectral collocationmethod, discussed in Section 3.2.1, represents a scaling parameter. Whenthis is applied to Schrodinger’s equation (3.9) we get

−d2Ψ

dξ2+ c−2V (c−1ξ)Ψ = E(c)Ψ, (3.16)

where ξ ∈ (−∞,∞). The eigenvalues E of this problem is dependent on cand the eigenvalues of our original problem (3.9) is connected to E , E =c2E(c).

To solve (3.16), we do a series expansion on Ψ,

Page 47: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 35

Ψ(ξ) =∞∑n=0

cnφ(ξ)

where φn(ξ) = e−ξ2/2Hen(ξ)/

√2nn!√π. By rewriting this expansion we get,

Ψ(ξ) =∞∑n=0

cn1√

2nn!√πe−ξ

2/2Hen(ξ)

= e−ξ2/2

∞∑n=0

cn1√

2nn!√π

Hen(ξ)

Ψ(ξ) = e−ξ2/2y(ξ), (3.17)

where y(ξ) =∞∑n=0

1√2nn!√π

Hen(ξ).

Furthermore

d2Ψ

dξ2= e−ξ

2/2[y′′(ξ)− 2ξy′(ξ) + (ξ2 − 1)y(ξ)

].

Through substitution and elimination (3.16) becomes,

−y′′(ξ) + 2ξy′(ξ)− (ξ2 − 1)y(ξ) + c−2V (c−1ξ)y(ξ) = Ey(ξ). (3.18)

We now want to approximate the function y(ξ). From (3.17) we canwrite y(ξ) as a series,

yN(ξ) =N−1∑n=0

cn1√

2nn!√π

Hen(ξ)

=N−1∑n=0

cnϑn(ξ), (3.19)

where

ϑn(ξ) =Hen(ξ)√2nn!√π

= e−ξ2/2φn(ξ). (3.20)

To simplify the implementation of this method, we define the vectors

cT = c0, c1, c2, . . . ,tT = ϑ0, ϑ1, ϑ2, . . . ,

Page 48: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 36

in such a way such that yN(ξ) = cT t(ξ) = tT (ξ)c. We now want to find amatrix X that will satisfy,

ξy(ξ) = ξcT t(ξ) = (Xc)T t(ξ).

Note that Xc is the coefficients of ξ y(ξ). By using the recursion formulaof Hermite polynomials, Hen+1(ξ) = 2ξHen(ξ) − 2nHen−1(ξ), along with(3.19), we get√

2n+1(n+ 1)!√π ϑn+1 = 2ξ

√2nn!√π ϑn − 2n

√2n−1(n− 1)!

√π ϑn−1

ξϑn =

√n+ 1

2ϑn+1 +

√n

2ϑn−1,

where ϑ−1(ξ) = 0 and ϑ0(ξ) = π−1/4 by definition.From (3.20) and the fact that Xc is the coefficients of ξy(ξ), we get the

tri-diagonal matrix X,

Xi,i+1 = Xi+1,i =

√i

2, i = 1, 2, . . . .

Finally we need to determine the differentiation matrix D,

dy

dξ= (Dc)T t(ξ).

The derivatives of the Hermite polynomials satisfy He′n = 2nHen−1.From (3.20) we can show that,√

2nn!√π ϑ′n = 2n

√2n−1(n− 1)!

√π ϑn−1

ϑ′n =√

2n ϑn−1. (3.21)

The non-zero elements of D will therefore yield,

Di,i+1 =√

2i , i = 1, 2, . . . .

Using equation (3.18) and the matrices X and D, we get[−D2 + 2XD −X2 + V (X) + IN

]c = Ec.

We can now solve this eigenvalue problem.The MATLAB code for this method is freely available4 and is easy to

implement. This package consist of five essential programs.

4MATLAB Central > File Exchange > Chemistry and Physics > HermiteEig,http://www.mathworks.com/matlabcentral/fileexchange.

Page 49: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 37

The first two programs are X = mult(N) and D = deriv(N) that calcu-lates the N×N coefficient matrices X and D. The program [x,w] = pd(n)

calculates the nodes and the grid points of the Gauss-Hermite quadrature,while t = x2t(n,x) calculates the vector t. Finally there is the main pro-gram sph, Table 3.4.

function [L,psi,x,w,t] = sph(fun,n,a)

[x,w] = pd(n); t = x2t(n,x);

D = deriv(n); X = mult(n);

V = feval(fun,X/a);

A = -D^2 + 2*X*D + V/a^2 - X^2 + eye(n);

[v,l] = eig(A);

L = diag(l)*a^2;

[L,ind] = sort(L);

psi = v(:,ind);

Table 3.4: The MATLAB code for calculating the eigenvalues, L, of a potential, fun,using the HermiteEig method.

After applying this method to the PT -symmetric potential V (x) =−(ix)N , we find that it gives satisfactory results, Figure 3.16, except, ofcourse, near N = 4.

The main difference between Trif’s and Weideman’s methods is thatTrif uses a Hermite function base for the spectral collocation method, whileWeideman uses a Lagrange base. Furthermore, the differentiation matrixobtained by HermiteEig is a banded matrix compared to the dense matricesthat DMSUITE returns.

The HermiteEig method compares extremely well with the spectral col-location method discussed earlier. It has been found that there is not a bigdifference between the results of these two methods, given that the sameparameters are chosen. It can be shown, and is illustrated in Damien Trif’sarticle [18], that HermiteEig gives better results. The main difference isthat the differentiation matrix obtained by HermiteEig is a banded ma-trix, unlike the matrix created by DMSUITE. The result of these bandedmatrices is a solution that is less affected by roundoff errors.

Page 50: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 38

Figure 3.16: The spectrum of the PT -symmetric potential V (x) = −(ix)N obtainedby the HermiteEig method.

3.3 Riccati-Pade

In a 1989 article by F.M. Fernandez, Q. Ma and R.H. Tipping [19], aRiccati-Pade method (RPM) was proposed for finding the eigenvalues ofthe Schrodinger equation,

ψ′′(x) = [V (x)− E]ψ(x). (3.22)

This method starts by transforming Schrodinger’s equation into a Ric-cati equation. The solution will then be approximated by Pade approxi-mants. By finding the roots of the resulting determinant, we can find theeigenvalues.

First we convert the Schrodinger equation into a Riccati equation5. Thisis done by defining a function Φ(x) = x−sψ(x), where s = 0 will yieldeven energy levels and s = 1 the odd energy levels. The result of thistransformation is that the logarithmic derivative

f(x) ≡ −Φ′(x)/Φ(x)

will be regular at the origin. Through substition we can now rewrite (3.22)as a Riccati equation

f ′(x)− f(x)2 + 2sf(x)/x = E − V (x).

5Riccati Equation: y′(x) = a(x)y(x)2 + b(x)y(x) + c(x).

Page 51: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 39

Note that we have now reduced (3.22) from a second order problem toa first order problem. The cost of this reduction of order is that we nowhave a non-linear problem compared to the linear problem we started with.

For simplicity we make the assumption that these potentials are sym-metric. We now need to expand the potential V (x) and the logarithmicderivative f(x) in a Taylor series around the origin,

V (x) =K∑j=1

vjx2j, vK > 0, (3.23)

f(x) =∞∑j=0

fjx2j+1,

where the coefficients fj satisfy the formula

fj =

[j−1∑i=0

fifj−1−i + Eδj0 −K∑i=0

viδji

](2j + 2s+ 1)−1. (3.24)

Now that the Schrodinger equation has been transformed into a Riccatiequation, we can approximate f(x) by using a sequence of rational func-tions,

g(x) =A(x)

B(x),

A(x) =M∑j=0

ajx2j+1,

B(x) =N∑j=0

bjx2j, b0 = 1.

Given that g(x) is a Pade approximant, f(x) − g(x) = O(x2(M+N)+3).There are M +N + 2 adjustable parameters in the approximating function;namely the coefficients aj, bj and the eigenvalue E. From (3.24) we see thatfj will be a function in E; more specifically a polynomial of degree j + 1.If we choose E such that f(x) − g(x) = O(x2(M+N)+5), we will get a moreaccurate solution for the Riccati equation around x = 0 and the coefficientsaj and bj will satisfy

Page 52: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 40

j∑i=0

bjfj−i = aj, j = 0, . . . ,M ,

j∑i=0

bjfj−i = 0, j = M + 1, . . . ,M +N + 1 , (3.25)

where bi = 0 for i > N .The N coefficients bj with j = 1, .., N cannot satisfy the N + 1 homo-

geneous, linear equations (3.25) unless

HdD =

∣∣∣∣∣∣∣∣∣fd+1 fd+2 · · · fd+Dfd+2 fd+3 · · · fd+D+1

......

. . ....

fd+D fd+D+1 · · · fd+2D−1

∣∣∣∣∣∣∣∣∣ = 0, (3.26)

where d = M −N ≥ 0 and D = N + 1.It can be shown that the roots of (3.26) converge towards the eigenvalues

as the size (D) of the matrix increases6.

3.3.1 V (x) = x2

To illustrate the Ricatti-Pade Method we will apply it to the well-knownquantum harmonic oscillator, V (x) = x2. For simplicity, we will only dothis for a small matrix:

H02 =

∣∣∣∣ f1 f2

f2 f3

∣∣∣∣ . (3.27)

The coefficients fj can be found by using the recursion formula (3.24).

6For asymmetric potentials we will get the Riccati equation f ′(x) = f(x)2+E−V (x).Because f(x) is regular at the origin, we can do a Taylor expansion where the coefficientssatisfy, fj+1 =

[∑ji=0 fifj−i −

∑2Ki=2 viδji + Eδj0

](j + 1)−1. Another main difference

between the solving of symmetric and asymmetric potentials is that now HdD = Hd+1

D =0. For a more in depth discussion, consult [19].

Page 53: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 41

For this exercise we will only compute the even energies (s = 0).

f0 =E

2s+ 1= E

f1 =f 2

0 − v1

2s+ 3=

1

3(E2 − 1)

f2 =2f0f1

2s+ 5=

2

15(E3 − E)

f3 =2f0f2 + f 2

1

2s+ 7=

1

315(17E4 − 22E2 + 5)

Therefore H02 =

(E2 − 25)(E2 − 1)2

4725= 0 (3.28)

When we solve H02 = 0 for E, we find that E = ±1 or E = ±5.

This is exactly the ground state and second energy7 according to theknown formula for the eigenvalues of the harmonic oscillator, En = 2n+ 1.

HdD O(Hd

D)

H02 = (E2−25)(E2−1)2

47256

H12 = (E2−25)(E2−1)2(E2+3)

2976758

H22 = (E2−25)(E2−1)2(135−28E2+13E4)

44204737510

H03 = (E2−81)(E2−25)2(E2−1)3

4641497437512

H02 = 4E(E2+29)(E2−81)(E2−25)2(E2−1)3

89604108030937515

Table 3.5: The order of the determinant HdD|s=0.

In Table 3.5 we have shown a few determinants where s = 0. As we cansee, the order of the polynomials increase as we increase the parametersd and D. This leads to more eigenenergies. Through inspection it canbe shown that an increase in d increases the possibility of repetition ofeigenenergies, while an increase in D (the matrix size) provide more distincteigenvalues.

There is a disadvantage to using a larger matrix. Because we work witha symbolic matrix, the time it takes to calculate the roots of Hd

D, increasesdrastically, see Figure 3.17.

7We ignore the negative energies because physically it does not mean anything.

Page 54: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 42

Figure 3.17: This figure compares speed of the three techniques to calculate H2D.

The dotted curve indicates the time it took to calculate a symbolic H using (3.26), whilethe other two curves used the Hankel recursion formula (3.29) to calculate it for botha symbolic and numeric matrix. All of these results were obtained by MATLAB, usingthe symbolic toolbox for the symbolic computations. Table B.1 contains the data usedto obtain this figure.

First we notice that HdD is the Hankel determinant [20, p. 595] and a

recursion formula can be derived from Jacobi’s Identity8 to calculate HdD,

Hnk =

Hnk−1H

n+3k−1 − (Hn+1

k−1 )2

Hn+2k−2

. (3.29)

This did not have the effect we hoped for, Figure 3.17. When we usethe recursion formula (3.29) to determine Hd

D, more symbolic calculationsare needed compared to (3.26), which leads to an increase in runtime.

To improve the speed of the calculations, we steered away from sym-bolic functions and used numerical vectors to represent the polynomials, fk(The MATLAB implementation can be viewed in Tables A.5 and A.6). Forexample, the polynomial 2x2 − 3x5 becomes [-3 0 0 2 0 0]. The multi-plication and division of these vectorized polynomials can be done by usingMATLAB’s conv and deconv respectively. This made a huge improvementin the speed.

Looking at Table 3.6 it is clearly visible that there is a disadvantageto using numerical methods. The runtime might have increased, but thealgorithm is very unstable. The accuracy of the eigenvalues decrease as thematrix size increases.

8Jacobi’s Identity: (Hnk )2 −Hn−1

k Hn+1k +Hn−1

k+1Hn+1k−1 = 0.

Page 55: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 43

D Symbolic H2D Symbolic Hankel Numerical Hankel

1 - 1 12 1 1 1.00± 7.467i× 10−9

3 1 1 1.0000083134 1 1 1.0015491105 1 1 1.237479374

Table 3.6: The ground state eigenvalue of the harmonic oscillator (E0 = 1) calculatedwith three different implementations of the RPM.

To conclude, the Riccati-Pade method is not an efficient method. Theanalytical approach is time consuming while the numerical method is unsta-ble. Finally, we will not be able to apply it to the PT -symmetric potentialV (x) = −(ix)N without modification because this function cannot be ex-panded into a power series, of the form (3.23), for non integer N values.

3.4 Summary

We started this chapter by looking at the shooting method. This methodis easy to understand and implement. There are a few variations of thismethod. Different numerical solvers can be used on the two initial valueproblems. There are also different root finding methods available to solvethe matching function.

The implementation used in this thesis gives accurate eigenvalues if theappropriate tolerances are chosen for the MATLAB function ode45, seeFigure 3.4. The cost for these solutions, is a relatively long runtime.

Second, we considered three different implementations of the spectral col-location method. The first two were variants of the method implementedby DMSUITE.

We started with the Lagrangian implementation of the spectral colloca-tion. By using the supplied MATLAB code, it is relatively easy to applythis method to other PT -symmetric potentials. The only factor that mightdelay obtaining the solutions, is the choosing of an appropriate scaling pa-rameter c. Since the choice of c is entirely arbitrary, another approximationor numerical method can be used to obtain a set of reference eigenvalues.These values can be used to verify that your choice of c gives an accuraterepresentation of the spectrum.

Another important point to remember when solving a PT -symmetricpotential is that it is sometimes required to solve the Schrodinger equation

Page 56: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 44

Figure 3.18: This figure displays the combination of the solution for the potentialV (x) = −(ix)N obtained by integrating on the real and the complex axis with thespectral collocation method.

on a complex contour. The spectrum obtained by this contour calculationwill probably differ from our solution obtained on the real axis, but thisshould be expected, since the contour is dependent on the parameter N .

The next variation of the spectral collocation method we looked at hada Fourier basis. Considering the decaying shape of the eigenfunctions9, wecan consider them as periodic. Instead of the zeros of a Hermite polynomial,trigonometric polynomials, which requires rescaling to [−L,L], was used.Similar to the scaling parameter c, we have an adjustable parameter L thatcan influence the outcome of the algorithm.

With this Fourier implementation we obtain similar results to that of theLagrange based method. The only visible difference between these solutionsis the disappearance of the spurious eigenvalues which occurred when N < 1(compare Figure 3.10 and 3.14).

Finally we look at a Hermite based spectral collocation method im-plemented in the package HermiteEig. The main difference between thismethod and the other two is that it has a banded differentiation matrix.The structure of this algorithm is similar to the other two methods, exceptthat the math is more elaborate. The result is a solution which is less af-fected by roundoff errors.

The last numerical method we will consider is the Riccati-Pade method.

9limx→±∞ ψ(x) = 0.

Page 57: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 3. Numerical Methods 45

This method obtains the eigenvalues of the Schrodinger equation using ananalytical approach. The advantage of this is that it is not affected byroundoff and other errors resulting from numerical methods. The drawbackof this method is that it can become time consuming. To speed up theprocess, we implemented this method numerically.

The result was a solution obtained in a short amount of time. Theproblem with this method is that the error increases as we try to get moredistinct eigenvalues (by increasing D). We can therefore conclude that theanalytical approach is time consuming, while the numerical solution can beinaccurate.

This method is inefficient but still useful. Given that the PT -symmetricpotential can be expanded in a Taylor series, for a specific choice of param-eters, it can be used to determine the accuracy of your solutions obtainedby other numerical methods.

Page 58: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 4

The PT -Symmetric PotentialV (x) = −(i sinhx)α coshβ x

In this chapter we will be look at another PT -symmetric potential as dis-cussed in [3],

Vα β(x) = −(i sinh(x))α coshβ x, (4.1)

with real parameters α and β. The potential tends to ∞ or −∞ whenx→ ±∞. The α-parameter is responsible for the “shape” of the potential,since α determines whether the real and imaginary parts of Vα β are negativeor positive. The β-parameter does not have a major effect on the potentialalthough some negative β choices may result in an unbounded potential.For this reason we restrict our parameters to values which satisfies α+β > 0.

When α = 2 we have a positive and bounded potential. Using α = 2 asa reference value, we can now find the eigenvalues for α > 2 and α < 2. Wecan choose any other α as a reference value given that the potential is real,positive and bounded; for example, αR = 6 or αR = 10. In fact, when welook closely at the potential’s real and imaginary parts, we can see that apattern emerges, Table 4.1. In Figure 4.1 we can see two separate spectrawith different reference values as calculated in [3].

In Figure 4.2 we have the ground state eigenvalues of Vα β and we seethat there is a discontinuity at α = 4. This is because the potential isnegative and unbounded from below and therefore does not have any realeigenvalues. When α ∈ [4, 8] the eigenvalues are real again. These arethe eigenvalues connected to αR = 6. This is consistent with the patternαR = 2 + 4N , where N is a positive integer, visible in Table 4.1. Everyoneof these reference values has a different energy spectrum related to it. We

46

Page 59: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 4. The PT -Symmetric Potential V (x) = −(i sinhx)α coshβ x 47

α Real Vα β Imaginary Vα β0 V< < 0 V= = 0

0 < α < 1 V< < 0 V= < 0α = 1 V< = 0 V= < 0

1 < α < 2 V< > 0 V= < 0α = 2 V< > 0 V= = 0

2 < α < 3 V< > 0 V= > 0α = 3 V< = 0 V= > 0

3 < α < 4 V< < 0 V= > 0α = 4 V< < 0 V= = 0

Table 4.1: This table shows for which value of α the potential Vα β real and imaginaryparts are positive or negative. After α = 4 the pattern repeats itself.

Figure 4.1: Spectrum of Vα 0 related to the reference value αR = 2, the solid curve,and αR = 6, the dashed curve as it was calculated in [3, p. 3113].

therefore need to find a way to solve the differential equation related to aspecific αR.

4.1 Paths in the Complex Plane

We need to find a path in the complex plane along which to integrate.This potential, like many others, has a branch point at x = 0. The result

of this branch point is that the real part is symmetric and the imaginarypart is antisymmetric. We can now rewrite Vα β as

Page 60: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 4. The PT -Symmetric Potential V (x) = −(i sinhx)α coshβ x 48

Figure 4.2: The ground state energies of Vα β where β = 0.

V (x) = eiπ(2+α)/2 sinhα x coshβ x , x > 0

V (x) = e−iπ(2+α)/2 sinhα x coshβ x , x < 0.

This potential is PT -symmetric and needs to cut the complex planefrom 0 to −∞. Before we continue to find the paths, we need to verifywhether we have bounded solutions. When x→ +∞, the potential reducesto

limx→∞

Vα β(x) = eiπ(2+α)/2 e(α+β)x 2−(α+β).

If we assume that the solution has the form Ψ(x) = eG(x), as in theWKB approximation, the leading order of the expansion will yield

G(x)→ ±eiπ(2+α)/4 2 e(α+β)x/2

(α + β) e(α+β)/2. (4.2)

Excluding the case when α = 4N , G(x) is negative and its magnitudeincreases exponentially, which satisfies the requirement limx→±∞Ψ(x) = 0.There appears to be discrete eigenvalues with localized solutions.

To find out how these contours are constructed, we will focus on thecase where α = 2. When α = 2, the phase factor of G(x) reduces to eiπ.We would like to extend our spectrum away from α = 2, ideally to α > 4.Let us introduce a new parameter δ such that α = 2 + δ. The phase anglenow becomes θ = π + δ π

4and the solution tends to

Page 61: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 4. The PT -Symmetric Potential V (x) = −(i sinhx)α coshβ x 49

Ψ(x)→ e−(cos(δ π4)+i sin(δ π

4)) e(α+β)x/2

as x → ∞. To extend the integration past α = 4, we need to integratealong a contour x + iy. The imaginary component needs to be negativefor PT -symmetry to hold. When we substitute x with x+ iy in G(x), thephase angle changes to

θ =π(α + 2)

4+y(α + β)

2.

When θ = π the exponential part will decrease the fastest. This is theanti-stokes line as discussed in Section 1.2.1. For the solution to converge,the contour is bounded by the region θ = π ± π/2. The optimal contoursuggests that y is equal to

y =(2− α)π

2(α + β). (4.3)

This value of y is negative when α > 2, which implies that the PT -symmetry remains unbroken. However, we can still solve the differentialequation for any y-value within the regions indicated in Figure 4.3 and byequations (4.4) and (4.5).

Figure 4.3: The value of the imaginary component of the contour x+ iy when β = 0.The two dashed lines, y+ and y−, indicates the boundaries of the integration area, whilethe solid line indicates the optimal y-value.

Page 62: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 4. The PT -Symmetric Potential V (x) = −(i sinhx)α coshβ x 50

y+ =(4− α)π

2(α + β), (4.4)

y− =−απ

2(α + β). (4.5)

In Figure 4.2 we recall that there are segments of real eigenvalues whichare connected to a specific reference value, for example αR = 2. Figure4.3 verifies this by showing us that when we solve the differential equationon the real axis, y = 0, we can get real eigenvalues up to α = 4, withoutbreaking the PT -symmetry.

Using the contour (4.3) to calculate the eigenvalues when α > 2, we findthat the spectrum now extends past α = 4, Figure 4.4.

Figure 4.4: The eigenvalues of the potential V (x) = −(i sinh(x))α coshβ(x), calculatedwith the spectral collocation method for β = 0 and αR = 2. The spectrum up to α = 2was calculated on the real axis while the spectrum α > 2 was calculated along the contourx+ iy with the complex component (4.3).

We can now do the same to obtain more spectra connected to otherreference values. For example, the imaginary component of the contourconnected to αR = 6 is given by,

y =π(6− α)

2(α + β), (4.6)

Page 63: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 4. The PT -Symmetric Potential V (x) = −(i sinhx)α coshβ x 51

with the boundaries given by,

y− =π(4− α)

2(α + β),

y+ =π(8− α)

2(α + β).

By using (4.6) we get the spectrum in Figure 4.5.

Figure 4.5: The eigenvalues of the potential V (x) = −(i sinh(x))α coshβ(x), calculatedfor β = 0 and αR = 6.

We have now obtained two spectra related to different αR values. Todetermine how accurate our results are, we need to return to [3]. The onlyvalues available to us for a comparison was obtained by the Riccati-Pademethod.

α = 1 α = 2 α = 3 α = 3(real axis) (real axis) (αR = 2) (αR = 6)

4.248× 10−13 9.253× 10−5 4.547× 10−10 2.604× 10−11

Table 4.2: The absolute error between the ground state eigenvalues of our spectrum,calculated with the spectral collocation method, and the eigenvalues obtained in [3] withthe Riccati-Pade method.

In Table 4.2 we see that the ground state eigenvalues calculated withthe spectral collocation method, compares well with the eigenvalues of [3].

Page 64: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Chapter 4. The PT -Symmetric Potential V (x) = −(i sinhx)α coshβ x 52

Figure 4.6: The spectrum of the potential Vα 0, calculated for the two reference valuesαR = 2 (blue) and αR = 6 (red). The ground state eigenvalues determined in [3] forα = 1, 2, 3 are included in this figure.

Figure 4.6 is a combination of the Figures 4.4 and 4.5, which is similar tothe figure generated in [3], see Figure 4.1.

Page 65: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Appendix A

MATLAB code

global flComp;

flComp = false;

% Method used to solve the 2 inital value problems

% and returns \phi(E).fname = ’rk4 ode’;

abt = 1e-6; % Absolute Tolerance of ode45

relt = 1e-12; % Relative Tolerance of ode45

E = [];

for N = linspace(0.8,5,500)

for ee = linspace(0,20,20)

f = fzero(fname,ee,1e-10,N,abt,relt);

if flComp == false

E = [E; N, f];

end

end

end

Table A.1: MATLAB code for calculating eigenvalues by using the shooting method.

53

Page 66: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Appendix A. MATLAB code 54

function phi = rk4 ode(E,N,abtl,reltl)

global flComp;

xm = 0; %The matching point

a = -10; %The left boundary

b = 10; %The right boundary

y0 = 0; %The inital values

v0 = 1;

options = odeset(’Abstol’,abtl,’RelTol’,reltl);

F = @(x,w) [w(2); (-(i*x)^N-E)*w(1)];

% Solves the left part of the eigenfunction

[XL,WL] = ode45(F,[a xm], [y0 v0],options);

YL = WL(:,1); VL = WL(:,2);

YL = YL/max(abs(YL)); VL = VL/max(abs(VL));

% Solves the right part of the eigenfunction

[XR,WR] = ode45(F,[b xm], [y0 v0],options);

YR = WR(:,1); VR = WR(:,2);

YR = YR/max(abs(YR)); VR = VR/max(abs(VR));

% phi = The matching function

phi = (VR(end)*YL(end)-VL(end)*YR(end));

if imag(phi) == 0

flComp = false;

else

flComp = true;

end

phi = real(phi); % Returns the matching function phi(E)

Table A.2: The shooting method uses this MATLAB program to solve the two partsof the eigenfunction given an eigenvalue for the defined potential.

Page 67: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Appendix A. MATLAB code 55

function phi = rk4 ode modified(E,N,abtl,reltl)

global flComp;

global tE;

global tN;

tE = E; tN = N;

xm = 0; %The matching point

a = -10; %The left boundary

b = 10; %The right boundary

y0 = 0; %The inital values

v0 = 1;

options = odeset(’Abstol’,abtl,’RelTol’,reltl);

% Solves the left part of the eigenfunction

[XL,WL] = ode45(@contour,[a xm], [y0 v0],options);

YL = WL(:,1); VL = WL(:,2);

YL = YL/max(abs(YL)); VL = VL/max(abs(VL));

% Solves the right part of the eigenfunction

[XR,WR] = ode45(@contour,[b xm], [y0 v0],options);

YR = WR(:,1); VR = WR(:,2);

YR = YR/max(abs(YR)); VR = VR/max(abs(VR));

phi = (VR(end)*YL(end)-VL(end)*YR(end));

phi = real(phi); % Returns the matching function phi(E)

end

% Defines the new ODE with the Contour

function dy = contour(t,y)

global tE;

global tN;

dy = zeros(2,1);

dy(1) = y(2);

dy(2) = (2^tN *(1+i*t)^(tN/2) - tE)*y(1)/(1+i*t) - (i/2)*y(2)/(1+i*t);

end

Table A.3: For the contour calculations, the only difference in the shooting methodis the way the eigenfunctions are solved.

Page 68: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Appendix A. MATLAB code 56

function lim = weps(a);

% Program that implements Wynn’s epsilon algorithm.

a = a(:);

N = length(a);

n = [1:1:N];

S = a; E = [];

E(:,1:2) = [zeros(size(S)) S];

for j = 3:N

D = [E(2:N,j-1); 0]-[E(1:N-1,j-1); 0];

L = (D==0);

D(L) = eps;

R = 1./D;

R(L) = NaN;

E(:,j) = [E(2:N,j-2); 0] + R;

end

b = E(1,2:2:N);

b(isnan(b)) = [];

lim = b(length(b));

Table A.4: Program that implements Wynn’s epsilon algorithm.

Page 69: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Appendix A. MATLAB code 57

function HH = Han(n,k,s)

% Han(n,k,s) calculates the Hankel determinant

% (eqn.10 in J.Phys.Rev.A, Gen.Phys. Vol.40 no.11 p.6149, 1989).

% This is a recursion formula as described in "Applied and

% computational Complex analysis Vol 1, P Henrici" p595.

if k == 1

% fj is a program that calculates f j using the recursion formula

HH = fj(n+1,s);

elseif k == 2

m1 = conv(fj(n+1,s),fj(n+3,s)); m1 = polyreduce(m1);

m2 = conv(fj(n+2,s),fj(n+2,s)); m2 = polyreduce(m2);

dm = length(m2)-length(m1);

m1 = [zeros(1,dm),m1];

m2 = [zeros(1,-dm),m2];

HH = m1 - m2;

else

m1 = conv(Han(n,k-1,s),Han(n+2,k-1,s)); m1 = polyreduce(m1);

m2 = conv(Han(n+1,k-1,s),Han(n+1,k-1,s)); m2 = polyreduce(m2);

dm = length(m2)-length(m1);

m1 = [zeros(1,dm),m1];

m2 = [zeros(1,-dm),m2];

m3 = m1-m2; m3 = polyreduce(m3);

tmpH = Han(n+2,k-2,s); tmpH = polyreduce(tmpH);

[HH, r] = deconv(m3, tmpH);

HH = polyreduce(HH);

end

function p = polyreduce(p)

fi = find(p = 0);

if fi > 1

p(1:(fi-1)) = [];

end

Table A.5: This is the MATLAB code used to calculate the Hankel determinant orthe Riccati-Pade method.

Page 70: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Appendix A. MATLAB code 58

function y = fj(j,s)

% x^2

v = [1];

global f

y = [];

if isempty(f);

f = ;end

jmax = length(f)-1; % Highest value of j already calculated

if j > jmax || (j <= jmax && isempty(cell2mat(f(j+1))))

if j == 0

y = [1/(2*s+1) 0];

else

som = 0;

for k = 0:(j-1)

mult = conv(fj(k,s),fj(j-k-1,s));

dm = length(mult) - length(som);

som = [zeros(1,dm), som];

mult = [zeros(1,-dm), mult];

som = som + mult;

end

if j <= length(v)

som(end) = som(end) - v(j);

end

som = som./(2*j+2*s+1);

som = polyreduce(som);

y = som;

end

else

y = cell2mat(f(j+1));

end

if j>jmax || isempty(f(j+1))

f(j+1) = y;

end

Table A.6: fj is the MATLAB code used to determine the coefficients fj , (3.24), whichis the elements of the Hankel determinant calculated in Table A.5

Page 71: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Appendix B

Additional Tables and Figures

Figure B.1: A log graph for the comparison of the runtime of the HermiteEig andspectral collocation method.

59

Page 72: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Appendix B. Additional Tables and Figures 60

D Symbolic H2D Symbolic Hankel Numerical Hankel

1 0.3716 0.3500 0.05622 0.4622 0.4404 0.06883 0.6344 0.7654 0.07484 1.3596 8.5124 0.08445 5.2746 519.7243 0.11866 139.5598 - 0.2434

Table B.1: This table contains the data used to construct Figure 3.17. It shows thetime it takes to calculate H using three different techniques. The first 2 columns usedsymbolic calculations to determine H, while the last column used a numerical algorithm.While the first column calculated H using brute force, the other 2 made use of the Hankelrecursion formula (3.29). All the data was obtained by taking the average from 5 runs.

Page 73: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Bibliography

[1] C. M. Bender and S. Boettcher. Real Spectra in Non-Hermitian Hamil-tonians Having PT Symmetry. Physical Review Letters, 80:5243–5246,1998.

[2] C. M. Bender, D. C. Brody, and H. F. Jones. Must a Hamiltonian beHermitian? American Journal of Physics, 71(11):1095–1102, 2003.

[3] F. M. Fernandez, R. Guardiola, J. Ros, and M. Znojil. A family ofcomplex potentials with real spectrum. Journal of Physics A: Mathe-matical and General, 32(17):3105–3116, 1999.

[4] A. Mostafazadeh. Pseudo-Hermitian Description of PT-SymmetricSystems Defined on a Complex Contour. Journal of Physics A, 38:3213,2005.

[5] P. Dorey, A. Millican-Slater, and R. Tateo. Beyond the WKB approx-imation in PT-symmetric quantum mechanics. Journal of Physics A,38:1305, 2005.

[6] D. J. Griffiths. Introduction to Quantum Mechanics. Prentice Hall,2005. Second Edition.

[7] F. G. Scholtz, H. B. Geyer, and F. J. W. Hahne. Quasi-Hermitianoperators in quantum mechanics and the variational principle. Annalsof Physics, 213:74–101, 1991.

[8] A. Mostafazadeh. Is Pseudo-Hermitian Quantum Mechanics anIndefinite-Metric Quantum Theory? Czechoslovak Journal of Physics,53:1079, 2003.

[9] CS Jia, PY Lin, and LT Sun. A new η-pseudo-Hermitian complexpotential with PT-symmetry. Physics Letters A, 298:78–82, 2002.

[10] C. M. Bender, P. N. Meisinger, and Q. Wang. All Hermitian Hamilto-nians have parity. Journal of Physics A, 36(4):1029–1031, 2003.

61

Page 74: A numerical and analytical investigation into non ...metode. Die Riccati-Pad e metode is nie ’n numeriese metode nie, maar ’n analitiese metode wat numeries toegepas word. Aangesien

Bibliography 62

[11] M. Znojil. PT-symmetric quantum toboggans. Physics Letters A,342:36, 2008.

[12] M. Znojil. Identification of observables in quantum toboggans. Journalof Physics A, 41:1, 2008.

[13] C. M. Bender and S. A. Orszag. Advanced mathematical methods forscientists and engineers. I. Springer-Verlag, New York, 1999. Asymp-totic methods and perturbation theory, Reprint of the 1978 original.

[14] V. Ledoux. Study of Special Algorithms for solving Sturm-Liouvilleand Schrodinger Equations. PhD thesis, University Gent, 2007.

[15] J. A. C. Weideman. Spectral differentiation matrices for the numericalsolution of Schrodinger’s equation. Journal of Physics A, 39(32):10229–10237, 2006.

[16] J. A. C. Weideman and S. C. Reddy. A MATLAB DifferentiationMatrix Suite. ACM Transactions on Mathematical Software, 26:465–519, 2000.

[17] J. P. Boyd. Asymptotic coefficients of Hermite function series. Journalof Computational Physics, 54(3):382–410, 1984.

[18] D. Trif. Matlab package for the Schrodinger equation. Journal ofMathematical Chemistry, 43:1163–1176, 2008.

[19] F. M. Fernandez, Q. Ma, and R. H. Tipping. Eigenvalues of theSchrodinger equation via the Riccati-Pade method. Physics ReviewA, 40:6149–6153, 1989.

[20] P. Henrici. Applied and computational complex analysis. Wiley-Interscience [John Wiley & Sons], New York, 1974. Volume 1: Powerseries—integration—conformal mapping—location of zeros, Pure andApplied Mathematics.