Holomorphic integration on the unit disk

In this example, we explore integration of a harmonic function:

\[ f(x,y) = \frac{x^2-y^2+1}{(x^2-y^2+1)^2+(2xy+1)^2},\]

over the unit disk. In this case, we know from complex analysis that the integral of a holomorphic function is equal to $\pi \times f(0,0)$. We analyze the function on an $N\times M$ tensor product grid defined by:

\[\begin{aligned} r_n & = \cos\left[(n+\tfrac{1}{2})\pi/2N\right],\quad{\rm for}\quad 0\le n < N,\quad{\rm and}\\ \theta_m & = 2\pi m/M,\quad{\rm for}\quad 0\le m < M; \end{aligned}\]

we convert the function samples to Chebyshev×Fourier coefficients using plan_disk_analysis; and finally, we transform the Chebyshev×Fourier coefficients to Zernike polynomial coefficients using plan_disk2cxf.

For the storage pattern of the arrays, please consult the documentation.

using FastTransforms, LinearAlgebra, Plots
const GENFIGS = joinpath(dirname(dirname(pathof(FastTransforms))), "docs/src/generated")
!isdir(GENFIGS) && mkdir(GENFIGS)
plotlyjs()
Plots.PlotlyJSBackend()

Our function $f$ on the disk:

f = (x,y) -> (x^2-y^2+1)/((x^2-y^2+1)^2+(2x*y+1)^2)
#1 (generic function with 1 method)

The Zernike polynomial degree:

N = 15
M = 4N-3
57

The radial grid:

r = [sinpi((N-n-0.5)/(2N)) for n in 0:N-1]
15-element Vector{Float64}:
 0.9986295347545738
 0.9876883405951378
 0.9659258262890683
 0.9335804264972017
 0.8910065241883678
 0.838670567945424
 0.7771459614569709
 0.7071067811865476
 0.6293203910498375
 0.5446390350150271
 0.45399049973954675
 0.35836794954530027
 0.25881904510252074
 0.15643446504023087
 0.052335956242943835

The angular grid (mod $\pi$):

θ = (0:M-1)*2/M
0.0:0.03508771929824561:1.9649122807017543

On the mapped tensor product grid, our function samples are:

F = [f(r*cospi(θ), r*sinpi(θ)) for r in r, θ in θ]
15×57 Matrix{Float64}:
 0.400329  0.36696   0.336645  0.308443  0.281619  0.25557   0.22977   0.203733  0.176996  0.149111  0.119689  0.0885456  0.0561428  0.0249494  0.00382185  0.0233794  0.192001  0.82415   1.84146   1.85719   1.41721   1.08969   0.879424  0.739148  0.639757  0.565314  0.506844  0.459027  0.418538  0.383193  0.351486  0.32233   0.294899  0.268532  0.24267   0.216811  0.190481  0.163223  0.134611  0.104328  0.0724218  0.0400826  0.0120549  0.00476215  0.075801  0.422295  1.37342   1.98551   1.63411   1.23553   0.973247  0.802761  0.685557  0.600091  0.534475  0.481845  0.438023
 0.402946  0.369531  0.339215  0.31106   0.284337  0.258454  0.232899  0.207211  0.180965  0.153777  0.125364  0.0957188  0.0656309  0.0381784  0.0233592   0.0535023  0.23469   0.838287  1.74173   1.78814   1.39763   1.08662   0.881061  0.742049  0.642889  0.56837   0.509752  0.461793  0.421195  0.385781  0.35405   0.324917  0.297559  0.271324  0.245665  0.220098  0.194183  0.16751   0.139734  0.110675  0.0806214  0.0512076  0.0280171  0.0289628   0.112787  0.46247   1.32844   1.88443   1.59532   1.22668   0.973254  0.805245  0.688639  0.603204  0.53746   0.48468   0.44073
 0.408107  0.374635  0.344345  0.316308  0.289809  0.264275  0.239228  0.214259  0.189018  0.16325   0.136874  0.110236   0.0847405  0.0645701  0.0616188   0.110283   0.308499  0.852043  1.57431   1.65952   1.35481   1.07725   0.882418  0.74674   0.648492  0.574076  0.515313  0.467166  0.426411  0.390904  0.359157  0.330094  0.302904  0.276953  0.251718  0.226757  0.201691  0.176211  0.150131  0.123537  0.0971828  0.0735249  0.059617   0.0756242   0.180187  0.525812  1.24639   1.70902   1.5172    1.20513   0.970751  0.808756  0.693948  0.608911  0.543108  0.490146  0.446017
 0.415648  0.382189  0.352011  0.324209  0.298096  0.273134  0.248897  0.225051  0.201367  0.177773  0.154485  0.132336   0.113545   0.103633   0.116351    0.186253   0.393918  0.849832  1.38148   1.49082   1.28527   1.05638   0.879972  0.751049  0.655222  0.581588  0.52299   0.474802  0.433974  0.398441  0.366752  0.33786   0.310977  0.2855    0.260948  0.236942  0.213198  0.189555  0.166059  0.143176  0.122289   0.106906   0.105724   0.140558    0.26534   0.588182  1.1413    1.4992    1.40336   1.16548   0.961348  0.810521  0.699782  0.616152  0.550745  0.497814  0.453615
 0.425289  0.392035  0.362148  0.334773  0.309271  0.285158  0.262081  0.239809  0.218269  0.197619  0.178435  0.162105   0.151689   0.153844   0.183081    0.270225   0.470832  0.826183  1.19548   1.30726   1.19053   1.01926   0.869418  0.751971  0.661094  0.589601  0.531924  0.48414   0.443527  0.408177  0.376729  0.348191  0.321822  0.297066  0.273507  0.250853  0.228945  0.20781   0.187783  0.169776  0.15586    0.150546   0.163666   0.216532    0.352149  0.631169  1.0287    1.29056   1.26502   1.10458   0.940232  0.806897  0.703689  0.623316  0.559314  0.506989  0.463072
 0.436597  0.403911  0.374626  0.347975  0.323392  0.300472  0.278957  0.258746  0.239942  0.222959  0.208736  0.199165   0.19792    0.212076   0.254963    0.349717   0.526163  0.785631  1.03278   1.13127   1.07899   0.964458  0.847102  0.746235  0.663661  0.596384  0.540917  0.494365  0.454527  0.419771  0.388896  0.361011  0.335454  0.311744  0.289549  0.268688  0.249152  0.23118   0.215414  0.203195  0.197165   0.20243    0.228745   0.293986    0.426183  0.648643  0.920719  1.10477   1.11859   1.02459   0.904279  0.794291  0.702811  0.628337  0.567372  0.51668   0.47372
 0.448951  0.417414  0.389209  0.363706  0.340449  0.319139  0.299632  0.28197   0.266434  0.253672  0.244908  0.242329   0.249735   0.273549   0.32399     0.414856   0.556748  0.73654   0.898135  0.976631  0.96284   0.895308  0.811683  0.731268  0.660475  0.599969  0.54849   0.504405  0.466222  0.432719  0.402938  0.376152  0.351819  0.329563  0.309162  0.29056   0.273906  0.259647  0.248682  0.242655  0.244458   0.259053   0.294635   0.36347     0.47935   0.644419  0.824368  0.950029  0.979333  0.933025  0.853895  0.770471  0.694553  0.628995  0.573203  0.525623  0.484659
 0.461538  0.431966  0.405508  0.381723  0.360304  0.341079  0.324035  0.309345  0.297441  0.289121  0.285721  0.289387   0.303423   0.332641   0.383252    0.461146   0.566675  0.686278  0.79016   0.848441  0.853234  0.818825  0.765072  0.706268  0.649804  0.598546  0.553073  0.513009  0.477665  0.446331  0.418379  0.393304  0.370732  0.350422  0.332279  0.316375  0.303005  0.292765  0.286694  0.286496  0.294846   0.315771   0.354858   0.418544    0.510882  0.626287  0.742362  0.826153  0.856971  0.839629  0.793294  0.735701  0.677489  0.623454  0.575098  0.532405  0.494793
 0.473406  0.446815  0.422943  0.401579  0.382592  0.365953  0.35177   0.340321  0.332115  0.327962  0.329086  0.337225   0.354715   0.384367   0.428886    0.489368   0.562769  0.639621  0.705232  0.746138  0.75726   0.742897  0.711918  0.672777  0.631361  0.591026  0.553364  0.51894   0.487799  0.459755  0.434554  0.411958  0.391793  0.373976  0.358542  0.345678  0.33577   0.329466  0.327769  0.332147  0.344633   0.367837   0.404636   0.457191    0.524883  0.601613  0.674803  0.729338  0.755332  0.752747  0.728907  0.692933  0.652092  0.610928  0.571808  0.535736  0.502968
 0.483592  0.461074  0.44072   0.422552  0.406616  0.393018  0.381958  0.373761  0.368913  0.368096  0.372211  0.382374   0.399829   0.425704   0.460521    0.503436   0.551426  0.599039  0.639428  0.66664   0.677821  0.673802  0.657934  0.634338  0.606657  0.577562  0.548776  0.521299  0.49565   0.472064  0.450625  0.431361  0.4143    0.399515  0.387153  0.377475  0.370881  0.36795   0.369472  0.37646   0.390112   0.411659   0.442005   0.481097    0.527085  0.575698  0.62056   0.654949  0.674261  0.67754   0.667091  0.646854  0.620817  0.592158  0.563054  0.534833  0.508227
 0.491347  0.47384   0.457857  0.443596  0.43124   0.420991  0.413088  0.407835  0.405607  0.406854  0.41208   0.421791   0.436393   0.456016   0.480289    0.508089   0.537411  0.565495  0.589313  0.606297  0.614986  0.615273  0.608182  0.595383  0.578689  0.55973   0.539808  0.519875  0.500596  0.482417  0.465645  0.450499  0.437168  0.425839  0.416729  0.410109  0.406316  0.405766  0.408937  0.416345  0.428463   0.445585   0.467622   0.493853    0.522719  0.551798  0.578117  0.598782  0.611716  0.616137  0.612554  0.602381  0.587414  0.569403  0.549822  0.529795  0.510121
 0.496372  0.484362  0.473263  0.463344  0.454844  0.447987  0.442992  0.440085  0.43949   0.441422  0.446059  0.453506   0.463734   0.476516   0.491364    0.507491   0.523832  0.539138  0.552155  0.561824  0.567461  0.568845  0.566188  0.560036  0.551118  0.54022   0.528088  0.515374  0.502621  0.490272  0.478681  0.468141  0.458903  0.451197  0.445243  0.441264  0.439485  0.440128  0.443394  0.44943   0.458281   0.469829   0.483724   0.499329    0.51571   0.531695  0.546006  0.557461  0.565171  0.568681  0.567994  0.563506  0.555873  0.545868  0.534265  0.521767  0.508973
 0.498951  0.492196  0.485875  0.480211  0.475399  0.471612  0.469002  0.467693  0.467782  0.469331  0.472348  0.476782   0.482503   0.489293   0.496841    0.504746   0.512549  0.519761  0.525915  0.530618  0.533588  0.534687  0.533917  0.531408  0.527389  0.522155  0.516029  0.509344  0.502414  0.495534  0.488967  0.482948  0.477687  0.473367  0.470152  0.468178  0.467558  0.468372  0.470657  0.474394  0.479493   0.485782   0.492995   0.500776    0.508691  0.516259  0.522997  0.528468  0.532332  0.534375  0.53453   0.532867  0.52957   0.524904  0.519183  0.512736  0.505891
 0.499854  0.497256  0.494799  0.492592  0.490727  0.489288  0.488339  0.487926  0.488075  0.488789  0.490046  0.491797   0.493969   0.496462   0.499157    0.501918   0.5046    0.507061  0.509167  0.510805  0.511889  0.512367  0.512222  0.51147   0.510163  0.508376  0.506206  0.503765  0.501171  0.498544  0.496003  0.493658  0.491611  0.48995   0.488749  0.488063  0.48793   0.488363  0.489352  0.490864  0.492836   0.495182   0.497793   0.500538    0.503278  0.505867  0.508166  0.51005   0.51142   0.512206  0.512372  0.511919  0.510882  0.509324  0.507332  0.505012  0.502479
 0.499998  0.4997    0.499416  0.49916   0.498945  0.498781  0.498675  0.498633  0.498657  0.498746  0.498895  0.499098   0.499346   0.499625   0.499922    0.500224   0.500515  0.500781  0.50101   0.501189  0.50131   0.501367  0.501358  0.501283  0.501146  0.500953  0.500715  0.500442  0.500148  0.499848  0.499555  0.499284  0.499047  0.498856  0.49872   0.498646  0.498637  0.498693  0.498813  0.498991  0.499217   0.499482   0.499772   0.500074    0.500372  0.500652  0.500901  0.501106  0.501257  0.501347  0.501371  0.501328  0.501222  0.501056  0.500839  0.500582  0.500297

