This package computes derivatives of arbitrary order for a parametric eigenvalue problem with respect to a single scalar variable.
Consider a parametric square matrix
At a given point
The package can be installed using Julia's REPL
julia> import Pkg
julia> Pkg.add(url="https://github.com/ykkan/DEigen.jl.git")
or with Pkg mode (hitting ]
in the command prompt)
pkg> add https://github.com/ykkan/DEigen.jl.git
Assume that we want to evaluate the derivatives of all eigenvalues and all eigenvalues for the matrix below at
using DEigen
# A0 = A(1), A1 = A'(1), A2 = A''(1)
A0 = [1.0 1.0;
1.0 2.0]
A1 = [1.0 0.0;
0.0 0.0]
A2 = [0.0 0.0;
0.0 0.0]
values_list, vectors_list = deigen(A0, A1, A2)
#=
DEigen{Float64, 2}
values_list:
2×3 Matrix{Float64}:
0.381966 0.723607 -0.178885
2.61803 0.276393 0.178885
vectors_list:
2×2×3 Array{Float64, 3}:
[:, :, 1] =
-0.850651 0.525731
0.525731 0.850651
[:, :, 2] =
0.105146 0.17013
0.17013 -0.105146
[:, :, 3] =
-0.0259936 0.110111
-0.0420585 -0.0680521
=#
The deigen
function return an object of type DEigen{Float64, 2}
. This obeject can be unpacked to into a tuple of two variables values_list
and vectors_list
.
The variable values_list
stores all
and the variable vectors_list
stores all
One can also choose to compute the derivatives of only selected eigenvalues and eigenvectors.
using DEigen
# A0 = A(1), A1 = A'(1), A2 = A''(1)
A0 = [1.0 1.0;
1.0 2.0]
A1 = [1.0 0.0;
0.0 0.0]
A2 = [0.0 0.0;
0.0 0.0]
values0, vectors0 = eigen(A0)
# the indicies for the selected eigenvalues and eigenvectors
selected_ind = 1
values_list, vectors_list = deigen(values0[selected_ind], vectors0[:,selected_ind], A0, A1, A2)
#=
DEigen{Float64, 2}
values_list:
1×3 Matrix{Float64}:
0.381966 0.723607 -0.178885
vectors_list:
2×1×3 Array{Float64, 3}:
[:, :, 1] =
-0.8506508083520399
0.5257311121191335
[:, :, 2] =
0.10514622242382668
0.17013016167040795
[:, :, 3] =
-0.025993575698632487
-0.042058488969530655
=#
In this case, we select values_list
stores all
and the variable vectors_list
stores all
T. Mach and M. A. Freitag, Solving the Parametric Eigenvalue Problem by Taylor Series and Chebyshev Expansion, preprint (2023) (https://arxiv.org/pdf/2302.03661)