2
$\begingroup$

$\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 that $u=0$ on $\partial \Omega$.

I am computing the $\textbf{eigenvalues}$ and $\textbf{eigenfunctions}$ of Laplacian numerically in Mathematica. Specially, I am interested about the $\textbf{multiplicity}$ of a specific eigenvalue. I already know that Tally or Count can certainly count the occurrances of eigenvalues in the list called vals.

{ℒ, ℬ} = {-Laplacian[u[x, y], {x, y}],
    DirichletCondition[u[x, y] == 0, True]};

{vals, funs} = 
  DEigensystem[{ℒ, ℬ}, 
   u[x, y], {x, 0, 1}, {y, 0, 1}, _];

Tally[vals]

In the eigenvalue problem there are infinite numbers of eigenvalues. So, We can not list all of them. I want to find out $\textbf{multiplicity}$ of a specific eigenvalue that counts the total number of occurrances. For example, the multiplicity of the eigenvalue $5 \pi^2$ is $2$. Similarly, I want to find out the multiplicity of the eigenvalue $50 \pi^2$ is $3$.

Thanking in advanced.

$\endgroup$
3

1 Answer 1

5
$\begingroup$

With the exact solutions

u[{nx_, ny_}, {x_, y_}] = Sin[nx π x] Sin[ny π y];

and $\{n_x,n_y\}\in\mathbb{N}^2$, the eigenvalues are

λ[nx_, ny_] = (nx^2 + ny^2) π^2;

Test:

Assuming[Element[nx | ny, PositiveIntegers],
  {u[{nx, ny}, {x, 0}], u[{nx, ny}, {x, 1}], 
   u[{nx, ny}, {0, y}], u[{nx, ny}, {1, y}]} // FullSimplify]
(*    {0, 0, 0, 0}    *)

-D[u[{nx, ny}, {x, y}], {x, 2}] - D[u[{nx, ny}, {x, y}], {y, 2}] ==
λ[nx, ny] * u[{nx, ny}, {x, y}] // FullSimplify
(*    True    *)

The number of pairs $\{n_x,n_y\}$ equal to $\lambda/\pi^2$ is therefore given by OEIS A063725. You can calculate the multiplicity of a given value of $i=\lambda/\pi^2$ directly from the generating function,

g[q_] = (EllipticTheta[3, q] - 1)^2/4;
m[i_Integer?NonNegative] := SeriesCoefficient[g[q], {q, 0, i}]

For example, the multiplicity of $\lambda=50\pi^2$ is 3, as you know:

m[50]
(*    3    *)

There is no eigenvalue at $326\pi^2$, on the other hand:

m[326]
(*    0    *)

More generally, the $d$-dimensional generating function

g[d_, q_] = ((EllipticTheta[3, q] - 1)/2)^d;

allows us to find the multiplicity of the eigenvalue $\lambda=i\pi^d$ directly:

m[d_Integer?NonNegative, i_Integer?NonNegative] :=
  SeriesCoefficient[g[d, q], {q, 0, i}]

For example, the $d=17$-dimensional hypercube has $1\,416\,786\,753\,216$ eigenvalues $\lambda=250\pi^{17}$:

m[17, 250]
(*    1416786753216    *)

If you want the actual solutions, not just the number of solutions, PowersRepresentations is a good starting point (but it gives solutions containing zeros, which we need to filter out):

s[d_Integer?NonNegative, i_Integer?NonNegative] :=
  Select[PowersRepresentations[i, d, 2], Min[#] > 0 &]

For example, the eigenvalue $\lambda=50\pi^2$ in $d=2$ dimensions can be composed in two ordered ways, as you know:

s[2, 50]
(*    {{1, 7}, {5, 5}}    *)

Enumerating all permutations of these ordered combinations gives the full multiplicity of 3:

t[d_Integer?NonNegative, i_Integer?NonNegative] :=
  Join @@ Permutations /@ s[d, i]

t[2, 50]
(*    {{1, 7}, {7, 1}, {5, 5}}    *)

In $d=17$ dimensions the eigenvalue $\lambda=250\pi^{17}$ has 999 ordered solutions,

s[17, 250]
(*    {{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 6, 14},
       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 10, 10},
       {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 15},
       ...
       {3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5},
       {3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6}}    *)

which then become the aforementioned $1\,416\,786\,753\,216$ unordered solutions from t[17, 250].

$\endgroup$
2
  • $\begingroup$ We should work with the generating function explicitly because it gives a very efficient recipe, especially in the high-dimensional case. Just look at the given example for the 17-dimensional hypercube: manually summing and counting is going to be very tedious and difficult, whereas the call to m[17, 1000] takes less than half a second. The same is true, to some extent, for your case $d=2$ when you work with large values of $\lambda$. $\endgroup$
    – Roman
    Commented Feb 16, 2021 at 8:32
  • $\begingroup$ Sorry, this is not the right place for an introduction to generating functions or Jacobi theta functions. $\endgroup$
    – Roman
    Commented Feb 16, 2021 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.