Questions tagged [eigenvalues]

Questions on symbolically or numerically determining the eigenvalues of matrices (Eigenvalues, Eigensystem) or differential equations (DEigenvalues, DEigensystem, NDEigenvalues, NDEigensystem) in Mathematica. Also includes determining the eigenvalues of differential equations with DSolve or NDSolve.

111 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
13 votes
0 answers
1k views

What algorithm is Mathematica using to find the smallest eigenvalue so quickly?

My question is what kind of black magic is Mathematica doing to obtain the correct answer so quickly compared to other programming languages? Details: I've written a Mathematica notebook to find the ...
Daniel Walsh's user avatar
8 votes
0 answers
559 views

Numeric Solution Hydrogen Atom

I'm trying to solve the Schrödinger equation for the hydrogen atom without made the variable separation of the polar and radial coordinate. It is my test code to extrapolate to another system with its ...
Jorge Castaño's user avatar
8 votes
0 answers
341 views

DEigenvalues and NDEigenvalues return different values

In the following example, DEigenvalues and NDEigenvalues return different results despite having identical arguments. Does anyone know why? (I use Mathematica 11.3) ...
banone's user avatar
  • 728
7 votes
0 answers
268 views

How to compute eigenvalues of linear function (not matrix)?

How to compute eigenvalues of a known linear function? In Julia, there is a package https://jutho.github.io/LinearMaps.jl/dev/ to compute the matrix representation of given function, then we can ...
swish47's user avatar
  • 123
7 votes
0 answers
132 views

Differing behavior of Eigenvalues and Eigensystem

