# Some issues with DEingesystem

I would like to solve (get its eigenvalues/vectors) the Sturm-Liouville problem, for the following differential operator: $$L =\partial_{r} \partial_{r} \psi(r)$$. Also, I would like to impose the following boundary conditions:$$B1 = \psi(0)=1, B2= \psi(2)=0.$$

I have tried several different things and the only one that seems to work out is the following:

L = D[\[Psi][r], r, r];

\[Lambda] = 2;

B1 = \[Psi][0] == 1;

B2 = \[Psi][2] == 0;

{ev, ef} = DEigensystem[L, \[Psi][r], {r, 0, 2}, 2]

Plot[{Evaluate[ef], function}, {r, 0, 5}]


It is clear that no conditions were settled in this example. I am well aware that within the documentation, it is written on how to use to Dirichilet condition, as example, but not for general boundary/initial conditions.

With this, my questions are the following:

1) Why it only accepts second-order operators?

2) What conditions is it using when I do not specify it (like in my example)?

3) Tweaking around with the part written $$\{r,0,2\}$$, in the DEigensystem function, it seems in a way, that the conditions are changing, but I cannot see how. What exactly is this term doing?

4) And the most important question for my problem is: how do I set any two arbitrary conditions (like $$B1$$ and $$B2$$ given in my example)?

• Why don't you read the tutorial? – Alex Trounev Jul 1 '19 at 16:46
• Well, I am sorry, perhaps I am really missing something. I went through the documentation of DEigensystem and could not find what I wanted. Perhaps, if possible, you may link me to this tutorial? – Edison Cesar Jul 2 '19 at 7:43
• OK! I will point out two points: 1) Homogeneous DirichletCondition or NeumannValue boundary conditions may be included. Inhomogeneous boundary conditions will be replaced with corresponding homogeneous boundary conditions. 2) When no boundary condition is specified on the boundary $\partial \Omega$, then this is equivalent to specifying a Neumann 0 condition. – Alex Trounev Jul 2 '19 at 7:54
• I think I got it, thank you. So, in my case, I did the following: {ev, ef} = DEigensystem[{L, DirichletCondition[[Psi][r] == 0, True]}, [Psi][ r], {r, 0, 2}, 3] Which sets the BCs in both 0 and 2 to == 0, as desired. One more question, if I may, can I set a boundary condition to infinity? It does not work when I use it. – Edison Cesar Jul 2 '19 at 8:43
• It depends on the operator. For example, try L = -Laplacian[u[x], {x}] + x^2 u[x]; DEigensystem[L, u[x], {x, -Infinity, Infinity}, 2]. Will get {{1, 3}, {E^(-(x^2/2)), 2 E^(-(x^2/2)) x}} – Alex Trounev Jul 2 '19 at 13:02