# why is there a minus sign on DEigenvalues “operator” as compared to the ODE itself?

In Mathematica, to find the eigenvalues for the following differential equation

\begin{align*} y''(x)+ \lambda y(x) &=0 \\ y(0) &=0\\ y(L) &=0 \end{align*}

The syntax one must use is

ClearAll[y,x,L0];
op={-y''[x],DirichletCondition[y[x]==0,True]};
eig=DEigenvalues[op,y[x],{x,0,L0},6]


Which gives the correct eigenvalues. My question is, why is there a minus sign in -y''(x) above? If one uses y''(x) instead, then all the eignevalues will be negative which is ofcourse wrong since eigenvalues have to be non-negative. (well, at least for Sturm-Lioville problems, I am not sure now if this is true in general?)

Help does not say anything about this. It just says operator and uses minus sign with no explanation. The closest thing I found, is that in Sturm–Liouville problems, some use minus sign. As in wikipedia

It is little confusing, since the sign is opposite from the differential equation itself.

Question is: Why is minus sign needed for DEigenvalues and DEigensystem? It would be nice if help pages spell things out more and explained this.

version 11.1.1

So an eigenvalue $\lambda$ of a differential operator ${\cal O}$ acting on an eigenfunction $u(x)$ is defined to satisfy: ${\cal O} u(x) = \lambda u(x)$. (cf. for example Wikipedia ).

Let's look at your example: $\partial_x^2 y(x) + \lambda y(x) = 0$.

So taking into the same form as the definition of the eigenvalue we see that $\lambda$ is the eigenvalue for the operator $-\partial_x^2$: $$-\partial_x^2 y(x) = \lambda y(x)$$ (we just brought the $\lambda y(x)$ to the RHS and multiplied by negative one to find the operator ${\cal O} = -\partial_x^2$).

Let's see this in action in Mathematica:

{vals, funs} =  DEigensystem[{-y''[x],
DirichletCondition[y[x] == 0, True]}, u[x], {x, 0, Pi}, 3]


yields:

{{1, 4, 9}, {Sin[x], Sin[2 x], Sin[3 x]}}

And this is true: $-\partial_x^2 \sin(x)$ is of course $1 \times \sin(x)$. The eigenvalue of the differential operator $\partial_x^2$ with eigenvector $\sin(x)$ is $-1$.