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(pkgdir(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.03372e-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.80911e-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.61027e-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.8636e-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.87551e-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.15519e-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.67926e-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.51335e-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.16575e-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.41909e-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.7024e-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.44999e-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.70189e-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   4.04991e-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.20019e-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.28922e-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.44039e-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.50763e-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.24057e-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.79653e-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.38645e-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.72223e-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.64422e-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.04116e-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.52177e-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.47536e-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.16894e-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   3.66412e-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.48581e-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.57553e-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   3.16332e-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.23804e-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.73336e-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   2.86194e-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.88588e-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.81128e-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.94635e-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.29227e-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.45761e-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.88726e-18  6.67424e-13  1.47702e-9   2.24293e-9  -6.35833e-13  -6.35833e-13  -2.1985e-9   -4.42011e-10  1.20078e-12   2.0917e-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.51272e-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      2.91482e-18  -6.09829e-7    7.46859e-18  -0.0236857    -1.03089e-18  -0.00550977    1.55635e-18  -0.000650943   5.16951e-19   2.15779e-9   -3.61345e-20   1.86065e-5    1.15602e-18   4.38992e-6    4.86495e-19   4.19398e-7   -2.36331e-18  -1.00953e-7    2.61786e-18  -8.14396e-8    1.00901e-18  -3.94076e-8   -5.05452e-19  -1.67897e-8   -9.68766e-19  -6.33162e-9   -2.79749e-18  -2.11252e-9    8.20668e-19
 -1.82504e-18  -0.361799     -4.06548e-18  -0.062663     -1.26332e-18   2.72128e-6   -1.4716e-19    0.00252359   -1.53351e-18   0.000679258  -5.06658e-18   9.1001e-5     6.2766e-18    1.03955e-6   -6.44725e-19  -2.31664e-6    4.06045e-18  -3.11859e-7   -1.29757e-18   1.77496e-7   -4.52069e-18   1.44389e-7    4.00752e-18   6.82707e-8   -7.73146e-18   2.5634e-8     3.6454e-18    7.91583e-9   -4.99128e-19   1.6359e-9
 -5.19659e-7    1.77123e-18   0.105921     -4.37394e-18   0.0404829     3.53441e-19   0.00663284   -7.04472e-19  -5.56102e-6   -1.76702e-19  -0.000301082   9.63513e-21  -8.77391e-5   -2.28415e-19  -1.39615e-5   -6.02861e-20  -1.31088e-6    1.21769e-19  -2.80392e-7    5.33368e-20  -2.38006e-7    9.26254e-20  -1.39444e-7   -8.23221e-20  -5.76521e-8   -2.26363e-19  -1.77475e-8   -8.51099e-19  -3.52357e-9    2.71521e-19
 -1.32446e-18   0.125331      5.16222e-18   1.52509e-6    1.52224e-18  -0.013651      4.59065e-19  -0.00478429    1.7437e-18   -0.000775222   5.39444e-18   4.86933e-6   -6.32553e-18   4.00219e-5    6.1449e-19    1.28528e-5   -3.66863e-18   2.68143e-6    1.10971e-18   5.35246e-7    3.65472e-18   1.5728e-7    -3.05701e-18   5.72745e-8    5.55166e-18   1.62262e-8   -2.45695e-18   4.075e-10     3.06319e-19  -1.20696e-9
 -0.0886209     5.87339e-18  -0.0913638     3.09208e-18  -0.0231032    -7.65237e-19   2.55845e-6   -3.00844e-20   0.00173316    8.97087e-22   0.000591205   3.74945e-21   9.51801e-5   -2.71771e-19  -9.67049e-7   -1.57546e-19  -5.17388e-6    9.69671e-19  -1.60228e-6   -1.2848e-18   -2.52759e-7   -5.71811e-19   9.35469e-9    3.22564e-19   2.66735e-8    6.83271e-19   1.62648e-8    1.93725e-18   7.6679e-9    -5.72686e-19
 -2.97095e-19  -2.79797e-6   -7.50681e-18   0.0328526    -2.04986e-18   0.0160342     4.40714e-19   0.00332497   -1.61538e-18  -8.62281e-6   -4.81324e-18  -0.000228689   5.24108e-18  -7.87989e-5   -4.77978e-19  -1.43006e-5    2.61738e-18  -1.11779e-6   -7.23908e-19   2.57992e-8   -2.15228e-18  -9.03781e-8    1.59592e-18  -8.97012e-8   -2.50435e-18  -4.18139e-8    9.49482e-19  -1.37244e-8   -1.26486e-19  -2.86072e-9
  0.0632999     3.41915e-18   0.0392743     2.04798e-19   3.65838e-6   -1.28777e-18  -0.00566089   -8.19676e-20  -0.00237159    2.32247e-19  -0.0004495    -2.03756e-20   7.81213e-6    5.90042e-19   3.39614e-5    2.90117e-19   1.24485e-5   -1.55416e-18   2.90796e-6    1.87269e-18   5.68462e-7    7.70684e-19   1.34604e-7   -4.06242e-19   3.66282e-8   -7.1747e-19    6.0499e-9    -2.08524e-18  -9.48683e-10   6.16421e-19
  3.09716e-18  -0.0381303     6.85278e-18  -0.0305859     1.24178e-18  -0.00858298    1.57978e-18   4.65679e-6    1.48577e-18   0.000859316   3.66318e-18   0.000335164  -3.67668e-18   6.02308e-5    2.74714e-19  -1.60502e-6   -1.31714e-18  -4.61957e-6    2.8105e-19   -1.57519e-6    5.32057e-19  -2.83912e-7   -1.10903e-19   6.48665e-9   -9.75956e-20   2.64839e-8    4.45112e-20   1.29647e-8   -5.92566e-21   3.53416e-9
 -0.0246173     1.28294e-18  -7.2626e-6    -5.42555e-19   0.0116417    -1.5197e-18    0.00624266   -1.5262e-18    0.00144602   -1.20352e-19  -1.39151e-5    7.19328e-21  -0.000132715  -7.90881e-19  -5.15476e-5   -3.3778e-19   -1.08626e-5    1.76166e-18  -1.14678e-6   -1.99294e-18  -1.60201e-8   -7.73951e-19  -6.95967e-8    3.34098e-19  -5.06628e-8    6.43971e-19  -1.89806e-8    1.87268e-18  -4.88118e-9   -5.53209e-19
  2.98082e-18   0.0318389    -6.74309e-18   0.0141265    -2.2857e-18    5.77928e-6    1.85861e-18  -0.00227906   -7.38706e-19  -0.00104803   -2.16033e-18  -0.000212855   1.40664e-18   1.03295e-5   -1.06259e-19   2.34123e-5   -4.7078e-20    9.30847e-6    1.52155e-19   2.35417e-6    9.37069e-19   3.9768e-7    -8.25039e-19   5.08658e-8    1.53656e-18  -3.96513e-9   -7.02953e-19  -6.27377e-9    9.37749e-20  -2.22939e-9
  4.3203e-6    -1.01216e-18  -0.0150888     3.64998e-18  -0.0112343    -2.60809e-18  -0.00328812   -3.25601e-19   1.04744e-5    6.53008e-19   0.00039214   -6.12143e-20   0.000165953   7.88511e-19   3.20022e-5    3.78167e-19  -1.20827e-6   -1.64546e-18  -2.94655e-6    1.7585e-18   -7.04511e-7    5.42632e-19  -5.6071e-8    -2.74245e-19   3.46324e-8   -5.26347e-19   2.06785e-8   -1.52684e-18   7.17059e-9    4.53041e-19
  2.97978e-18  -0.013664      6.79816e-18  -1.51866e-5    2.56186e-19   0.00436874    2.27725e-18   0.00244523    8.55161e-19   0.000590637   5.06774e-19  -2.14758e-5   -9.87345e-20  -7.38896e-5   -2.0589e-19   -3.13213e-5    1.16495e-18  -7.72648e-6   -4.88283e-19  -1.29269e-6   -1.50713e-18  -2.78823e-7    1.30362e-18  -5.90858e-8   -2.41505e-18  -1.01665e-8    1.09315e-18  -5.87834e-11  -1.44524e-19   6.08272e-10
  0.00851225   -3.44209e-18   0.0134873    -4.45863e-18   0.00537692   -8.6344e-19    6.02617e-6   -2.59858e-18  -0.000910525   1.20144e-19  -0.000437065  -4.63497e-20  -8.7068e-5    -8.54955e-19   1.1278e-5    -2.24346e-19   1.49731e-5    1.34347e-18   4.52269e-6   -1.05164e-18   1.07064e-6   -4.12598e-19   1.46243e-7    1.8322e-19   -1.38814e-8    3.81734e-19  -1.70166e-8    1.17383e-18  -7.00317e-9   -3.2114e-19
 -4.81915e-19   1.53467e-5   -3.48518e-18  -0.00600077   -1.54362e-18  -0.00428943    1.3639e-18   -0.00126564    6.40514e-19   2.25421e-5    1.15139e-18   0.000179497  -3.15573e-18   8.01025e-5    1.19841e-19   1.7027e-5    -2.29661e-18   1.57076e-6    6.35428e-19   2.06968e-7    1.82846e-18   6.4408e-8    -1.42283e-18   3.71494e-8    2.72152e-18   1.54347e-8   -1.30644e-18   4.19595e-9    1.83024e-19   6.39706e-10
 -0.00737561    4.33251e-19  -0.00609917    5.13286e-18  -2.74248e-5   -1.08183e-18   0.00166484   -1.58033e-19   0.000938074   9.62032e-19   0.000214292  -1.42549e-19  -2.95524e-5    4.47723e-19  -4.43089e-5    3.81922e-19  -1.48998e-5   -5.38424e-19  -4.66705e-6    8.07988e-19  -1.1166e-6     2.92867e-19  -1.75326e-7   -2.39274e-19   6.20197e-11  -3.48375e-19   1.22805e-8   -7.91504e-19   5.74874e-9    3.3781e-19
 -1.50034e-18   0.00528716    2.7886e-18    0.00556329   -4.46317e-19   0.00208938   -2.35225e-19  -5.2783e-7     1.28332e-19  -0.000359085  -2.52064e-18  -0.000171677   2.32232e-18  -2.96656e-5   -7.48237e-19   2.10201e-6    1.13125e-18   2.03799e-6   -1.16185e-19   7.36548e-7   -1.66045e-18   1.34796e-7    2.01546e-18  -8.41342e-9   -3.41003e-18  -1.56944e-8    1.27476e-18  -6.34761e-9   -1.27924e-19  -1.40381e-9
  0.00325817   -2.45633e-19   3.77292e-5   -6.14046e-18  -0.00236387    1.66876e-18  -0.0016225    -1.50793e-18  -0.000450124   3.28208e-19   4.2479e-5    -1.59362e-19   9.29879e-5   -6.17023e-19   3.37099e-5    5.05904e-19   1.28552e-5    9.75982e-19   3.9506e-6    -2.67608e-19   9.51441e-7   -1.69696e-19   1.58677e-7   -2.67634e-19   5.78941e-9   -8.37328e-20  -8.22477e-9    7.13035e-19  -4.24338e-9    2.06127e-19
 -1.92472e-18  -0.00475403   -5.91543e-19  -0.00260261    2.78168e-19  -4.17061e-5   -1.84423e-18   0.000603349   1.75828e-18   0.000321014   3.76947e-18   4.91036e-5   -6.29248e-18  -1.33075e-5   -6.34022e-19  -9.95643e-6   -3.43015e-18  -4.40482e-6    1.36517e-18  -1.35103e-6    2.23042e-18  -2.69324e-7   -4.75928e-19  -1.41967e-8    1.79959e-18   1.40866e-8   -1.45174e-18   7.16251e-9    3.37102e-19   1.77508e-9
 -2.1087e-5     4.50168e-18   0.00246819    5.59021e-18   0.00221801    9.29436e-19   0.000774953   1.30231e-18  -2.27028e-5    6.11546e-19  -0.000146058  -2.55988e-19  -5.59485e-5   -4.2841e-19   -2.5516e-5     1.26531e-18  -9.52201e-6    5.35149e-19  -2.90084e-6    4.21316e-19  -7.0138e-7     2.6213e-19   -1.20528e-7   -4.14798e-19  -6.49799e-9   -3.96214e-19   5.20338e-9   -3.60057e-19   2.87275e-9    6.14152e-19
  4.47127e-21   0.00217575   -2.94804e-18   7.86173e-5   -5.74207e-19  -0.000845473  -3.00544e-18  -0.000526267  -6.48906e-19  -9.24417e-5   -3.83389e-18   2.85383e-5    8.31841e-19   2.55329e-5   -1.4905e-18    1.39518e-5   -4.26975e-19   5.53959e-6   -1.18541e-19   1.63754e-6   -1.05016e-18   3.34514e-7    2.56192e-18   2.71988e-8   -3.29911e-18  -1.21682e-8    9.01268e-19  -7.17118e-9    1.50771e-19  -1.87466e-9
 -0.00127442    2.89389e-19  -0.00226313   -4.46728e-18  -0.00105975    1.64027e-18  -4.70324e-5    7.69626e-19   0.000173699  -1.45736e-19   6.84882e-5   -3.31713e-19   3.73772e-5   -1.13667e-20   1.67333e-5    8.04904e-19   6.1804e-6     5.06204e-19   1.87498e-6   -1.61079e-19   4.54341e-7    3.94803e-19   7.92679e-8    1.21931e-20   4.9557e-9    -3.19611e-20  -3.08203e-9   -1.34464e-19  -1.77447e-9    2.78404e-19
  1.91167e-18  -7.54358e-5    3.5257e-18    0.000953128   2.00801e-18   0.00073895   -2.05146e-18   0.000186348   1.79056e-18  -3.08415e-5    2.42912e-18  -4.20801e-5    2.90394e-19  -2.97992e-5    3.9062e-20   -1.49958e-5   -7.82959e-19  -5.73922e-6   -1.84621e-18  -1.67382e-6    1.1383e-18   -3.45419e-7   -1.14846e-18  -3.19319e-8    3.34489e-18   1.04223e-8   -1.00359e-18   6.70585e-9    2.9619e-19    1.79997e-9
  0.00115733    1.26766e-18   0.00108248    4.04541e-18   0.000140675  -2.95318e-19  -0.00015525    2.01371e-18  -6.00244e-5   -6.23205e-19  -3.94963e-5   -2.51751e-19  -2.12639e-5    5.94277e-19  -9.44009e-6   -1.69513e-20  -3.47007e-6   -8.14934e-19  -1.05071e-6   -6.08742e-19  -2.54885e-7    5.11695e-19  -4.47918e-8    8.87238e-19  -2.98189e-9    8.42475e-19   1.6509e-9    -1.1719e-18    9.71987e-10  -6.89756e-19
  1.43485e-18  -0.000757848  -5.39556e-18  -0.000843449  -8.62549e-19  -0.000328982   2.58778e-19   8.77607e-7   -2.05965e-19   4.13033e-5   -9.57155e-19   4.36922e-5    3.10512e-18   2.88832e-5   -1.32965e-19   1.41096e-5    1.04901e-18   5.3233e-6    -1.31593e-18   1.5442e-6    -6.91619e-19   3.20051e-7    9.90121e-19   3.10541e-8   -3.54625e-19  -8.83962e-9    3.59484e-19  -5.9456e-9    -6.76568e-19  -1.61537e-9
 -0.000553886  -2.83344e-18  -0.000187639  -1.79892e-18   0.000102621  -1.99574e-18   3.50362e-5   -6.73422e-19   2.80559e-5   -9.65978e-19   1.831e-5      2.44116e-19   9.80506e-6    8.6229e-19    4.33835e-6   -1.76767e-19   1.59166e-6    3.81142e-19   4.81568e-7    1.3699e-18    1.16874e-7   -1.00262e-19   2.05996e-8   -1.24595e-18   1.40536e-9   -1.66699e-19  -7.42251e-10   8.35404e-19  -4.4125e-10    1.03896e-19
  3.66637e-19   0.00067785    7.99019e-18   0.000443404   1.40538e-18   5.25409e-5    8.65411e-19  -8.79182e-6   -2.94255e-19  -3.88737e-5    5.6295e-19   -3.84611e-5   -2.42411e-18  -2.48679e-5   -5.79018e-20  -1.20249e-5   -7.04044e-19  -4.51391e-6    7.82627e-19  -1.30691e-6    1.08722e-18  -2.71299e-7    6.3856e-19   -2.67727e-8    2.94439e-19   7.24306e-9   -7.0046e-19    4.95787e-9   -9.33544e-19   1.35319e-9
  0.000104898  -1.05592e-18  -4.97719e-5   -5.85949e-19  -1.14056e-5    6.6917e-19   -1.12136e-5    4.34839e-19  -8.949e-6      4.06004e-19  -5.82665e-6   -2.37517e-19  -3.11536e-6   -5.88588e-19  -1.37708e-6    5.28526e-19  -5.04943e-7   -1.6762e-19   -1.52739e-7   -3.44619e-19  -3.7074e-8    -1.92945e-19  -6.54014e-9    1.13273e-19  -4.49338e-10   6.89746e-19   2.34081e-10  -4.65733e-19   1.39557e-10  -5.44661e-19
 -3.10808e-18  -0.000389793  -3.14687e-18  -8.04943e-5   -2.87651e-19  -3.68665e-5   -2.39537e-18   8.03845e-6   -3.64421e-19   2.97453e-5   -6.17914e-19   2.89916e-5    1.07312e-18   1.86472e-5    4.40338e-19   8.99472e-6    1.66864e-18   3.37228e-6   -1.12296e-18   9.75922e-7   -2.07688e-19   2.02668e-7    4.25707e-21   2.00821e-8    1.41624e-19  -5.36499e-9    1.09196e-19  -3.68864e-9   -1.60289e-19  -1.00792e-9
  1.54054e-5    1.3469e-18    1.00144e-6    1.82904e-19   1.23964e-6   -8.86981e-20   1.21824e-6    5.88101e-20   9.71898e-7   -1.0139e-19    6.32656e-7   -8.23915e-20   3.38215e-7    1.52369e-19   1.49487e-7   -1.10294e-19   5.48103e-8   -2.0251e-19    1.65791e-8    6.6719e-20    4.02426e-9    1.20342e-19   7.09969e-10  -6.40354e-20   4.88112e-11  -5.32019e-20  -2.53943e-11   1.22809e-19  -1.51441e-11   7.69628e-20
 -1.53496e-18   0.000145153   1.15554e-19   0.000143445  -5.81062e-20   6.55677e-5    2.32816e-19  -1.45469e-5    2.72345e-19  -5.3233e-5     4.51728e-20  -5.18305e-5   -3.6008e-21   -3.33247e-5   -1.62663e-19  -1.60719e-5   -4.71441e-19  -6.0251e-6     7.67245e-20  -1.74358e-6    3.53714e-20  -3.62096e-7    2.92342e-20  -3.58901e-8   -1.45255e-19   9.57958e-9   -1.47136e-20   6.5884e-9     3.52877e-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.5707955409153043

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.978937045726087, 0.9789599179781414)

This page was generated using Literate.jl.