如何在python中解决多项式特征值? [英] How to solve the polynomial eigenvalue in python?

查看:70
本文介绍了如何在python中解决多项式特征值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的python代码中,我想解决多项式特征值问题:

In my python code, I would like to solve the polynomial eigenvalue problem:

A0 + lambda*A1 + lambda^2*A2 + lambda^3*A3 + .... = 0

其中 An 是密集矩阵,而 lambda 是常数.在Matlab中,可以使用 polyeig函数.似乎scipy中没有等效的功能.到目前为止,我能想到的唯一方法是形成相应的伴随矩阵.这创建了一个等效的线性特征值问题,可以将其提供给现有的 scipy 求解器,但是它要大得多,我相信它可能是病态的.

where An are dense matrices, and lambda is a constant. In matlab it is possible to solve this problem using the polyeig function. It seems that there is no equivalent functionality in scipy. So far the only way I can think to do it is to form the corresponding companion matrix. This creates an equivalent linear eigenvalue problem which can be given to existing scipy solvers, however it is much larger and I believe it can be quite ill-conditioned.

任何人都可以建议一个可以解决此问题的现有开放源代码或免费提供的库吗?我对可以通过 f2py 或 C/C++ 库链接到 cython 的 fortran 库感到非常满意.

Can anyone suggest an existing, open source or freely-available library which can solve this problem? I'd be quite happy with a fortran library which could be linked via f2py or C/C++ library to link via cython.

对于有兴趣解决python中非线性本征值问题的任何人,可以找到我写的解决该问题的代码

For anyone interested in solving nonlinear eigenvalue problems in python, the code I wrote myself to solve this problem can be found here. Note that I deal with the more general case of a nonlinear eigenvalue problem (in the sense that it has a nonlinear dependence on lambda). To understand the method, please read the paper mentioned in the code comments.

推荐答案

This discussion points to a general method for turning a polynomial eigenvalue problem into a generalized eigenvalue problem, which can later be solved using scipy's linear algebra functions. Hope this helps!

这篇关于如何在python中解决多项式特征值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