Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

MATLAB Making a short test for self-adjointness

  1. Feb 23, 2018 #1

    SemM

    User Avatar
    Gold Member

    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?
     
  2. jcsd
  3. Feb 23, 2018 #2

    DrClaude

    User Avatar

    Staff: Mentor

    No. Just because it is valid for a specific pair of functions doesn't mean that it will be true for all functions.
     
  4. Feb 23, 2018 #3

    SemM

    User Avatar
    Gold Member

    So one needs to add that if ##O \ne 0## then the operator is not self-adjoint.
     
  5. Feb 23, 2018 #4

    DrClaude

    User Avatar

    Staff: Mentor

    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.
     
  6. Feb 23, 2018 #5

    SemM

    User Avatar
    Gold Member

    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-P


    Gives:

    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?
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?