Making a short test for self-adjointness

  • Context: MATLAB 
  • Thread starter Thread starter SemM
  • Start date Start date
  • Tags Tags
    Matlab Short Test
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
4 replies · 2K views
SemM
Gold Member
Messages
194
Reaction score
13
Hi, I made the following command in MATLAB to test for the following:

\begin{equation}
\langle T\psi,\phi\rangle=\langle \psi, T\phi\rangle
\end{equation}

%Self-adjoint test
syms x
a = (diff(exp(-x^2)))*exp(-2*x^2)
b = (diff(exp(-2*x^2)))*exp(-x^2)
W = int(a, x)
P = int(b, x)
O=W-P

and it is tested on two square integrable functions. Can someone validate that this is OK?
 
Physics news on Phys.org
No. Just because it is valid for a specific pair of functions doesn't mean that it will be true for all functions.
 
So one needs to add that if ##O \ne 0## then the operator is not self-adjoint.
 
SemM said:
So one needs to add that if ##O \ne 0## then the operator is not self-adjoint.
Yes, you can use it for counterproofs.

I am not very familiar with symbolic manipulations in Matlab, but the way you use int appears to be for indefinite integrals, not a definite integral as it should be for the inner product.
 
DrClaude said:
Yes, you can use it for counterproofs.

I am not very familiar with symbolic manipulations in Matlab, but the way you use int appears to be for indefinite integrals, not a definite integral as it should be for the inner product.

Sure. trying the following function on the differential operator (d/dx) on the two given functions in the space 0-2pi:

%Self-adjoint test
syms x
a = (diff(exp(-x^2)))*exp(-2*x^2)
b = (diff(exp(-2*x^2)))*exp(-x^2)
W = int(a, 0, 2*pi)
P = int(b, 0, 2*pi)
O = W-PGives:

1/3 - exp(-12*pi^2)/3

So these two functions are either inadmissible, or the operator is not self adjoint. Of course the latter is ridiculous, but in order to try, can you give me a pair of functions that should work?