Robert Stephen Jones
October, 2015
www.hbeLabs.com
rsjones7 at yahoo dot com
The following three files can be used to calculate the lowest Dirichlet eigenvalue of the Laplacian within the famous L-shape (two unit-edged squares joined to adjacent edges of a third) to 100 digits. The corresponding eigenfunction is used to create the familiar MathWorks logo (matlab).The Helmholtz equation is, $$ \Delta\Psi({\mathbf r})+\lambda\Psi({\mathbf r}) = 0 $$ and the boundary condition is $\Psi({\mathbf r})=0$ on the L-shape boundary.
This program is designed to convince the reader that this technique works.
- My computers are running Ubuntu linux, with pari/GP compiled with GMP and pthreads.
- The first few lines of program detM.gp is where you need to customize for your computer.
- In one terminal, run: "$ gp lsh.gp"
- In another terminal, run "$ tailf results.dat" to watch the output.
- There are comments in the routines.
lsh.gp
This is the main program:detM.gp
This is a program that is spawned to calculate the point-matching matrix and its determinant:library.gp
This is a small, custom library file with a few subroutines:results.dat
This is what my computer output when run. The 50-digit value was reported within 2 minutes while it took another half an hour to reach 100 digits. See below for the meaning of the numbers.
Notes
- Example line:
32 9.6397238440219410527094777 (-) LOWER BOUND (1.76 e-20) 19At N=32, the determinant root "9.639..." decreased "(-)" compared to the previous one. This entry is effectively a "LOWER BOUND". The relative error between the (previous) upper bound and this lower bound is $\epsilon=1.76\times 10^{-20}$. There are 19 matching digits in these upper and lower bounds, "9.639723844021941052" The N=32 means there are 16 matching points (Chebyshev-like, see subroutine initialize) along each of two edges of one of the three squares.- Observe that for N>64, the values actually alternate, each providing one side of the next bound. When equally-spaced matching points are used instead, it will begin alternating from the beginning, but the convergence rate is a bit slower. I have confirmed this alternation up to about N=800, for both types of matching point distributions, which gives about 300 (equal-space) and 400 (Chebyshev) eigenvalue digits .
- The calculation with N=192 is done simply to demonstrate that indeed the previous one is an upper bound.
- If you want more digits, and faster, calculate a few digits, figure out the convergence rate, and jump to a higher N-value, perhaps picking up fifty digits on each iteration (not one). Repeat until you get as many digits as your computer will permit.
- If you want this to work for you, make sure there is enough precision in the intermediate calculations to overcome the well-known "ill-conditioned" nature of this problem. The above program provides more than enough precision, and you can probably get by with a little less.
- When I invoke the GP calculator, this is displayed:
GP/PARI CALCULATOR Version 2.7.3 (released) amd64 running linux (x86-64/GMP-6.0.0 kernel) 64-bit version compiled: Mar 20 2015, gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) threading engine: pthread (readline v6.3 enabled, extended help enabled) Copyright (C) 2000-2015 The PARI Group PARI/GP is free software, covered by the GNU General Public License, and comes WITHOUT ANY WARRANTY WHATSOEVER. Type ? for help, \q to quit. Type ?12 for how to get moral (and possibly technical) support. parisize = 8000000, primelimit = 500000 ?
www.hbeLabs.com
rsjones7 at yahoo dot com