We superpose a surface plot of $f$ on top of the grid:

X = [r*cospi(θ) for r in r, θ in θ]
Y = [r*sinpi(θ) for r in r, θ in θ]
scatter3d(vec(X), vec(Y), vec(0F); markersize=0.75, markercolor=:red)
surface!(X, Y, F; legend=false, xlabel="x", ylabel="y", zlabel="f")
savefig(joinpath(GENFIGS, "zernike.html"))

We precompute a (generalized) Zernike–Chebyshev×Fourier plan:

α, β = 0, 0
P = plan_disk2cxf(F, α, β)
FastTransforms Zernike--Chebyshev×Fourier plan for 15×57-element array of Float64

And an FFTW Chebyshev×Fourier analysis plan on the disk:

PA = plan_disk_analysis(F)
FastTransforms plan for FFTW Chebyshev×Fourier analysis on the disk for 15×57-element array of Float64

Its Zernike coefficients are:

U = P\(PA*F)
15×57 Matrix{Float64}:
  0.886227     3.60709e-6  -1.8336e-6   -0.361801     3.60559e-11  -1.17688e-6   6.36308e-6   0.140125     -0.140125     -6.35177e-6   -7.70959e-6  1.89039e-10  0.118427     1.54098e-5  7.4099e-7    -0.0522214    -0.0522214    -1.71856e-5  1.64002e-5   0.0472361    -5.20197e-10  4.08953e-7   -3.63399e-5  -0.0217254    0.0217254    3.88099e-5   3.92308e-5  -1.24018e-9   -0.0202253    -8.31939e-5  -2.14893e-7   0.00949917    0.00949917   8.82306e-5   -8.80125e-5   -0.00898531   2.80468e-9   -1.10226e-7   0.000185657   0.00427337   -0.00427337   -0.000194497  -0.000194608  6.17793e-9   0.00408335   0.000408908  5.67524e-8   -0.00195832   -0.0019583    -0.000424611   0.000424554  0.00188439   -1.33894e-8   2.84106e-8   -0.000879176  -0.00090912   0.000909147
  3.08825e-17  4.60728e-6  -2.33805e-6  -4.33e-11     4.33e-11     -1.22625e-6   6.53675e-6   2.32389e-17  -1.46429e-10  -5.65109e-6   -6.90982e-6  1.84987e-10  1.84987e-10  1.21904e-5  6.29629e-7   -4.19031e-10  -7.40235e-18  -1.21069e-5  1.14861e-5   4.50193e-10  -4.50193e-10  3.03358e-7   -2.25713e-5   1.03374e-17  9.39347e-10  2.10848e-5   2.13797e-5  -9.62216e-10  -9.62216e-10  -3.90991e-5  -1.42777e-7   1.94644e-9    2.78313e-17  3.51181e-5   -3.49801e-5   -1.94972e-9   1.94972e-9   -6.65696e-8   6.06806e-5    1.30857e-17  -3.87473e-9   -5.0328e-5    -5.03922e-5   3.82278e-9   3.82278e-9   6.25834e-5   2.92247e-8   -7.49277e-9    1.41612e-18  -3.60921e-5    3.60641e-5   7.2952e-9    -7.2952e-9    1.29538e-8   -1.4793e-5     2.5987e-17   1.36316e-8
  3.54191e-17  4.76065e-6  -2.40899e-6  -4.59639e-11  4.59638e-11  -1.12866e-6   5.89804e-6   9.13486e-18  -1.43511e-10  -4.51295e-6   -5.57325e-6  1.70088e-10  1.70088e-10  8.73447e-6  4.92668e-7   -3.63967e-10  -2.11966e-17  -7.74165e-6  7.28634e-6   3.70513e-10  -3.70513e-10  2.09854e-7   -1.26794e-5  -9.85784e-18  7.33255e-10  1.02945e-5   1.04878e-5  -7.12279e-10  -7.12279e-10  -1.63841e-5  -8.90173e-8   1.36506e-9   -1.82525e-17  1.23112e-5   -1.22292e-5   -1.29344e-9   1.29344e-9   -3.59114e-8   1.66687e-5   -9.44934e-18  -2.42653e-9   -1.06763e-5   -1.07096e-5   2.25423e-9   2.25423e-9   1.08765e-5   1.49017e-8   -4.14789e-9    7.12137e-18  -5.12018e-6    5.10718e-6   3.57033e-9   -3.57033e-9   6.59956e-9   -6.78236e-6    8.38478e-18  7.03625e-9
  3.7535e-19   4.3306e-6   -2.18254e-6  -4.50915e-11  4.50915e-11  -9.41975e-7   4.79767e-6   2.14318e-17  -1.3221e-10   -3.27045e-6   -4.09126e-6  1.48194e-10  1.48194e-10  5.69834e-6  3.57019e-7   -3.00851e-10   4.15138e-18  -4.50516e-6  4.19432e-6   2.90868e-10  -2.90868e-10  1.35612e-7   -6.44339e-6   6.70132e-18  5.46652e-10  4.50749e-6   4.62617e-6  -5.03847e-10  -5.03847e-10  -6.09951e-6  -5.21037e-8   9.1491e-10    2.10865e-18  3.60434e-6   -3.56197e-6   -8.19854e-10  8.19854e-10  -2.1255e-8    5.41984e-6    2.10797e-17  -1.45125e-9   -3.25121e-6   -3.27101e-6   1.26862e-9   1.26862e-9   3.36954e-6   8.03621e-9   -2.01666e-9    5.286e-18    -2.40565e-6    2.3974e-6    1.96336e-9   -1.96336e-9   4.2266e-9    -3.19821e-6    9.84205e-18  3.81545e-9
 -1.18289e-17  3.55971e-6  -1.7846e-6   -4.1593e-11   4.1593e-11   -7.20914e-7   3.55774e-6  -4.16671e-18  -1.15465e-10  -2.16169e-6   -2.74892e-6  1.22948e-10  1.22948e-10  3.3937e-6   2.40326e-7   -2.37394e-10   8.29477e-18  -2.38904e-6  2.19119e-6   2.18301e-10  -2.18301e-10  8.19355e-8   -2.95988e-6  -1.43524e-18  3.89943e-10  1.76401e-6   1.8323e-6   -3.41184e-10  -3.41184e-10  -2.0084e-6   -2.86395e-8   5.87175e-10  -3.43525e-18  1.50453e-6   -1.47577e-6   -4.97705e-10  4.97705e-10  -1.37179e-8   1.8912e-6    -1.91606e-17  -8.31421e-10  -9.02447e-7   -9.13685e-7   6.11155e-10  6.11155e-10  1.24567e-6   5.84289e-9   -1.17835e-9    6.31781e-18  -7.91274e-7    7.85214e-7   1.1332e-9    -1.1332e-9    3.13533e-9   -8.88709e-7    4.13504e-18  2.17398e-9
  2.9532e-17   2.67365e-6  -1.33163e-6  -3.63778e-11  3.63778e-11  -5.08751e-7   2.4183e-6   -1.57391e-17  -9.60672e-11  -1.3062e-6    -1.69561e-6  9.74399e-11  9.74399e-11  1.84711e-6  1.50509e-7   -1.79257e-10   8.4605e-19   -1.15523e-6  1.03773e-6   1.56975e-10  -1.56975e-10  4.63055e-8   -1.22747e-6  -7.83688e-19  2.66772e-10  6.14181e-7   6.51026e-7  -2.21796e-10  -2.21796e-10  -5.31978e-7  -1.2848e-8    3.62177e-10   3.89713e-18  2.79382e-7   -2.67505e-7   -2.90765e-10  2.90765e-10  -4.46926e-9   1.22058e-7    1.10403e-18  -3.9572e-10   -4.93806e-8   -5.41339e-8   3.78556e-10  3.78556e-10  1.04652e-8   2.51749e-9   -7.22143e-10  -2.08988e-18   3.95528e-8   -4.22095e-8   6.86748e-10  -6.86748e-10  1.39709e-9    1.16951e-7    5.29828e-18  1.30213e-9
  4.8454e-18   1.84493e-6  -9.11632e-7  -3.03234e-11  3.03234e-11  -3.31998e-7   1.51086e-6   9.89436e-18  -7.63919e-11  -7.22019e-7   -9.61716e-7  7.39635e-11  7.39635e-11  9.19025e-7  8.7759e-8    -1.29855e-10  -1.00058e-17  -5.0973e-7   4.44593e-7   1.08464e-10  -1.08464e-10  2.44943e-8   -4.5896e-7   -7.2392e-18   1.75682e-10  1.67445e-7   1.83156e-7  -1.3908e-10   -1.3908e-10   -2.49357e-7  -8.43149e-9   2.15876e-10  -9.37115e-18  1.45629e-7   -1.38279e-7   -1.35983e-10  1.35983e-10  -3.93277e-9   1.98023e-7   -3.52213e-18  -2.58784e-10  -1.28932e-7   -1.33122e-7   2.45364e-10  2.45364e-10  1.62088e-7   2.22418e-9   -4.63692e-10   6.4268e-18   -9.30524e-8    9.07e-8      4.36633e-10  -4.36633e-10  1.23998e-9   -9.28229e-8    2.04425e-18  8.19335e-10
 -2.37746e-17  1.17276e-6  -5.74087e-7  -2.41606e-11  2.41606e-11  -2.00616e-7   8.68671e-7  -2.34378e-18  -5.82253e-11  -3.64941e-7   -5.01985e-7  5.39205e-11  5.39205e-11  4.17975e-7  4.76625e-8   -9.05511e-11  -4.9981e-18   -2.05562e-7  1.71822e-7   7.23176e-11  -7.23176e-11  1.21586e-8   -1.5476e-7    2.1564e-18   1.11916e-10  1.00254e-7   1.13042e-7  -8.43279e-11  -8.43279e-11  -1.26572e-7  -6.03215e-9   9.8079e-11   -4.78697e-18  9.12736e-8   -8.47111e-8   -9.30964e-11  9.30964e-11  -3.55089e-9   1.16626e-7   -2.13593e-18  -1.75944e-10  -7.07415e-8   -7.45658e-8   1.65598e-10  1.65598e-10  8.35001e-8   2.05022e-9   -3.10521e-10  -2.33625e-18  -4.41693e-8    4.19799e-8   2.90001e-10  -2.90001e-10  1.16461e-9   -3.82528e-8   -3.59072e-18  5.39466e-10
  8.95539e-18  6.87558e-7  -3.32907e-7  -1.84685e-11  1.84685e-11  -1.12306e-7   4.59773e-7  -2.45944e-18  -4.265e-11    -1.68481e-7   -2.41286e-7  3.78985e-11  3.78985e-11  1.73828e-7  2.4139e-8    -6.10346e-11  -1.33435e-18  -7.61356e-8  5.9745e-8    4.66938e-11  -4.66938e-11  4.41186e-9   -3.87809e-8  -2.60979e-18  6.84382e-11  1.14459e-8   1.47138e-8  -3.64534e-11  -3.64534e-11  -1.62599e-8  -1.83462e-9   6.92775e-11  -5.75061e-18  1.03654e-8   -8.32127e-9   -6.54378e-11  6.54378e-11  -1.1309e-9    9.55527e-9    2.81389e-19  -1.23027e-10  -3.39687e-9   -4.64027e-9   1.15147e-10  1.15147e-10  2.15829e-9   6.79586e-10  -2.1464e-10    7.02352e-18  -6.95367e-11  -6.69391e-10  1.99193e-10  -1.99193e-10  3.99766e-10   1.65892e-9    1.86274e-18  3.68061e-10
  2.15782e-17  3.71865e-7  -1.77783e-7  -1.35612e-11  1.35612e-11  -5.82608e-8   2.24022e-7   3.28001e-18  -3.01692e-11  -7.09608e-8   -1.06944e-7  2.57607e-11  2.57607e-11  6.63405e-8  1.14574e-8   -3.98083e-11   1.83302e-17  -2.03783e-8  1.47516e-8   2.83655e-11  -2.83655e-11  2.85088e-9   -2.16267e-8   1.26921e-18  2.72302e-11  1.31843e-8   1.64107e-8  -2.60181e-11  -2.60181e-11  -1.9507e-8   -1.81086e-9   4.92954e-11   1.49096e-17  1.32551e-8   -1.12373e-8   -4.64096e-11  4.64096e-11  -1.11665e-9   1.44395e-8    1.0689e-17   -8.69428e-11  -7.23389e-9   -8.4622e-9    8.10649e-11  8.10649e-11  7.66845e-9   6.71752e-10  -1.50494e-10   5.15274e-18  -3.61423e-9    2.8833e-9    1.39056e-10  -1.39056e-10  3.95754e-10  -2.26921e-9    5.97653e-18  2.55748e-10
 -1.47947e-17  1.85546e-7  -8.74169e-8  -9.64281e-12  9.6428e-12   -2.80375e-8   1.00537e-7  -3.50057e-19  -2.06073e-11  -2.73295e-8   -4.39821e-8  1.69233e-11  1.69233e-11  2.34206e-8  5.10163e-9   -2.35204e-11   6.51352e-18  -1.75358e-8  1.21275e-8   9.88461e-12  -9.88462e-12  3.12081e-9   -2.04164e-8   4.02324e-18  1.91141e-11  1.1854e-8    1.5421e-8   -1.82332e-11  -1.82332e-11  -1.75172e-8  -2.02073e-9   3.44828e-11   7.32325e-18  1.1833e-8    -9.56169e-9   -3.24e-11     3.24e-11     -1.26719e-9   1.22528e-8   -6.11335e-18  -6.05679e-11  -5.76301e-9   -7.16757e-9   5.63435e-11  5.63436e-11  6.1405e-9    7.73658e-10  -1.04342e-10  -2.5289e-18   -2.96846e-9    2.12097e-9   9.6157e-11   -9.6157e-11   4.61769e-10  -1.77725e-9    7.37827e-18  1.76348e-10
 -3.12442e-17  8.54426e-8  -3.95787e-8  -6.58743e-12  6.58744e-12  -1.26163e-8   4.18408e-8  -1.83441e-17  -1.3631e-11   -9.62687e-9   -1.67874e-8  9.48623e-12  9.48623e-12  4.72571e-9  1.23574e-9   -6.65263e-12  -3.83785e-18  -3.91558e-9  2.44388e-9   6.57828e-12  -6.57828e-12  8.65402e-10  -4.14906e-9   2.7287e-18   1.2711e-11   2.09945e-9   3.10576e-9  -1.21149e-11  -1.21149e-11  -3.10737e-9  -5.79121e-10  2.28905e-11   6.37678e-18  2.07394e-9   -1.41354e-9   -2.1486e-11   2.1486e-11   -3.73369e-10  1.81245e-9   -1.03001e-17  -4.01214e-11  -6.48005e-10  -1.06694e-9   3.72789e-11  3.72789e-11  7.26798e-10  2.33379e-10  -6.89482e-11   4.66593e-18  -4.05112e-10   1.46777e-10  6.34527e-11  -6.34527e-11  1.42127e-10  -1.99851e-10   7.62512e-18  1.16198e-10
  1.33271e-17  3.66259e-8  -1.66324e-8  -4.39971e-12  4.39972e-12  -5.20978e-9   1.59586e-8  -9.84893e-18  -7.0843e-12   -1.58674e-9   -2.96274e-9  1.91297e-12  1.91297e-12  3.12298e-9  8.33281e-10  -3.95183e-12  -6.31239e-18  -2.58884e-9  1.5939e-9    3.90661e-12  -3.90663e-12  5.8643e-10   -2.71374e-9   3.31823e-18  7.54633e-12  1.34984e-9   2.03322e-9  -7.18992e-12  -7.18992e-12  -2.00561e-9  -3.94051e-10  1.35798e-11  -3.98704e-18  1.34233e-9   -8.92165e-10  -1.27412e-11  1.27412e-11  -2.54934e-10  1.15296e-9   -7.65968e-18  -2.37812e-11  -3.99094e-10  -6.85581e-10  2.20855e-11  2.20855e-11  4.59097e-10  1.5982e-10   -4.0826e-11   -2.73685e-18  -2.64588e-10   8.74454e-11  3.75507e-11  -3.75507e-11  9.75761e-11  -1.31247e-10  -3.71219e-18  6.87229e-11
 -1.29499e-17  1.42637e-8  -6.34424e-9  -2.10395e-12  2.10396e-12  -6.84193e-10  1.98342e-9   1.5249e-18   -7.77242e-13  -9.64872e-10  -1.8079e-9   8.82102e-13  8.82104e-13  1.90051e-9  5.11075e-10  -1.82214e-12   9.26204e-18  -1.57577e-9  9.64939e-10  1.80117e-12  -1.80117e-12  3.60351e-10  -1.64478e-9   5.54127e-18  3.47897e-12  8.12528e-10  1.2328e-9   -3.31434e-12  -3.31434e-12  -1.2092e-9   -2.42517e-10  6.2592e-12   -3.22824e-18  8.10242e-10  -5.33001e-10  -5.872e-12    5.872e-12    -1.57104e-10  6.91093e-10  -6.13378e-18  -1.09586e-11  -2.3601e-10   -4.12661e-10  1.01758e-11  1.01758e-11  2.74436e-10  9.85995e-11  -1.88077e-11  -5.52395e-18  -1.60322e-10   5.09818e-11  1.7296e-11   -1.7296e-11   6.02559e-11  -7.9705e-11    4.13813e-19  3.16487e-11
 -2.57377e-17  3.5367e-9   -1.55057e-9  -5.05729e-14  5.05682e-14  -1.24617e-9   3.61129e-9  -2.73459e-18  -1.49119e-13  -1.75608e-9   -3.29176e-9  1.69228e-13  1.6923e-13   3.45928e-9  9.31108e-10  -3.49575e-13  -1.75255e-18  -2.86824e-9  1.75527e-9   3.45548e-13  -3.4555e-13   6.56655e-10  -2.99235e-9  -1.63745e-18  6.67424e-13  1.47702e-9   2.24293e-9  -6.35833e-13  -6.35832e-13  -2.1985e-9   -4.42011e-10  1.20077e-12   2.06007e-18  1.47335e-9   -9.68009e-10  -1.12648e-12  1.12649e-12  -2.86382e-10  1.25563e-9    2.55539e-19  -2.10227e-12  -4.28097e-10  -7.50132e-10  1.95208e-12  1.95208e-12  4.98453e-10  1.79759e-10  -3.60793e-12   1.55337e-18  -2.91666e-10   9.23134e-11  3.31791e-12  -3.31791e-12  1.09866e-10  -1.45042e-10  -9.98777e-19  6.07111e-12