With the update to v12.0, I seem to be getting different behavior of eigenvalues returned by Eigenvalues and Eigensystem (oddly, ...
erfink's user avatar
  • 1,089
7 votes
0 answers
167 views

Memory usage for smallest eigenvalues

I have a bunch of hermitian matrices which are huge (of order 2^17 x 2^17) but extremely sparse so that, when I build the matrices, the usage of RAM is low (say of order 1 GB or similar). The ...
Dario Rosa's user avatar
6 votes
0 answers
157 views

Solving a matrix pencil (quadratic eigenvalue) problem with Mathematica

According to Wikipedia The matrix pencil of degree $\ell$ is the matrix-valued function defined on the complex numbers $L(k) = \sum_{i=0}^{\ell} k^{i} A_{i}$. Here $A_{\ell}$ are non-zero $n\times n$...
Rob's user avatar
  • 423
6 votes
0 answers
110 views

Does current Mathematica capability allow solving PDEs (e.g. reaction diffusion equation) over surface of a mesh or surfaces

I came across this nice paper (https://arxiv.org/pdf/1605.01583.pdf) where the authors simulated a reaction diffusion system over the surface of a gecko, primarily to understand how various patterns ...
Ali Hashmi's user avatar
  • 8,860
6 votes
0 answers
80 views

Where is the mistake in computing the particular eigenvector of the following DFT Matrix?

I have the following matrix (the DFT Matrix for N = 3) $$W = \frac{1}{\sqrt{3}}\begin{pmatrix} 1 & 1 & 1 \\ 1 & e^{-\frac{i 2 \pi}{3} } & e^{\frac{i 2 \pi}{3} } \\ 1 & e^{\frac{...
Sotiris's user avatar
  • 116
5 votes
0 answers
100 views

Effectivelly using Compile for calculate a Unitary transformation

I am new to Mathematica, and this is my first post, so if my question is not clear enough, I would be glad to read the comments and edit my question to add more information. The problem I need to ...
LUCAS FREITAS's user avatar
5 votes
0 answers
315 views

Spectral problem for differential vector operator (calculation of EM field in a cavity)

I know that mathematica has a DEigensystem and NDEigensystem which allow one to find eigenfunction and ...
Peter's user avatar
  • 205
5 votes
0 answers
109 views

Bug for Cubics -> True in Eigenvalues?

Let's consider the simple code ...
Giancarlo's user avatar
  • 712
5 votes
0 answers
351 views

How to verify the convexity of a function?

I have an optimization problem with the following objective function in $(x,y)$ $$ A\log \left(\sum_{i=1}^n x_i\right)+\log\left(1-\frac{f}{n}\left(\sum_{i=1}^n\frac{x_i}{y_i}\right)\right) $$ where $...
user_lambda's user avatar
4 votes
0 answers
113 views

Efficiently calculating half of the eigenvectors of a sparse array

Eigenvectors of a sparse array $\quad$ Problem statement I want to calculate the eigenvectors corresponding to the negative eigenvalues of an $8L^2 \times 8 L^2$ matrix ($L \sim 30 )$. Most of the ...
Lucas Freitas's user avatar
4 votes
0 answers
105 views

How to use NDEigenvalue to accurately estimate functional determinants?

Goal: Ultimately, I would like to find a trustworthy approximation for the ratio of the functional determinant of two differential operators using the formula $$ \frac{\text{Det}[\hat{D}_0]}{\text{Det}...
incoherent_state's user avatar
4 votes
0 answers
171 views

Finding matrix in Krylov subspace (Lanczos method)

The Lanczos method for finding the smallest eigenvalue of a hermiteian matrix $H$ is based on the construction of a vector subspace (Krylov space) where one can build a matrix $H_{Krylov}$ which is ...
Matteo's user avatar
  • 243
4 votes
0 answers
50 views

Difference in computation speed of Eigensystem not to expectation for ParallelTable and Table

I was trying to compute the time it takes for Eigensystem to evaluate while being inside a ParallelTable, as it is well-known LAPACK subroutine has an inbuilt Parallelization to it. And the difference ...
Roopayan Ghosh's user avatar
4 votes
0 answers
502 views

Orthogonal matrix decomposition of symmetric matrix?

If matrix mat is symmetric, we should be able to decompose it into eigenvalue matrix matJ and orthogonal matrix ...
Kagaratsch's user avatar
  • 11.9k
4 votes
0 answers
226 views

What real symmetric matrices of this type can Mathematica find symbolic eigenvalues for?

I'm working on a problem calculating symbolic eigenvalues of matrices that always have a very simple form: they are real and symmetric and usually sparse. They have two distinct symbolic parameters. (...
William Kennerly's user avatar
3 votes
0 answers
78 views

First few smallest eigenvalues of a large dense symmetric matrix

I construct a large (say 2000x2000) matrix M whose entries are real random variables drawn from a certain distribution. Most of these values will be nonzero, so <...
Davide Venturelli's user avatar
3 votes
0 answers
108 views

(Possibly bugs? ) Wrong results provided by `DEigensystem`

I was trying DEigensystem with the following code: ...
Jie Zhu's user avatar
  • 513
3 votes
0 answers
330 views

Chladni experiment verification

I refurbished my post in order to be more understandable. After computing simulations of Chladni patterns with Mathematica (see my previous topics), I finally went to practice. I realized my own ...
Pascal77's user avatar
  • 195
3 votes
0 answers
146 views

Derivative of eigenvalues

I work with 4x4 Hermitian matrices (r). I want to calculate a derivative of a function f[t,r] (ff[t_,r_]=1/2*D[f[t,r],t]), where the function f depends on the absolute value of the eigenvalues of r. ...
Agnieszka's user avatar
  • 667
3 votes
0 answers
84 views

Interface points of NDEigensystem

When solving an eigenvalue problem with "NDEigensystem", e.g. a 1D Eigenvalue problem with the interval composed of different materials, which should be solved by the pure numerical method such as FEM,...
Otto SturmGeschütz's user avatar
3 votes
0 answers
125 views

Antisymmetric Matrix Eigenvector Normalization

So, I have a complex $4n \times 4n$ antisymmetric matrix, $A$ and it has a non-degenerate spectrum. The matrix $A$ then has eigenvalues given by $$ \beta_{1}, -\beta_{1}, \beta_{2}, -\beta_{2}, ... , ...
user1058860's user avatar
3 votes
1 answer
341 views

1st-order linear ODE system gives inaccurate/biased solutions

Consider an ODE eigensystem $$ t(y+\frac{1}{s})a(y)+[(q+\frac{1}{2}+\frac{s}{2}y)+s(y\partial_y+\frac{1}{2})]b(y)=\lambda a(y)\\ t(y+\frac{1}{s})b(y)+[(q+\frac{1}{2}+\frac{s}{2}y)-s(y\partial_y+\frac{...
xiaohuamao's user avatar
  • 4,688
2 votes
0 answers
100 views

Z-eigenvalue problem

I am interested in solving an $N-$dimensional $Z-$eigenvalue problem, which schematically takes the following form $$ \sum_{b=1,c=1}^{N}T_{abc} X_b X_c=\lambda\,X_a\quad \text{with}\quad \sum_{a=1}^...
user12588's user avatar
  • 565
2 votes
0 answers
78 views

How to improve the efficiency of NIntegrate on complicated functions?

When solving a problem by Matlab and Mathematica both, I find the speed of NIntegrate are far less than dblquad when calling ...
swish47's user avatar
  • 123
2 votes
0 answers
73 views

OpenCL How to read and write to VRAM array

I am quite a newbie to OpenCLLink. My program needs to perform some heavy computations on GPU including solving the eigenvector problems. Since I didn't find a straightforward implementation of this ...
Kirill Vasin's user avatar
  • 1,077
2 votes
0 answers
221 views

What is the fastest way to get the lowest eigenvalue and corresponding eigenstate in Mathematica?

I tried to use the Arnoldi method to get the smallest eigenvalue and corresponding eigenstate for large matrix. However, Arnoldi did not give me the desired result: ...
lol's user avatar
  • 677
2 votes
0 answers
79 views

Determine a negative semidefinite 5*5 matrix

I'd like to find the real parameters $\left\{p,\alpha ,a_{24},c_3,c_7,c_9,c_{10}\right\}$ in $M$, which is a $5\times 5$ real symmetric matrix, such that $M$ is negative semidefinite. My code for $M$: ...
LCH's user avatar
  • 189
2 votes
0 answers
94 views

Parallel Matrix Manipulation: find eigenvalues and construct list

I'm having some trouble with the Parallel commands in Mathematica 12.1: I need to construct a table where its entries are {M, Eigenvalues of X[M]}, where X is a square matrix of dimension N with N big ...
Jorge Castaño's user avatar
2 votes
0 answers
120 views

How can I improve the speed of computing of numerical integration and eigenvalue?

First, let me explain what I am calculating. I have the following 2D-equation: $$ w(x,y) = \sum_{m}^{M}\sum_{n}^{N}A_{mn}\sin\left(\frac{2m\pi x}{a}\right)\sin\left(\frac{2n\pi y}{b}\right) $$ ...
Joaquim José da Silva Xavier's user avatar
2 votes
0 answers
67 views

Computing the first eigenfunction of the p-Laplacian in a real interval

How can I numerically compute the first (non-negative) eigenfunction $u$ of the $p$-Laplacian ($p>1$) in a bounded interval $(-a,a) \subset \mathbb R$ (up to positive multiplicative constant)? $$-\...
Hiro's user avatar
  • 21
2 votes
0 answers
71 views

What kind of performance should I expect out of Eigensystem using FEAST?

I'm numerically solving a time-independent Schrödinger equation using Eigensystem's FEAST method. It takes a lot longer than I ...
Diffycue's user avatar
  • 1,721
2 votes
0 answers
249 views

Block diagonalizing a complex anti-symmetric matrix

I am going to evaluate the block diagonal form of few skew-matrices. When matrix elements are real I can simply follow the approach suggested in this thread which I have implemented that as ...
Shasa's user avatar
  • 791
2 votes
0 answers
252 views

Boundary value problem, multiple dimensional shooting, coupled eigenvalue problem

Following the one dimensional boundary value problem here, I would like to understand the easiest way to solve a BVP for a coupled system. In the 1D case, BVP can be converted to an initial value ...
Boson Bear's user avatar
2 votes
0 answers
134 views

DEigenvalues with Robin B.C. sign problem

To find eigenvalues for $y''=\lambda y$ with robin boundary conditions on one end, and Dirichlet on the other end, I am getting correct value when robin B.C. on the right side, but when I flip things, ...
Nasser's user avatar
  • 135k
2 votes
0 answers
81 views

Eigenvector matrix of a real positive matrix to be from $SO(n)$. How?

Suppose I have a positive real matrix of dimension $n$ and as such there exists a diagonalizing (rotation) matrix that belongs to $SO(n)$. How do I force Eigensystem...
symplecton's user avatar
1 vote
0 answers
56 views

Eigenvectors of a matrix (Solving and Plotting)

Given a nxn matrix h[k] ...
Med Ch's user avatar
  • 105
1 vote
0 answers
33 views

Wrong eigenvalues for 2D QHO using DEigensystem[]

I try to solve 2D Quantum Harmonic Oscillator using DEigensystem[] in Mathematica 13.0. Here is my code: ...
ZDZ's user avatar
  • 11
1 vote
0 answers
82 views

Complex eigenvalue of a symmetric matrix

I am working on a eigenvalue problem. I am using Eigensystem However, I am facing issues when I change the input parameters: I get complex eigenvalues. I couldn't understand the reason although my ...
ayman zayed's user avatar
1 vote
0 answers
53 views

Finding the (symbolic) eigenvalues of a matrix with some assumption

I have the following 3$\times$3 symmetric matrix with symbolic entries. Meff = \begin{array}{ccc} 2 \beta \text{c12}^2 \text{c13}^2 \text{$\eta $11} \text{m1}+\alpha \text{c13}^2 \text{D31} \text{...
neuoscman's user avatar
1 vote
0 answers
71 views

Why does the minimum eigenvalue sharply decrease when the number of basis functions increases from 37 to 38 and more?

I have the following Hamiltonian: H = -1/2 * Laplacian -1/r - 2 * r/5 * (Exp[-r * 1.6] + Exp[-r * 3.1]) I'm trying to find the minimum eigenvalue of this Hamiltonian using the matrix method. As basis ...
Mam Mam's user avatar
  • 1,731
1 vote
0 answers
50 views

Calculating eigenvalues and solving inequalities with parameters

I would like to calculate b in terms of c and a, in order to satisfy the following conditions: ...
Wiki's user avatar
  • 11
1 vote
0 answers
28 views

Why does Sparsearray diagonalization by Krylov technique become slower for very large sizes?

Here is an example sparse matrix, taken from example Hamiltonian, which was a question I asked before in this forum. ...
Roopayan Ghosh's user avatar
1 vote
0 answers
203 views

Intel MKL ERROR: Parameter 2 was incorrect on entry to ZGEHD2

I have some code which is diagonalising very large random matrices, and storing certain statistical properties of their eigenvalues and eigenvectors. The code runs fine on my computer. When running it ...
ComptonScattering's user avatar
1 vote
0 answers
42 views

Eigenvalues broken for nonsymmetric matrices

It looks that eigensystem calculation can easily go broken with real nonsymmetric/general complex matrices. Here are two examples with the possibly complex spectra plotted in the complex plane. I'm ...
xiaohuamao's user avatar
  • 4,688
1 vote
0 answers
90 views

NDEigensystem solutions depend on how many solutions I ask for?

Background I am using NDEigensystem to solve the following eigenvalue problem: $$ \left( \begin{matrix} m&-i\partial_x \\ -i\partial_x & -m\end{matrix}\right) \left( \begin{matrix} u_u(x) \\ ...
Ivan's user avatar
  • 243
1 vote
0 answers
67 views

Strange behaviour of eigensystem

I encounter with really strange behavior in calculating the eigensystem of a hermitian matrix. I upload the matrix here. After loading it you can construct the main matrix as follows ...
Rasoul-Ghadimi's user avatar