0
$\begingroup$

I am computing the eigenvalues of Laplacian-type operator on the unit square $\Omega = [0, 1]^2$

Consider the eigenvalue problem on the unit square $\Omega$, $$-L u = \lambda u$$ where $$L = e^{2y} \frac{\partial ^2}{\partial x^2} + \frac{\partial ^2} {\partial y^2} - \frac{\partial}{\partial y}$$

with the Dirichlet boundary condition $u = 0$ at $\partial \Omega$.

I have attempted the following.

First I have specified the Laplacian

ℒ = Exp[2 y]*D[u[x, y], {x, 2}] +  D[u[x, y], {y, 2}] -  D[u[x, y], {y, 1}] &;

Then I have specified the Dirichlet boundary condition

ℬ = DirichletCondition[u[x, y] == 0., True];

Computed the five smallest eigenvalues in the unit square.

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

Then I have inspected the eigenvalues

vals

But I am facing difficulties as it gives error.

NDEigensystem:The dependent variables specification(​{u[x,y]}) does not match the differential operator dependent variables

enter image description here

enter image description here

Please help me.

Thanking in advanced.

$\endgroup$
2
  • 1
    $\begingroup$ What errors do you get? At which point? $\endgroup$
    – MarcoB
    Commented Mar 9, 2021 at 5:54
  • $\begingroup$ I have edited the question and have added the errors. $\endgroup$
    – user2022
    Commented Mar 9, 2021 at 6:14

1 Answer 1

2
$\begingroup$

Three modifications: add dependence on $x$ and $y$ (add [x_,y_] to the definitions and [x,y] to where the script letters are referenced), remove the & (this defines ℒ as an unnamed function which shouldn't be) and you probably mean {y,0,1}.

Clear@ℒ
Clear@ℬ
ℒ[x_,y_]=Exp[2y]*D[u[x,y],{x,2}]+D[u[x,y],{y,2}]-D[u[x,y],{y,1}];
ℬ[x_,y_]=DirichletCondition[u[x,y]==0.,True];
{vals,funs}=NDEigensystem[{ℒ[x,y],ℬ[x,y]},u[x,y],{x,0,1},{y,0,1},5];
vals
$\endgroup$

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.