The Zernike coefficients are useful for integration. The integral of $f(x,y)$ over the disk should be $\pi/2$ by harmonicity. The coefficient of $Z_{0,0}$ multiplied by √π is:

U[1, 1]*sqrt(π)
1.5707963267948968

Using an orthonormal basis, the integral of $[f(x,y)]^2$ over the disk is approximately the square of the 2-norm of the coefficients:

norm(U)^2, π/(2*sqrt(2))*log1p(sqrt(2))
(0.9789599193439185, 0.9789599179781414)

But there's more! Next, we repeat the experiment using the Dunkl-Xu orthonormal polynomials supported on the rectangularized disk.

N = 2N
M = N
30

We analyze the function on an $N\times M$ mapped tensor product $xy$-grid defined by:

\[\begin{aligned} x_n & = \cos\left(\frac{2n+1}{2N}\pi\right) = \sin\left(\frac{N-2n-1}{2N}\pi\right),\quad {\rm for} \quad 0 \le n < N,\quad{\rm and}\\ z_m & = \cos\left(\frac{2m+1}{2M}\pi\right) = \sin\left(\frac{M-2m-1}{2M}\pi\right),\quad {\rm for} \quad 0 \le m < M,\\ y_{n,m} & = \sqrt{1-x_n^2}z_m. \end{aligned}\]

