Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analytic Fourier transform api #516

Open
crowlogic opened this issue Oct 6, 2024 · 2 comments
Open

Analytic Fourier transform api #516

crowlogic opened this issue Oct 6, 2024 · 2 comments

Comments

@crowlogic
Copy link
Owner

Screenshot_20241005_215959_Chrome.jpg

@crowlogic
Copy link
Owner Author

restart;

Define the kernel and basis functions

K := (x, y) -> your_kernel_expression; # Replace your_kernel_expression with your kernel function K(x, y)
psi := n -> (x) -> basis_function_expression; # Replace basis_function_expression with your basis function psi_n(x)

Compute the matrix elements

MatrixK := Matrix(N, N, (m, n) -> int(int(psi(m)(x)*K(x, y)*psi(n)(y), y = 0 .. infinity), x = 0 .. infinity));

Solve the eigenvalue problem

Eigensystem := Eigenvalues(MatrixK, output = ['vectors']);

Output the results

Eigensystem;

@crowlogic
Copy link
Owner Author

Alexander Farrugia

 · 

Follow

Used matrices extensively in his PhD thesis.6y

If a matrix MM is diagonalizable, then M=PΛP−1M=PΛP−1, where ΛΛ is the diagonal matrix whose diagonal entries are the eigenvalues of MM and PP is the matrix whose columns are the eigenvectors of MM. We then have

M−1=(PΛP−1)−1=(P−1)−1Λ−1P−1=PΛ−1P−1M−1=(PΛP−1)−1=(P−1)−1Λ−1P−1=PΛ−1P−1

where Λ−1Λ−1 is the diagonal matrix whose diagonal entries are the reciprocals of the eigenvalues of MM. Note that, as a corollary, M−1M−1 exists if and only if none of the eigenvalues of MM are zero.

Another relation between matrix inversion and eigenvalues is the following. Let MM be any square matrix and p(x)=anxn+an−1xn−1+⋯+a1x+a0p(x)=anxn+an−1xn−1+⋯+a1x+a0 be the characteristic polynomial of MM (whose roots are the eigenvalues of MM). Then, by the Cayley-Hamilton theorem, we have

anMn+an−1Mn−1+⋯+a1M+a0I=0.anMn+an−1Mn−1+⋯+a1M+a0I=0.

If M−1M−1 exists, then

anMn−1+an−1Mn−2+⋯+a1I+a0M−1=0anMn−1+an−1Mn−2+⋯+a1I+a0M−1=0

so

M−1=−1a0(anMn−1+an−1Mn−2+⋯+a1I).M−1=−1a0(anMn−1+an−1Mn−2+⋯+a1I).

Note that M−1M−1 exists if and only if a0≠0a0≠0. Since a0=(−1)ndet(M)a0=(−1)ndet(M), this is equivalent to stating the well-known result that M−1M−1 exists if and only if det(M)≠0det(M)≠0.

25.5K views

View 36 upvotes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant