# Asymptotic law in Laplace's problem

$$\textbf{Eigenvalue problem on a unit square \Omega = [0,1]^2 :}$$

Consider the eigenvalue problem with the Dirichlet boundary condition that is,

$$-Lu = \lambda u$$ where $$L = \frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2}$$

The boundary condition is $$u=0$$ on $$\partial \Omega$$.

I have calculated the eigenvalues and eigenfunctions of this eigenvalue problem. Now, I am looking for $$\textbf{Weyl's Law}$$. We know that eigenvalues of above said problem form an increasing sequence $$0 = \lambda_{0} < \lambda_{1} \leq \lambda _{2} \leq \cdots$$ and that satisfy $$\textbf{Weyl asymptotic law}$$ $$N(t) = \#\{\lambda_{j} \leq t\}$$ Therefore, $$N(t)$$ finds the numbers eigenvalues less than or equal to $$t$$ (counted with multiplicity). Also,for more details please see the wiki here.

I am looking for $$\textbf{Weyl's Law}$$ in Mathematica and how to compute the numbers of eigenvalues less than or equal to $$t$$.

• At the present DSolve[{Laplacian[u[x, y], {x, y}] == \[Lambda]*u[x, y], u[x, 0] == 0, u[x, 1] == 0, u[0, y] == 0, u[1, y] == 0}, u[x, y], {x, y}] finds only zero solution. I think the situation will not change in the foreseeable future. I have strong doubts concerning a closed-form expression for the eigenvalues. – user64494 Feb 25 at 8:57
• DSolve[{Laplacian[u[x, y], {x, y}] == -2*Pi^2*u[x, y], u[x, 0] == 0, u[x, 1] == 0, u[0, y] == 0, u[1, y] == 0}, u[x, y], {x, y}] ] outputs u[x, y] -> 0. I think the eigenvalues are implemented as table values. – user64494 Feb 25 at 18:59

For eigenvalues of a unit square region you could e.g. define:

Clear[n];
n[t_] := n[t] = (c = 0;
While[DEigenvalues[{-Laplacian[u[x, y], {x, y}],
DirichletCondition[u[x, y] == 0, True]},
u[x, y], {x, y} \[Element] Rectangle[], c + 1][[-1]] < t, c++];
c)


The first 5 eigenvalues are:

DEigenvalues[{-Laplacian[u[x, y], {x, y}], DirichletCondition[u[x, y] == 0, True]},
u[x, y], {x, y} \[Element] Rectangle[], 5] Using n from above:

n[5 Pi^2]

n[8 Pi^2]

n[10 Pi^2]

(* 1,3,4*)

Starting from the analytic solution and speeding it up a bit, here is a function to calculate the multiplicities of the eigenvalues $$\lambda/\pi^2=k\in \{1\ldots n\}$$,

S[n_Integer?Positive] :=
BinCounts[Plus @@@ Tuples[Range[Sqrt[n]]^2, 2], {1, n + 1}]


and the cumulative number of states with eigenvalues $$\lambda/\pi^2\le k\in \{1\ldots n\}$$,

T[n_Integer?Positive] := Accumulate[S[n]]


Test:

T
(*    {0, 1, 1, 1, 3, 3, 3, 4, 4, 6}    *)


Least-squares fitting these results for $$k\in\{1\ldots10^5\}$$

Fit[T[10^5], {k, Sqrt[k], 1}, k]
(*    0.785396*k - 0.999144*Sqrt[k] + 0.583841    *)


which I have refined using $$k\in\{1\ldots10^9\}$$ to the approximation

a[k_] = π/4 * k - Sqrt[k] + 0.643;


where the last term is a bit uncertain and I don't have an exact expression. Weyl's law is then approximately

a[λ/π^2]
(*    λ/(4π) - Sqrt[λ]/π + 0.643    *)


Visual test with $$k\in\{1\ldots10^5\}$$: the difference between the exact values of T[10^5] and the approximate values a[k] seem to oscillate around zero,

With[{n = 10^5},
t = T[n];
DiscretePlot[t[[k]] - a[k], {k, n}, PlotRange -> 30 {-1, 1}]] 