Slightly more accuracy can be expected by using an auxiliary array:

\[ w_n = \sin\left(\frac{2n+1}{2N}\pi\right),\quad {\rm for} \quad 0 \le n < N,\]

so that $y_{n,m} = w_nz_m$.

The x grid

w = [sinpi((n+0.5)/N) for n in 0:N-1]
x = [sinpi((N-2n-1)/(2N)) for n in 0:N-1]
30-element Vector{Float64}:
  0.9986295347545738
  0.9876883405951378
  0.9659258262890683
  0.9335804264972017
  0.8910065241883678
  0.838670567945424
  0.7771459614569709
  0.7071067811865476
  0.6293203910498375
  0.5446390350150271
  0.45399049973954675
  0.35836794954530027
  0.25881904510252074
  0.15643446504023087
  0.052335956242943835
 -0.052335956242943835
 -0.15643446504023087
 -0.25881904510252074
 -0.35836794954530027
 -0.45399049973954675
 -0.5446390350150271
 -0.6293203910498375
 -0.7071067811865476
 -0.7771459614569709
 -0.838670567945424
 -0.8910065241883678
 -0.9335804264972017
 -0.9659258262890683
 -0.9876883405951378
 -0.9986295347545738

The z grid

z = [sinpi((M-2m-1)/(2M)) for m in 0:M-1]
30-element Vector{Float64}:
  0.9986295347545738
  0.9876883405951378
  0.9659258262890683
  0.9335804264972017
  0.8910065241883678
  0.838670567945424
  0.7771459614569709
  0.7071067811865476
  0.6293203910498375
  0.5446390350150271
  0.45399049973954675
  0.35836794954530027
  0.25881904510252074
  0.15643446504023087
  0.052335956242943835
 -0.052335956242943835
 -0.15643446504023087
 -0.25881904510252074
 -0.35836794954530027
 -0.45399049973954675
 -0.5446390350150271
 -0.6293203910498375
 -0.7071067811865476
 -0.7771459614569709
 -0.838670567945424
 -0.8910065241883678
 -0.9335804264972017
 -0.9659258262890683
 -0.9876883405951378
 -0.9986295347545738

