Solve with absolute value

24 ビュー (過去 30 日間)
sarah pabst
sarah pabst 2019 年 8 月 4 日
編集済み: John D'Errico 2019 年 8 月 4 日
I've got a problem with the solve operator. I create a syms l and calculate the eigenvalues of a matrix (given by the H(app,l)-function) depending on l.
syms l;
[~,D] = eig(H(app,l));
I get the correct results when calculating
S = solve(D(1,1) == D(2,2),l);
but no results at all when trying
S = solve(abs(D(1,1))==abs(D(2,2)),l);
even though the solutions I've calculated in the first try should solve the second one, too. When debugging and trying with the consol I get the error message "Warning: Unable to solve symbolically. Returning a numeric solution using vpasolve.". Does anyone know a solution?

採用された回答

John D'Errico
John D'Errico 2019 年 8 月 4 日
編集済み: John D'Errico 2019 年 8 月 4 日
Once you introduce that absolute value into the problem, you make it sufficiently nonlinear that no analytical solution can exist. Solve told you that. So it used vpasolve instead.
Wanting an analytical solution to exist when none exists is not going to make it happen.
This is similar to wanting to solve for the roots of a general 5'th degree polynomial. You can use vpasolve to get them numerically. But there will be no analytical solution to the general 5th degree problem, and that is provably true. So even though the roots do exist, solve can never find them, because solve is not a numerical solver. (Solve can solve SOME 5th degree polynomials, but not the general case.) It is the same thing as what you want to do.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by