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.

Filter by
Sorted by
Tagged with
43
votes
4answers
2k views

Eigenvalues broken in Version 12.0

Bug introduced in 12.0 and fixed in 12.1 The following code calculates the eigenvalues of a certain complex matrix, which come in pairs of opposite complex numbers. Therefore one can check whether ...
34
votes
1answer
2k 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 ...
23
votes
1answer
601 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 ...
22
votes
1answer
1k views

Eigenvalues broken in 11.2?

Bug introduced in 11.1.0 and fixed in 11.3.0 The code ...
20
votes
8answers
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 ...
18
votes
8answers
1k 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 ...
13
votes
6answers
798 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 ...
13
votes
3answers
882 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
311 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
0answers
853 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 ...
11
votes
2answers
513 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
3answers
793 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 ...
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
917 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 ...
10
votes
2answers
873 views

NDEigensystem cannot solve numerically the 3D Coulomb problem, while DSolve returns the right answer

After having derived by hand the eigenvalues and eigenfunctions for the 3D and 2D hydrogen atom, I want to solve the systems numerically using Mathematica. I need to do this because my next step is to ...
9
votes
5answers
510 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
659 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{...
9
votes
2answers
1k views

How do you find the eigenvalues of a PDE (Dynamic Euler-Bernoulli beam)?

I am continuing to work on the vibration of a beam modeled by the Euler-Bernoulli equation. I have had some good answers to simulating the motion which may be found here. Now I wish to calculate the ...
9
votes
2answers
494 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! ...
9
votes
1answer
352 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
344 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
715 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 ...
8
votes
1answer
155 views

Fast method to calculating signature of a matrix

For calculation of the topological properties of a hamiltonian, sometimes we need the signature of that matrix. This means we only need number of positive eigenvalues. One simple way is to first ...
8
votes
1answer
150 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): ...
8
votes
0answers
296 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
5answers
565 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
296 views

Solving a biharmonic eigenvalue Problem

I am interested in solving the following biharmonic eigenvalue problem. $$\begin{array}{cccc} & \Delta ^2 \Psi (x,y) = \lambda \Psi (x,y), & - \frac{\pi}{2} \le x \le \frac{\pi}{2} & -\...
7
votes
1answer
140 views

Sensitivity analysis of parameter on eigenvalues of predator-prey model

I am trying to do a sensitivity analysis of the parameter g on the eigenvalues of this simple predator-prey Lotka Volterra model. I know that this code is entirely ...
7
votes
2answers
936 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
175 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(...
7
votes
0answers
112 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, ...
7
votes
0answers
92 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 ...
6
votes
3answers
159 views

Numerical eigenvalues of the problem

I have this equations with condition 0 <= x <= 1: ...
6
votes
2answers
932 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. ...
6
votes
2answers
435 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
258 views

Solve an ODE with parameters in a boundary condition

Consider the ODE: ode = y''''[x] - 2*k^2*y''[x] + k^4*y[x] == I*k*a*((2*x - x^2 - c)*(y''[x] - k^2*y[x]) + 2*y[x]); in which a...
6
votes
1answer
591 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 ...
6
votes
1answer
128 views

Which methods are available for NDEigensystem?

I am trying to find out what methods/options are available for NDEigensystem and descriptions of their use. Perusing the help, online Q&As, Mathematica's in-...
6
votes
1answer
327 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
234 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
534 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
506 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
1answer
586 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 ...
6
votes
2answers
147 views

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

Suppose one has a non-Hermitian sparse matrix defined as: ...
6
votes
2answers
383 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
68 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
381 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
526 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 ...
5
votes
2answers
132 views

Eigenvalues of a fourth-order ODE

Consider the following ODE for $y(x)$ over $x\in\left[0,\frac{1}{2}\right]$ with an eigenvalue $\lambda$ $\qquad 2x\,y''''+ 4y'''=\lambda\, y''$ The boundary conditions at $x=\frac{1}{2}$ are $y'\...
5
votes
2answers
122 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: ...

1
2 3 4 5 6