On the mapped tensor product grid, our function samples are:

F = [f(x[n], w[n]*z) for n in 1:N, z in z]
30×30 Matrix{Float64}:
 0.383725    0.383905   0.384264   0.384798  0.3855    0.386365  0.387383  0.388542  0.389832  0.391237  0.392744  0.394337  0.395997  0.397708  0.399451  0.401207  0.402957  0.404681  0.406361  0.407977  0.409512  0.410949  0.41227   0.413462  0.41451   0.415403  0.41613   0.416683   0.417055   0.417242
 0.353509    0.354039   0.355094   0.356664  0.358732  0.36128   0.364281  0.367707  0.371524  0.375695  0.380177  0.384927  0.389897  0.395036  0.400292  0.405609  0.41093   0.416197  0.421352  0.426336  0.431089  0.435556  0.439683  0.443417  0.446713  0.449527  0.451824  0.453573   0.454752   0.455346
 0.325652    0.32653    0.328275   0.330873  0.334296  0.338513  0.343483  0.349158  0.355488  0.362412  0.36987   0.377792  0.386108  0.394741  0.40361   0.412629  0.421708  0.43075   0.439655  0.44832   0.456637  0.464501  0.471805  0.478449  0.484336  0.489382  0.493512  0.496665   0.498793   0.499866
 0.29943     0.300665   0.303122   0.306774  0.311585  0.317506  0.324478  0.332436  0.341308  0.351018  0.361484  0.372625  0.384354  0.396582  0.409213  0.422145  0.435264  0.448446  0.461551  0.474426  0.486904  0.498809  0.50996   0.520175  0.529284  0.537127  0.54357   0.548501   0.551834   0.553515
 0.274261    0.275876   0.279088   0.283858  0.290132  0.297838  0.306895  0.317212  0.328692  0.341239  0.354758  0.36916   0.384358  0.400269  0.416811  0.43389   0.451401  0.469213  0.487163  0.505054  0.522647  0.539669  0.555819  0.570781  0.584246  0.595923  0.605564  0.612965   0.617979   0.620509
 0.249651    0.251685   0.255724   0.261714  0.269574  0.279203  0.290482  0.303282  0.31747   0.332923  0.349529  0.367198  0.385862  0.405474  0.426001  0.44741   0.469656  0.492656  0.516277  0.540305  0.564443  0.588294  0.611378  0.633149  0.653036  0.670489  0.685018  0.696234   0.703855   0.707707
 0.225163    0.227669   0.232643   0.240006  0.249642  0.261402  0.275112  0.290582  0.307622  0.326061  0.345762  0.366637  0.388654  0.411835  0.43625   0.461998  0.489179  0.517862  0.548041  0.579594  0.612236  0.645481  0.678629  0.710777  0.740882  0.76785   0.790662  0.808467   0.820649   0.826828
 0.200384    0.203443   0.209507   0.218467  0.230156  0.244357  0.260808  0.279223  0.299317  0.32084   0.343606  0.367524  0.392611  0.418996  0.446912  0.47667   0.508629  0.543152  0.580544  0.620979  0.664413  0.710473  0.758363  0.806792  0.853985  0.897808  0.936015  0.966541   0.987766   0.99863
 0.174918    0.178645   0.186025   0.196908  0.211057  0.228154  0.247802  0.269562  0.292995  0.317717  0.343461  0.370116  0.397762  0.426667  0.457278  0.490195  0.526141  0.565917  0.610353  0.660232  0.716173  0.778452  0.846763  0.919914  0.995547  1.07001   1.13854   1.19588    1.23718    1.25878
 0.148385    0.152947   0.161975   0.175262  0.192474  0.213137  0.23665   0.262328  0.289486  0.317533  0.346071  0.374964  0.404363  0.43471   0.4667    0.501255  0.539494  0.582713  0.632375  0.690092  0.75756   0.836429  0.928002  1.03272   1.1493    1.27371   1.39809   1.51064    1.59716    1.64443
 0.120453    0.126104   0.137278   0.153696  0.174875  0.200102  0.228448  0.258839  0.290208  0.321663  0.352638  0.382979  0.41296   0.443231  0.47475   0.508726  0.546578  0.589942  0.640699  0.701019  0.773401  0.860651  0.965732  1.0913    1.23871   1.40612   1.58568   1.76048    1.90408    1.98636
 0.0909577   0.098092   0.112194   0.132868  0.159398  0.19068   0.225238  0.261383  0.297474  0.332223  0.364913  0.395469  0.424393  0.452621  0.481372  0.512033  0.546102  0.585165  0.630904  0.685083  0.749484  0.825684  0.914588  1.01552   1.12484   1.23449   1.33202   1.40445    1.44601    1.46226
 0.0602361   0.0695018  0.0877988  0.114536  0.148582  0.188133  0.230785  0.273857  0.314915  0.352268  0.385224  0.414044  0.439685  0.46349   0.486923  0.511411  0.53824   0.568495  0.60296   0.641919  0.684785  0.729453  0.77136   0.802572  0.811931  0.788253  0.727788  0.642222   0.558465   0.506932
 0.0300951   0.0426105  0.0672646  0.103059  0.148022  0.199015  0.251986  0.302743  0.347947  0.385818  0.416228  0.440285  0.45973   0.476426  0.492035  0.507855  0.524738  0.542996  0.562232  0.581051  0.596627  0.604238  0.597148  0.56764   0.510053  0.425442  0.32469   0.226238   0.149204   0.107374
 0.00673069  0.0245336  0.0593763  0.109244  0.17025   0.236535  0.301213  0.358181  0.403763  0.437224  0.460093  0.47501   0.484736  0.491598  0.497272  0.502743  0.508304  0.513517  0.517087  0.516699  0.508899  0.489293  0.453432  0.398651  0.326385  0.243411  0.160485  0.0888546  0.0371183  0.010234
 0.010234    0.0371183  0.0888546  0.160485  0.243411  0.326385  0.398651  0.453432  0.489293  0.508899  0.516699  0.517087  0.513517  0.508304  0.502743  0.497272  0.491598  0.484736  0.47501   0.460093  0.437224  0.403763  0.358181  0.301213  0.236535  0.17025   0.109244  0.0593763  0.0245336  0.00673069
 0.107374    0.149204   0.226238   0.32469   0.425442  0.510053  0.56764   0.597148  0.604238  0.596627  0.581051  0.562232  0.542996  0.524738  0.507855  0.492035  0.476426  0.45973   0.440285  0.416228  0.385818  0.347947  0.302743  0.251986  0.199015  0.148022  0.103059  0.0672646  0.0426105  0.0300951
 0.506932    0.558465   0.642222   0.727788  0.788253  0.811931  0.802572  0.77136   0.729453  0.684785  0.641919  0.60296   0.568495  0.53824   0.511411  0.486923  0.46349   0.439685  0.414044  0.385224  0.352268  0.314915  0.273857  0.230785  0.188133  0.148582  0.114536  0.0877988  0.0695018  0.0602361
 1.46226     1.44601    1.40445    1.33202   1.23449   1.12484   1.01552   0.914588  0.825684  0.749484  0.685083  0.630904  0.585165  0.546102  0.512033  0.481372  0.452621  0.424393  0.395469  0.364913  0.332223  0.297474  0.261383  0.225238  0.19068   0.159398  0.132868  0.112194   0.098092   0.0909577
 1.98636     1.90408    1.76048    1.58568   1.40612   1.23871   1.0913    0.965732  0.860651  0.773401  0.701019  0.640699  0.589942  0.546578  0.508726  0.47475   0.443231  0.41296   0.382979  0.352638  0.321663  0.290208  0.258839  0.228448  0.200102  0.174875  0.153696  0.137278   0.126104   0.120453
 1.64443     1.59716    1.51064    1.39809   1.27371   1.1493    1.03272   0.928002  0.836429  0.75756   0.690092  0.632375  0.582713  0.539494  0.501255  0.4667    0.43471   0.404363  0.374964  0.346071  0.317533  0.289486  0.262328  0.23665   0.213137  0.192474  0.175262  0.161975   0.152947   0.148385
 1.25878     1.23718    1.19588    1.13854   1.07001   0.995547  0.919914  0.846763  0.778452  0.716173  0.660232  0.610353  0.565917  0.526141  0.490195  0.457278  0.426667  0.397762  0.370116  0.343461  0.317717  0.292995  0.269562  0.247802  0.228154  0.211057  0.196908  0.186025   0.178645   0.174918
 0.99863     0.987766   0.966541   0.936015  0.897808  0.853985  0.806792  0.758363  0.710473  0.664413  0.620979  0.580544  0.543152  0.508629  0.47667   0.446912  0.418996  0.392611  0.367524  0.343606  0.32084   0.299317  0.279223  0.260808  0.244357  0.230156  0.218467  0.209507   0.203443   0.200384
 0.826828    0.820649   0.808467   0.790662  0.76785   0.740882  0.710777  0.678629  0.645481  0.612236  0.579594  0.548041  0.517862  0.489179  0.461998  0.43625   0.411835  0.388654  0.366637  0.345762  0.326061  0.307622  0.290582  0.275112  0.261402  0.249642  0.240006  0.232643   0.227669   0.225163
 0.707707    0.703855   0.696234   0.685018  0.670489  0.653036  0.633149  0.611378  0.588294  0.564443  0.540305  0.516277  0.492656  0.469656  0.44741   0.426001  0.405474  0.385862  0.367198  0.349529  0.332923  0.31747   0.303282  0.290482  0.279203  0.269574  0.261714  0.255724   0.251685   0.249651
 0.620509    0.617979   0.612965   0.605564  0.595923  0.584246  0.570781  0.555819  0.539669  0.522647  0.505054  0.487163  0.469213  0.451401  0.43389   0.416811  0.400269  0.384358  0.36916   0.354758  0.341239  0.328692  0.317212  0.306895  0.297838  0.290132  0.283858  0.279088   0.275876   0.274261
 0.553515    0.551834   0.548501   0.54357   0.537127  0.529284  0.520175  0.50996   0.498809  0.486904  0.474426  0.461551  0.448446  0.435264  0.422145  0.409213  0.396582  0.384354  0.372625  0.361484  0.351018  0.341308  0.332436  0.324478  0.317506  0.311585  0.306774  0.303122   0.300665   0.29943
 0.499866    0.498793   0.496665   0.493512  0.489382  0.484336  0.478449  0.471805  0.464501  0.456637  0.44832   0.439655  0.43075   0.421708  0.412629  0.40361   0.394741  0.386108  0.377792  0.36987   0.362412  0.355488  0.349158  0.343483  0.338513  0.334296  0.330873  0.328275   0.32653    0.325652
 0.455346    0.454752   0.453573   0.451824  0.449527  0.446713  0.443417  0.439683  0.435556  0.431089  0.426336  0.421352  0.416197  0.41093   0.405609  0.400292  0.395036  0.389897  0.384927  0.380177  0.375695  0.371524  0.367707  0.364281  0.36128   0.358732  0.356664  0.355094   0.354039   0.353509
 0.417242    0.417055   0.416683   0.41613   0.415403  0.41451   0.413462  0.41227   0.410949  0.409512  0.407977  0.406361  0.404681  0.402957  0.401207  0.399451  0.397708  0.395997  0.394337  0.392744  0.391237  0.389832  0.388542  0.387383  0.386365  0.3855    0.384798  0.384264   0.383905   0.383725

