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
11 votes
1 answer
6k 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: ...
DJBunk's user avatar
  • 683
9 votes
1 answer
1k 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{...
SPPearce's user avatar
  • 5,613
6 votes
2 answers
506 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 ...
SPPearce's user avatar
  • 5,613
45 votes
4 answers
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 ...
xiaohuamao's user avatar
  • 4,698
7 votes
1 answer
706 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 ...
Hugh's user avatar
  • 16.1k
22 votes
8 answers
2k 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 ...
Jack S's user avatar
  • 323
7 votes
1 answer
851 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{...
Boson Bear's user avatar
4 votes
2 answers
455 views

Efficiently find all values of parameter such that any of the eigenvalues of a matrix is equal to 1

I wish to find all values for a parameter such that my matrix has an eigenvalue of 1. Here is an example 16-by-16 matrix with elements depending on the parameter x ...
Trock's user avatar
  • 53
3 votes
1 answer
188 views

The algebraic solution and numerical solutions for eigenvectors are different. Why?

I find that the algebraic solution for the Eigenvectors of a 3x3 matrix is not correct when compared to the numerical solution. I don't see why ? ...
stéphane Supplisson's user avatar
3 votes
1 answer
238 views

Unbounded solution at boundaries with few combination of values in this BVP solution

I had asked a question here regarding solution to a BVP problem. bbgodfrey provided an excellent answer using the method of integrated least squares. However, for a few specific set of values of ...
Avrana's user avatar
  • 297
12 votes
3 answers
2k 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 ...
yulinlinyu's user avatar
  • 4,795
9 votes
1 answer
655 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 ...
mickep's user avatar
  • 487
8 votes
2 answers
2k 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 ...
tparker's user avatar
  • 1,766
29 votes
2 answers
1k views

Wrong eigenvalues from a sparse matrix

Bug introduced after 5.0, in or before 8.0 and persisting through 13.3. I notice in the following example that wrong smallest 2 eigenvalues are resulted if calculating from a sparse matrix. But it ...
xiaohuamao's user avatar
  • 4,698
9 votes
2 answers
2k 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 ...
Hugh's user avatar
  • 16.1k
8 votes
2 answers
484 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} & -\...
Hosein Rahnama's user avatar
3 votes
1 answer
389 views

Eigenvalue dependent boundary conditions- mathematica

I am dealing with an eigenvalue problem whose boundary conditions are also eigenvalue dependent. Could anyone please comment whether Mathematica can numerically solve such a problem? For boundary ...
Bindesh Tripathi's user avatar
3 votes
1 answer
407 views

Discontinuities in eigenvalues plotting with Plot3D

I have a 6x6 matrix, depending on 2 variables kx and ky and defined as the sum of the two following matrices (...
Castou's user avatar
  • 31
3 votes
2 answers
552 views

Why ODE's naive finite difference matrix works well for different boundary conditions

We know finite difference method (FDM) can replace $y''(x)$ as $\frac{1}{h^2}[y(x+h)+y(x-h)-2y(x)]$ or so. The naive way to write down the matrix of the differential operator is like the following, ...
xiaohuamao's user avatar
  • 4,698
2 votes
1 answer
325 views

Small positive eigenvalues found for a negative definite matrix

I have encountered a problem with Mathematica that I really don't know how to solve. I'm sorry if I am going to be very verbose but I need it to explain the problem properly (and also make the code I'...
LPM's user avatar
  • 21
2 votes
1 answer
269 views

Eigenvalue problem

my question is about solving an eigenvalue problem of the Helmholtz equation using sinc approximation $\nabla^2E + V (x) = \lambda E$ and $V(x)= X^2 / 2$ I have a problem in calculating the ...
Mohamed Raafat's user avatar
1 vote
0 answers
503 views

Finding eigenvalues of a differential operator

I am trying to get the eigenvalues of the following differential operator $$L\psi(r) = -f \partial_r (f \partial_r \psi(r)) + V \psi(r)$$ which must satisfy (obviously) $$L \psi(r) = \omega^2 \psi(...
Edison Cesar's user avatar
0 votes
1 answer
114 views

Filter out eigenvalues in NDEigenfunction [duplicate]

I am going to solve TISE for logarithmic potential in two dimensions. For bound state solution, the energy eigenvalues are to come negative. This is my code: ...
user157588's user avatar
19 votes
2 answers
673 views

Library for FEAST method is missing

Mathematica (V 12.3.1, Native Mac M1 version) is not letting me use the FEAST method for solving eigenvalue problems. For example, ...
user99x's user avatar
  • 331
13 votes
6 answers
1k 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 ...
anderstood's user avatar
  • 14.2k
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
11 votes
2 answers
1k 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 ...
glS's user avatar
  • 7,543
10 votes
2 answers
1k 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 ...
Matthew Brunetti's user avatar
10 votes
1 answer
290 views

Inconsistent behaviour between Active and Inactive forms of PDEs (finite element method)

Bug introduced in 13.0 or earlier and fixed in 13.1.0 I have been using the finite element tools in Mathematica version 13.0 to solve eigenvalue problems in physics (Schrödinger equation) using ...
user404736's user avatar
9 votes
1 answer
238 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): ...
atbug's user avatar
  • 685
7 votes
5 answers
751 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 ...
Peter's user avatar
  • 205
7 votes
2 answers
2k 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 ...
kowalski's user avatar
  • 385
6 votes
2 answers
18k views

How to normalize a list of eigenvectors?

Here is a simple eigenvector problem solution m = {{2, Sqrt[15]}, {Sqrt[15], 4}}; v = Eigenvectors[m] However, the list of vectors v is not normalized. The ...
Jim Napolitano's user avatar
6 votes
2 answers
985 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. ...
Muhammad Imran's user avatar
5 votes
1 answer
886 views

Finding the eigenvalues (diagonalizing) of a block-diagonal matrix

I have a large $2^N \times 2^N$ matrix. It is the exact Hamiltonian of a spin chain model which I have generated with code I wrote in Fortran. The code block diagonalizes the Hamiltonian into constant ...
Kai's user avatar
  • 2,079
5 votes
1 answer
211 views

Using/ Extracting data from Interpolating Functions returned from NDEigensystem

I am relatively new to Mathematica and have been trying to use the NDEigensystem command to work with some quantum systems. I am able to get the accurate energy eigenvalues but am having problems with ...
rahul menon's user avatar
5 votes
2 answers
371 views

How to ListContourPlot an eigenvalue spectrum without jumping?

MWE: ...
Steve's user avatar
  • 1,153
5 votes
2 answers
946 views

NDEigensystem and radial function equation for Hydrogen atom

I'm trying to numerically solve the radial equation for the 3D hydrogen atom problem, i.e., to find $R(r)$ which satisfies: $$ -\frac{\hbar^2}{2m}\left[\frac{1}{r}\frac{d}{dr}\left(r^2\frac{dR(r)}{dr}\...
Jorge Castaño's user avatar
4 votes
2 answers
618 views

Using NDEigensystem to solve coupled eigenvalue problem

I want to find the Eigenvalues and Eigenfunctions for the following Eigenvalue problem I tried to solve this numerically ...
OhmSweetOhm's user avatar
4 votes
2 answers
187 views

How to generate the 8^th order symmetric binary matrices whose sum of absolute eigenvalues is 8?

It is needed to generate all 8th order(8 by 8) symmetric binary matrices(of 0's and 1's) such that the sum of the absolute eigenvalues is 8. Listing all the 8th order symmetric binary matrices and ...
SPJ's user avatar
  • 117
4 votes
2 answers
440 views

How to return multiplicity of each eigenvalue?

I could not find the information so maybe someone know if it possible. I have a matrix which has several degenerated eigenvalues and I would like Mathematica to return the multiplicity of each ...
Kawette's user avatar
  • 73
4 votes
2 answers
1k views

How to collect eigenvectors corresponding to only positive eigenvalues?

Let us consider a matrix of order $n \times n$ with $n/2$ positive and $n/2$ negative eigenvalues. How to collect $n/2$ eigenvectors corresponding to positive eigenvalues in a matrix of order $n \...
atanu's user avatar
  • 353
4 votes
1 answer
420 views

Numerically computing the eigenvalues of an infinite-dimensional tridiagonal matrix

I have one infinite dimensional tridiagonal matrix whose eigenvalues I have to compute. How can that be done numerically using Mathematica? Let me expose the concrete case I want to do it. I shall ...
user1620696's user avatar
4 votes
1 answer
95 views

NIntegrate over eigenfunctions found using NDEigensystem

...
user84456's user avatar
  • 1,554
3 votes
1 answer
144 views

Evaluating Hough functions by using NDEigensystem on the Laplace tidal equation

Currently I am looking into the use of Mathematica to solve the classical tidal equation of M. Laplace: $$\mathcal{F}\Theta+\gamma\Theta=0$$ whose eigenfunctions $\Theta$ are the Hough functions. ...
今井神流's user avatar
3 votes
0 answers
89 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
3 answers
609 views

Solving a Sturm-Liouville problem

Ello, I would like to reproduce the analytical solution of the following eigenvalue problem, or at the least confirm them numerically (especially the eigenvalues): $$ - \frac{1}{2} y^{\prime \prime} ...
Smerdjakov's user avatar
3 votes
2 answers
186 views

How to integrate product of eigenfuctions found using NDEigensystem?

...
user84456's user avatar
  • 1,554
3 votes
2 answers
267 views

Checking NDEigensystem Results

I'm looking to verify the output of a call to NDEigensystem. I'm doing this by plotting the operator acting on the Interpolating Function outputs versus the ...
Misha's user avatar
  • 115
2 votes
1 answer
950 views

How can I tell if a matrix is ill-conditioned or Singular by using the Eigensystem function(or LUDecomposition)?

I'm using the Eigensystem function, and I'm trying figure out whether or not it is singular or ill-conditioned. I'm using the function as so: ...
Jaigus's user avatar
  • 257