Mathematica Asked by no name on May 11, 2021
I have calculated the solution to the Laplacian eigenvalue problem on the unit square
$qquad – Delta u(x,y) = lambda u(x,y) text{ on } {[0,1]}^2$
with the Dirichlet’s boundary condition ($u = 0$).
My question is as follows:
Is it possible to write a program which calculate $N(t)$, the number of eigenvalues less than or equal to $t$?
Please help me.
Note that you should not name symbols with capital letters, because the is danger to overwrite a system symbol. In your case N
is used by the system to coerce a machine number. So let's call the function selEV
. As there are an infinity of Eigenvalues, we must restrict the number of Eigenvalues to calculate. You must guess an upper bound of expected eigen values: maxn
. For an example I choose maxn=10
:
{ℒ, ℬ} = {-Laplacian[u[x, y], {x, y}],
DirichletCondition[u[x, y] == 0, True]};
maxn = 10;
selEV[t_] := Select[DEigenvalues[{ℒ, ℬ}, u[x, y], {x, 0, π}, {y, 0, π}, maxn], # <= t &] // Length
And e.g. for t==7
we get:
selEV[7]
(* 3 *)
Answered by Daniel Huber on May 11, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP