Questions tagged [eigenvalues]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
36
votes
2answers
886 views

Eigenvalues broken in Version 12.0

Bug introduced in 12.0. The following code calculates the eigenvalues of a certain complex matrix, which come in pairs of opposite complex numbers. Therefore one can check whether the sum of all ...
32
votes
1answer
1k views

Complex eigenvalues from a sparse Hermitian matrix

Bug introduced in 9.0 or earlier and persisting through 12.0. I notice in the following example that wrong complex eigenvalues are resulted if calculating from a Hermitian sparse matrix, which should ...
22
votes
1answer
1k views

Eigenvalues broken in 11.2?

Bug introduced in 11.1.0 and fixed in 11.3.0 The code ...
17
votes
7answers
1k views

How to check if a vector is an eigenvector of a matrix using mathematica?

Here is a vector $$\begin{pmatrix}i\\7i\\-2\end{pmatrix}$$ Here is a matrix $$\begin{pmatrix}2& i&0\\-i&1&1\\0 &1&0\end{pmatrix}$$ Is there a simple way to determine ...
16
votes
8answers
870 views

Tracking Eigenvalues Through a Crossing

Suppose I have a matrix which depends on some parameter. I want to compute the eigenvalues as a function of this parameter, and then plot them. For example, I may have a matrix representing the ...
15
votes
0answers
442 views

Wrong eigenvalues from a sparse matrix

Bug introduced after 5.0, in or before 8.0 and persisting through 12.0. I notice in the following example that wrong smallest 2 eigenvalues are resulted if calculating from a sparse matrix. But it ...
13
votes
3answers
833 views

An ODE system easily polluted with spurious eigenvalues

I tried solving the eigenvalue problem of a 1st-order ODE system (see the code below) with NDEigenvalue. (One option I found in it seems to be ...
13
votes
1answer
247 views

Specifying initial vector for finding Eigenvectors using Arnoldi method

I am trying to speedup the calculation of eigenvalues, given that I have good guesses for the eigenvectors. From what I know of Arnoldi/Lanczos, my good guesses should be helpful. Unfortunately, I am ...
12
votes
6answers
704 views

Solving this challenging ODE

Consider the ODE: $$w^{(4)}(x) + (L-x)w''(x) - w'(x) = 0 $$ with some of the following boundary conditions: free: $w'' = 0$, $w'''=0$, clamped: $w = 0$, $w'=0$, pivot: $w = 0$, $w''=0$. Two such ...
11
votes
2answers
372 views

Making an interactive visualization of the eigenvectors of two-dimensional matrices

I've recently stumbled upon this very nice interactive visualization of eigenvectors of two-dimensional matrices, and how powers $A^k$ act on various vectors. How can this sort of visualization be ...
11
votes
0answers
657 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 ...
10
votes
1answer
5k views

Mathematica won't give eigenvectors but Wolfram Alpha will? What am I doing wrong?

If I ask Mathematica to find the eigenvectors and eigenvalues of the matrix: ...
10
votes
1answer
568 views

Nonlinear ODE eigenvalue problem

How does one find eigenvalues $\lambda$ of the following problem? $$ \frac{\mathrm{d}^2 u}{\mathrm{d}x^2} = \lambda \left( -u + u^2 \right),$$ $$ u(0) = u(1) = 0. $$ Can this be tackled by ...
9
votes
5answers
372 views

NDEigenvalues vs. FindRoot for finding the eigenvalues of Airy equation?

Say I am trying to find the first 5 eigenvalues of the differential equation $f''(x)=\lambda x f(x)$, on the interval [-1,0], with boundary conditions $f(-1)=f(0)=0$. I will try to do this 3 ways, ...
9
votes
1answer
330 views

How to solve this 2nd-order ODE with singularity?

I tried solving the eigenvalue problem of a 2nd-order ODE $$[b^2(k-2)^2y^2-2b(k-2)(1+2ky)+4k^2+b^2(k-2)3y]f(y) \\- 3b(3by-2)f'(y)\\-(3by-2)^2f''(y)=\lambda f(y)$$ with ...
9
votes
1answer
275 views

Gaining precision/accuracy with NDEigenvalues

See further down for an important note Background I study (one component of) the semi-classical Pauli operator, $$ P_h=-h^2\Delta+ih(-y,x)\cdot\nabla+\frac{x^2+y^2}{4}-h. $$ For this particular ...
8
votes
1answer
542 views

Finding Eigenvalues for a boundary value problem

I have a 10x10 linearized BVP which I can write as $$\mathbf{y}'(x) = \mathbf{A}(\omega) \mathbf{y}(x)$$ subject to boundary conditions $$\mathbf{B} \cdot \mathbf{y} = \mathbf{0}, \quad x=0 \\ \mathbf{...
8
votes
0answers
269 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) ...
7
votes
3answers
554 views

How to set interface conditions for optical waveguide in NDEigensystem?

I have been working on waveguide mode analysis using FEM in Mathematica for a week, but I haven't succeeded until now. The optical fiber-like waveguide is featured with different refractive index in ...
7
votes
5answers
495 views

Spectral problem for differential operator

I want to find numerically eigenvalue and eigenfunctions some nontrivial differential operator. But I can not find, how to do it in Mathematica. For the sake of simplicity let us discuss the trivial ...
7
votes
2answers
286 views

Analytic solution to Orr-Sommerfeld-Squire equations for a special case

Hello everybody in Mathematica SE. Although my question is related to flow stability analysis, this should be a general application of MMA to solve a system of ODEs. Thank you for your suggestion! ...
7
votes
1answer
519 views

Solving the Schrödinger Equation by exact diagonalization

I am solving the Schrödinger equation via finite difference, via the substitution where we are assuming $V_1 = V_N = \infty$. I solved this using Mathematica for the case that $V(x) = 0$ and get the ...
7
votes
2answers
677 views

Calculating smallest eigenvalues by real part using Arnoldi method

Bug introduced in 8.0 or earlier and persisting through 11.3 According to the documentation, Eigenvalues[m,k] gives the first ...
7
votes
1answer
128 views

How to solve this 1st-order linear ODE system with a few discrete eigenvalues?

