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)?

  • 1
    $\begingroup$ Why don't you read the tutorial? $\endgroup$ – Alex Trounev Jul 1 '19 at 16:46
  • $\begingroup$ 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? $\endgroup$ – Edison Cesar Jul 2 '19 at 7:43
  • $\begingroup$ 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. $\endgroup$ – Alex Trounev Jul 2 '19 at 7:54
  • $\begingroup$ 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. $\endgroup$ – Edison Cesar Jul 2 '19 at 8:43
  • $\begingroup$ 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}} $\endgroup$ – Alex Trounev Jul 2 '19 at 13:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.