We superpose a surface plot of $f$ on top of the grid:

X = [x for x in x, z in z]
Y = [w*z for w in w, z in z]
scatter3d(vec(X), vec(Y), vec(0F); markersize=0.75, markercolor=:green)
surface!(X, Y, F; legend=false, xlabel="x", ylabel="y", zlabel="f")
savefig(joinpath(GENFIGS, "dunklxu.html"))

We precompute a Dunkl-Xu–Chebyshev plan:

P = plan_rectdisk2cheb(F, β)
FastTransforms Dunkl-Xu--Chebyshev² plan for 30×30-element array of Float64

And an FFTW Chebyshev² analysis plan on the rectangularized disk:

PA = plan_rectdisk_analysis(F)
FastTransforms plan for FFTW Chebyshev analysis on the rectangularized disk for 30×30-element array of Float64

Its Dunkl-Xu coefficients are:

U = P\(PA*F)
30×30 Matrix{Float64}:
  0.886226      4.88093e-18  -6.09829e-7    7.3934e-18   -0.0236857    -1.25688e-18  -0.00550977    2.51593e-18  -0.000650943  -2.71963e-19   2.15779e-9   -2.9605e-19    1.86065e-5    1.00612e-18   4.38992e-6    3.5843e-19    4.19398e-7   -1.03354e-18  -1.00953e-7    2.05194e-18  -8.14396e-8   -6.75767e-19  -3.94076e-8    1.87382e-19  -1.67897e-8    4.3229e-20   -6.33162e-9   -3.2163e-18   -2.11252e-9    1.43617e-18
 -1.80364e-18  -0.361799     -6.22523e-18  -0.062663     -1.92598e-18   2.72128e-6    2.69715e-18   0.00252359    2.56858e-19   0.000679258  -3.91889e-18   9.1001e-5     1.80758e-18   1.03955e-6   -1.01087e-18  -2.31664e-6    5.66462e-18  -3.11859e-7    4.31226e-18   1.77496e-7   -1.43816e-17   1.44389e-7    1.5455e-18    6.82707e-8    6.35342e-19   2.5634e-8     7.23783e-19   7.91583e-9    4.99128e-19   1.6359e-9
 -5.19659e-7    3.27138e-19   0.105921     -4.51616e-18   0.0404829     4.96613e-19   0.00663284   -1.08982e-18  -5.56102e-6    9.74978e-20  -0.000301082   8.13496e-20  -8.77391e-5   -1.98848e-19  -1.39615e-5   -4.43701e-20  -1.31088e-6    5.32529e-20  -2.80392e-7    4.18035e-20  -2.38006e-7   -6.20352e-20  -1.39444e-7    3.05185e-20  -5.76521e-8    1.01009e-20  -1.77475e-8   -9.78516e-19  -3.52357e-9    4.75161e-19
 -3.1377e-18    0.125331      9.65389e-18   1.52509e-6    2.50775e-18  -0.013651     -3.18365e-18  -0.00478429   -2.9301e-19   -0.000775222   4.16509e-18   4.86933e-6   -1.81714e-18   4.00219e-5    9.63409e-19   1.28528e-5   -5.11794e-18   2.68143e-6   -3.68788e-18   5.35246e-7    1.16267e-17   1.5728e-7    -1.17893e-18   5.72745e-8   -4.56215e-19   1.62262e-8   -4.8782e-19    4.075e-10    -3.06319e-19  -1.20696e-9
 -0.0886209     7.09117e-18  -0.0913638     2.68193e-18  -0.0231032    -7.27415e-19   2.55845e-6    1.5192e-19    0.00173316    2.26089e-20   0.000591205   4.54197e-20   9.51801e-5   -2.36893e-19  -9.67049e-7   -1.15705e-19  -5.17388e-6    4.24064e-19  -1.60228e-6   -1.00709e-18  -2.52759e-7    3.82951e-19   9.35469e-9   -1.19582e-19   2.66735e-8   -3.04893e-20   1.62648e-8    2.22727e-18   7.6679e-9    -1.0022e-18
  4.91356e-19  -2.79797e-6   -1.0668e-17    0.0328526    -2.85221e-18   0.0160342     3.46973e-18   0.00332497    2.67808e-19  -8.62281e-6   -3.75043e-18  -0.000228689   1.53018e-18  -7.87989e-5   -7.4973e-19   -1.43006e-5    3.65184e-18  -1.11779e-6    2.40629e-18   2.57992e-8   -6.84699e-18  -9.03781e-8    6.15479e-19  -8.97012e-8    2.05796e-19  -4.18139e-8    1.88516e-19  -1.37244e-8    1.26488e-19  -2.86072e-9
  0.0632999     3.12378e-18   0.0392743    -3.4531e-19    3.65838e-6   -1.12595e-18  -0.00566089    4.17407e-19  -0.00237159   -4.46078e-20  -0.0004495    -1.08161e-19   7.81213e-6    5.11873e-19   3.39614e-5    2.15635e-19   1.24485e-5   -6.79675e-19   2.90796e-6    1.46766e-18   5.68462e-7   -5.16221e-19   1.34604e-7    1.50621e-19   3.66282e-8    3.20156e-20   6.0499e-9    -2.39741e-18  -9.48683e-10   1.07874e-18
  1.06698e-18  -0.0381303     1.25458e-17  -0.0305859     2.44665e-18  -0.00858298   -2.69754e-18   4.65679e-6   -2.56113e-19   0.000859316   2.74749e-18   0.000335164  -9.81669e-19   6.02308e-5    4.29474e-19  -1.60502e-6   -1.83561e-18  -4.61957e-6   -9.3147e-19   -1.57519e-6    1.69285e-18  -2.83912e-7   -4.26696e-20   6.48665e-9    7.88495e-21   2.64839e-8    8.75784e-21   1.29647e-8    5.99252e-21   3.53416e-9
 -0.0246173     1.70189e-18  -7.2626e-6    -9.9911e-19    0.0116417    -1.16613e-18   0.00624266   -1.36465e-18   0.00144602    2.56415e-19  -1.39151e-5    2.34251e-19  -0.000132715  -6.93948e-19  -5.15476e-5   -2.41657e-19  -1.08626e-5    7.7043e-19   -1.14678e-6   -1.56304e-18  -1.60201e-8    5.1778e-19   -6.95967e-8   -1.24065e-19  -5.06628e-8   -2.87139e-20  -1.89806e-8    2.15273e-18  -4.88118e-9   -9.67999e-19
  4.64163e-18   0.0318389    -1.09717e-17   0.0141265    -2.96457e-18   5.77928e-6    2.74947e-18  -0.00227906    1.10956e-19  -0.00104803   -1.8648e-18   -0.000212855   6.20033e-19   1.03295e-5   -1.7054e-19    2.34123e-5   -5.89274e-20   9.30847e-6   -4.95598e-19   2.35417e-6    2.98217e-18   3.9768e-7    -3.17025e-19   5.08658e-8   -1.27868e-19  -3.96513e-9   -1.4048e-19   -6.27377e-9   -9.27962e-20  -2.22939e-9
  4.3203e-6    -1.02136e-19  -0.0150888     3.54472e-18  -0.0112343    -2.41484e-18  -0.00328812    1.14872e-18   1.04744e-5    3.139e-20     0.00039214   -8.70634e-20   0.000165953   6.71138e-19   3.20022e-5    3.00439e-19  -1.20827e-6   -7.19565e-19  -2.94655e-6    1.37612e-18  -7.04511e-7   -3.66772e-19  -5.6071e-8     1.01804e-19   3.46324e-8    2.36583e-20   2.06785e-8   -1.75699e-18   7.17059e-9    7.93642e-19
  1.17954e-18  -0.013664      9.89605e-18  -1.51866e-5    8.39211e-19   0.00436874   -1.26517e-18   0.00244523   -1.59855e-19   0.000590637   4.70038e-20  -2.14758e-5    4.58082e-19  -7.38896e-5   -3.32819e-19  -3.13213e-5    1.64475e-18  -7.72648e-6    1.66054e-18  -1.29269e-6   -4.7847e-18   -2.78823e-7    5.16301e-19  -5.90858e-8    1.80021e-19  -1.01665e-8    2.06295e-19  -5.87834e-11   1.54921e-19   6.08272e-10
  0.00851225   -4.22019e-18   0.0134873    -4.03782e-18   0.00537692   -4.64932e-19   6.02617e-6   -2.25213e-18  -0.000910525   5.23302e-19  -0.000437065   4.29376e-19  -8.7068e-5    -7.77709e-19   1.1278e-5    -1.10609e-19   1.49731e-5    5.87211e-19   4.52269e-6   -8.58639e-19   1.07064e-6    2.35188e-19   1.46243e-7   -7.65701e-20  -1.38814e-8   -1.54063e-20  -1.70166e-8    1.32834e-18  -7.00317e-9   -5.52949e-19
  7.31841e-19   1.53467e-5   -7.59173e-18  -0.00600077   -2.27053e-18  -0.00428943    3.82004e-19  -0.00126564   -1.19334e-19   2.25421e-5    4.16707e-19   0.000179497   6.40642e-21   8.01025e-5    1.6679e-19    1.7027e-5    -3.16122e-18   1.57076e-6   -1.91492e-18   2.06968e-7    5.89143e-18   6.4408e-8    -4.62318e-19   3.71494e-8   -3.4131e-19    1.54347e-8   -3.28141e-19   4.19596e-9   -1.12167e-19   6.39706e-10
 -0.00737561    1.76295e-18  -0.00609917    5.75665e-18  -2.74248e-5   -1.16198e-18   0.00166484    1.31489e-18   0.000938074   2.28501e-19   0.000214292   1.61269e-19  -2.95524e-5    3.26621e-19  -4.43089e-5    3.89482e-19  -1.48998e-5   -2.32779e-19  -4.66705e-6    4.9551e-19   -1.1166e-6    -3.72061e-19  -1.75326e-7    7.50677e-20   6.20197e-11   2.16117e-20   1.22805e-8   -9.98122e-19   5.74874e-9    6.31436e-19
 -2.74395e-18   0.00528716    3.27215e-18   0.00556329   -8.98476e-19   0.00208938   -2.41698e-19  -5.2783e-7    -1.39385e-20  -0.000359085  -2.4091e-18   -0.000171677   2.11688e-18  -2.96656e-5   -1.21041e-18   2.10201e-6    1.80307e-18   2.03799e-6    1.27404e-18   7.36548e-7   -4.95432e-18   1.34796e-7    1.16751e-18  -8.41342e-9   -2.40766e-19  -1.56944e-8   -5.95515e-20  -6.34761e-9    4.47667e-19  -1.40381e-9
  0.00325817   -2.29462e-18   3.77292e-5   -5.61609e-18  -0.00236387    1.76379e-18  -0.0016225    -1.92641e-18  -0.000450124   5.35083e-19   4.2479e-5     5.50898e-19   9.29879e-5   -6.41246e-19   3.37099e-5    8.07182e-19   1.28552e-5    4.30567e-19   3.9506e-6    -7.34931e-19   9.51441e-7   -5.1153e-19    1.58677e-7    1.1805e-20    5.78941e-9    1.29451e-20  -8.22477e-9    4.89912e-19  -4.24338e-9    4.96472e-19
 -1.23015e-18  -0.00475403   -9.80095e-19  -0.00260261    5.56482e-20  -4.17061e-5   -2.66803e-18   0.000603349  -2.49396e-19   0.000321014   2.74435e-18   4.91036e-5    7.03085e-20  -1.33075e-5   -1.07325e-18  -9.95643e-6   -4.36443e-18  -4.40482e-6   -3.34341e-18  -1.35103e-6    8.07141e-18  -2.69324e-7    7.78626e-19  -1.41967e-8   -1.38395e-18   1.40866e-8   -1.07373e-18   7.16251e-9    5.30106e-19   1.77508e-9
 -2.1087e-5     5.61239e-18   0.00246819    5.52864e-18   0.00221801    6.64863e-19   0.000774953   1.23576e-18  -2.27028e-5    1.14499e-19  -0.000146058   2.67668e-19  -5.59485e-5   -5.86645e-19  -2.5516e-5     1.53483e-18  -9.52201e-6    2.77762e-19  -2.90084e-6   -1.98045e-19  -7.0138e-7    -7.97133e-19  -1.20528e-7    2.75387e-19  -6.49799e-9   -3.72027e-20   5.20338e-9   -7.70801e-19   2.87275e-9    1.20644e-18
  7.71379e-19   0.00217575   -3.82054e-18   7.86173e-5   -1.2095e-18   -0.000845473   9.75301e-19  -0.000526267   2.05844e-19  -9.24417e-5   -2.692e-18     2.85383e-5    2.99178e-18   2.55329e-5   -2.30014e-18   1.39518e-5   -2.78619e-19   5.53959e-6   -7.17624e-19   1.63754e-6   -1.82614e-18   3.34514e-7    2.20125e-18   2.71988e-8   -1.03256e-18  -1.21682e-8   -8.63299e-19  -7.17118e-9    1.07933e-18  -1.87466e-9
 -0.00127442   -2.05414e-18  -0.00226313   -4.98198e-18  -0.00105975    1.73898e-18  -4.70324e-5   -6.08225e-19   0.000173699  -2.03389e-19   6.84882e-5   -4.18902e-20   3.73772e-5   -1.6723e-19    1.67333e-5    7.90419e-19   6.1804e-6     2.82941e-19   1.87498e-6   -2.99138e-20   4.54341e-7    1.33985e-19   7.92679e-8    3.01582e-19   4.9557e-9    -2.09828e-19  -3.08203e-9   -1.13248e-19  -1.77447e-9    3.68413e-19
  2.77577e-18  -7.54358e-5    6.78416e-18   0.000953128   2.98963e-18   0.00073895   -3.46635e-18   0.000186348  -2.33717e-19  -3.08415e-5    4.95826e-18  -4.20801e-5   -4.80551e-19  -2.97992e-5    4.08597e-19  -1.49958e-5   -1.91536e-18  -5.73922e-6   -2.31665e-18  -1.67382e-6    4.49646e-18  -3.45419e-7   -2.85001e-19  -3.19319e-8    3.64583e-19   1.04223e-8   -4.38958e-19   6.70585e-9   -2.59421e-20   1.79997e-9
  0.00115733    2.10974e-18   0.00108248    3.33991e-18   0.000140675  -1.6824e-19   -0.00015525    6.15122e-19  -6.00244e-5   -6.33102e-19  -3.94963e-5   -1.21254e-18  -2.12639e-5    6.32301e-19  -9.44009e-6   -7.87814e-19  -3.47007e-6   -2.58106e-19  -1.05071e-6    1.07581e-18  -2.54885e-7    1.70371e-18  -4.47918e-8    3.43293e-19  -2.98189e-9   -1.39616e-19   1.6509e-9    -3.84199e-19   9.71987e-10  -1.55957e-18
  4.29563e-18  -0.000757848  -8.87146e-18  -0.000843449  -1.33746e-18  -0.000328982   3.09993e-18   8.77607e-7    5.61125e-19   4.13033e-5    1.11931e-19   4.36922e-5   -1.95307e-19   2.88832e-5    5.08047e-20   1.41096e-5    1.47949e-18   5.3233e-6     1.31963e-18   1.5442e-6    -3.78597e-18   3.20051e-7    5.42817e-19   3.10541e-8    1.05072e-18  -8.83962e-9    3.31049e-20  -5.9456e-9    -8.49776e-19  -1.61537e-9
 -0.000553886  -4.2256e-18   -0.000187639  -2.12233e-18   0.000102621  -1.2965e-18    3.50362e-5    4.14295e-19   2.80559e-5   -1.26889e-18   1.831e-5      1.31669e-19   9.80506e-6    7.82739e-19   4.33835e-6    4.91742e-19   1.59166e-6    3.48876e-20   4.81568e-7   -1.16883e-19   1.16874e-7   -1.2698e-18    2.05996e-8   -7.01313e-19   1.40536e-9    6.14272e-19  -7.42251e-10   3.88851e-19  -4.4125e-10    7.78373e-19
  8.21991e-19   0.00067785    1.19559e-17   0.000443404   1.91539e-18   5.25409e-5    7.73184e-19  -8.79182e-6   -7.58272e-20  -3.88737e-5   -8.21673e-19  -3.84611e-5   -5.18383e-21  -2.48679e-5   -3.72149e-19  -1.20249e-5   -6.6793e-19   -4.51391e-6    2.54503e-19  -1.30691e-6    9.35488e-19  -2.71299e-7    1.03718e-18  -2.67727e-8   -2.80952e-19   7.24306e-9   -4.37736e-19   4.95787e-9   -1.0094e-18    1.35319e-9
  0.000104898  -6.38172e-19  -4.97719e-5    1.65418e-19  -1.14056e-5    4.43012e-19  -1.12136e-5    1.24947e-19  -8.949e-6      6.15797e-19  -5.82665e-6   -1.59108e-19  -3.11536e-6   -4.509e-19    -1.37708e-6    3.69813e-19  -5.04943e-7   -1.49101e-19  -1.52739e-7    4.77731e-20  -3.7074e-8     1.59531e-19  -6.54014e-9    3.36232e-20  -4.49338e-10   3.91343e-19   2.34081e-10  -3.70102e-19   1.39557e-10  -6.65945e-19
  3.62074e-19  -0.000389793  -5.97813e-18  -8.04943e-5   -1.18022e-18  -3.68665e-5   -7.83651e-19   8.03845e-6   -5.62678e-19   2.97453e-5    9.78331e-19   2.89916e-5   -1.14836e-19   1.86472e-5    4.13309e-19   8.99472e-6    1.38486e-18   3.37228e-6    8.01229e-19   9.75922e-7   -1.87077e-18   2.02668e-7    6.63425e-20   2.00821e-8   -1.08813e-20  -5.36499e-9    1.3733e-19   -3.68864e-9   -2.49064e-19  -1.00792e-9
  1.54054e-5    2.56465e-18   1.00144e-6    1.85101e-19   1.23964e-6   -8.099e-20     1.21824e-6    1.03242e-19   9.71898e-7   -1.32444e-19   6.32656e-7   -6.48631e-20   3.38215e-7    1.18531e-19   1.49487e-7   -1.10404e-19   5.48103e-8   -2.04725e-19   1.65791e-8    5.11923e-20   4.02426e-9    1.1131e-19    7.09969e-10  -5.85651e-20   4.88112e-11  -3.38948e-20  -2.53943e-11   1.05365e-19  -1.51441e-11   1.06958e-19
 -1.56913e-18   0.000145153   1.84942e-19   0.000143445   6.35887e-20   6.55677e-5    2.12047e-19  -1.45469e-5    4.19192e-19  -5.3233e-5    -1.73722e-19  -5.18305e-5    6.60633e-20  -3.33247e-5   -2.00128e-19  -1.60719e-5   -3.33424e-19  -6.0251e-6     1.23644e-19  -1.74358e-6   -5.72577e-19  -3.62096e-7    5.9558e-20   -3.58901e-8   -8.52458e-20   9.57958e-9   -9.05164e-20   6.5884e-9     2.76755e-19   1.80042e-9

The Dunkl-Xu coefficients are useful for integration. The integral of $f(x,y)$ over the disk should be $\pi/2$ by harmonicity. The coefficient of $P_{0,0}$ multiplied by √π is:

U[1, 1]*sqrt(π)
1.570795540915304

Using an orthonormal basis, the integral of $[f(x,y)]^2$ over the disk is approximately the square of the 2-norm of the coefficients:

norm(U)^2, π/(2*sqrt(2))*log1p(sqrt(2))
(0.9789370457260868, 0.9789599179781414)

This page was generated using Literate.jl.