I am trying to solve the eigensystem of a 1st-order linear ODE system in the region $(-\infty,\infty)$ and with Dirichlet boundary condition at the infinities $$ -i\partial_xu(x)+f^*(x)v(x)=\lambda u(...
6
votes
2answers
357 views

Using NDEigensystem to solve the Mathieu equation

To be able to apply the differential equation capabilities of Mathematica to my graduate thesis, I am trying to apply NDEigensystem to an eigenproblem whose solution I know, but I am having some ...
6
votes
1answer
107 views

NDEigenvalues complains not Hermitian with large dimension differential operator

The following snippet calculates eigenvalues and eigenfunctions of a null operator (just as an example): ...
6
votes
1answer
191 views

Eigensystem returns vectors which are not eigenvectors

Short synopsis: for a specific family of sparse matrices, the eigensolver seems to be unstable (kernel quitting) for certain examples, and when it works it seems to consistently return vectors which ...
6
votes
2answers
163 views

Solving eigenvalue BVP with an interface

I have a boundary-value problem, that is defined over two adjacent regions with an interface in the middle, that contains an eigenvalue $\lambda$. The boundary conditions and the equations are ...
6
votes
1answer
438 views

NDSolve eigenvalue problem of bound state

I am trying to solve this eigenvalue problem: \begin{align} \mu \Psi(r) & = -\frac{1}{2}\left ( \Psi^{\prime \prime}(r) + \frac{2}{r} \Psi' (r)\right ) -4\pi \Psi(r) \int _0^\infty dr' r'^2 \frac{...
6
votes
1answer
450 views

NDEigensystem for structural vibration

Having installed version 11 I thought I would check an old Stack Exchange vibration problem using NDEigensytem. The old problem was Test a wooden board's vibration mode and I think this was before ...
6
votes
2answers
126 views

Inconsistency in eigenvalues of matrices in a specific form (sparse & non-Hermitian)

Suppose one has a non-Hermitian sparse matrix defined as below ...
6
votes
2answers
202 views

Unable to evaluate Eigenvalues and Eigenvectors for a matrix

I have the following 3X3 matrix M and I wish to find its eigenvectors and eigenvalues ...
6
votes
0answers
63 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{...
5
votes
2answers
895 views

Noise in Eigenvalues plot

I am trying to Plot Eigenvalues of a Hamiltonian, but I am getting noisy plot, which is incorrect. Here is the code. ...
5
votes
2answers
147 views

Lowest Magnitude Eigenvalues of Large Sparse Matrices

I am trying to find the first three lowest eigenvalues of large sparse matrices of size range $10^3 - 10^5$. The matrices depend on some parameter $x$, so I first construct the matrices and then use ...
5
votes
2answers
113 views

How to show just one function from a stored plot?

Q: Is there a general way to remove particular functions from a previously stored call to a plot function? Here is a specific example: ...
5
votes
1answer
146 views

Finding the orthogonal diagonalizing similarity of a symmetric matrix

I'm aware that there are some questions similar to this here, but none that could solve my problem. So, I have to diagonalize a symmetric symbolic matrix $m$ (to be seen below) and obtain the ...
5
votes
1answer
575 views

How to plot the eigenvalues of a parametric matrix efficiently?

I was wondering how can I set the variable type of matrix elements to be real. The problem is, I creat a variable-dependent matrix as follows and I get the eigenvalues now I want to plot the ...
5
votes
1answer
361 views

How to plot complex eigenvalues of a matrix?

I have a matrix , for instance, like this : matrix[a_ ] := {{0, a}, {-a, 1}}; Eigenvalues[matrix[a]] and this give the eigenvalues that depends on ...
5
votes
1answer
239 views

How to specify both DirichletCondition and NeumannValue on DEigenvalues?

Ok, I give up :) I am trying to verify the eigenvalues for heat PDE in 1D, when left end has homogeneous DirichletCondition but the right end is insulated, so it ...
5
votes
1answer
135 views

Speed up selecting positive eigenvalues repeatedly

I have a smallish (e.g. 2x2 or 4x4, but ideally up to 10x10) non-symmetric square matrix $\mathbf{A}(x)$. I need to define a function $f(x)$ which is the sum of the eigenvalues with positive real part ...
5
votes
1answer
256 views

Eigenvalues of large symmetric matrices

When I try to compute the eigenvalues of the adjacency matrix of a very large graph I get, what can be charitably described as, garbage. In particular, since the graph is four-regular, the eigenvalues ...
5
votes
1answer
140 views

How to control DifferenceOrder in NDEigenvalue for an ODE?

I am trying to solve the eigenvalue problem of a 1st-order ODE system using NDEigenvalue. It should be finite difference method for ODE. And I want to tune the the ...
5
votes
1answer
434 views

How to use DEigensystem with periodic boundary conditions on the derivative?

Since I found I can use DEigensystem to obtain eigenvalues and eigefunctions for differential operators, I am using it to verify solution to some of my HW's. In ...
5
votes
2answers
189 views

Checking if a symbolic symmetrical Matrix is negative definite

I have the following problem finding the value ranges for the parameters of a symbolic symmetrical matrix in order to make it negative definite: The matrix I'm talking about looks as follows ...
5
votes
1answer
109 views

Coloring specific set of points in a plot

I have a large set of points.I get two bands of points in the graph which merge upon choosing suitable value of the parameters E1 and E2. My question is how to color these two sets of points ...
5
votes
1answer
69 views

How to change the default normalization for NDEigensystem?

I'm currently using NDEigensystem to solve a PDE that describes a particle travelling on a hyperbolic (negatively curved) surface. However, the eigenfunctions that are returned by NDEigensystem are ...
5
votes
0answers
77 views

Bug for Cubics -> True in Eigenvalues?

Let's consider the simple code ...
4
votes
2answers
915 views

Two matrices that are not similar have (almost) same eigenvalues [closed]

I have two matrices $$ A=\begin{pmatrix} a & 0 & 0 \\ 0 & b & 0 \\ 0 & 0 & c \end{pmatrix} \quad \text{ and } \quad B=\begin{pmatrix} d & e & f \\ d & e &...
4
votes
2answers
437 views

Eigenvalues and eigenvectors of tensors

I have a linear equation where the unknown is a matrix: $$\sum_{pq} T_{ijpq}X_{pq} = \lambda X_{ij}$$ This is an eigenvalue problem for the tensor $T_{ijpq}$. Mathematica ...