Reversing an polynomial equation y = f(x) to x = f(y)

114 ビュー (過去 30 日間)
Hazem Elgabra
Hazem Elgabra 2012 年 5 月 13 日
編集済み: John D'Errico 2023 年 2 月 19 日
I'm trying to reverse a 3rd order equation using matlab, ie: y = x^3 + x^2 + x^1 + 5 to x = f(y) I just don't know if there's an already built it function in matlab for such a task.
Thank you...
  2 件のコメント
Khalid Alshumayri
Khalid Alshumayri 2023 年 2 月 19 日
Did you find anything ?
John D'Errico
John D'Errico 2023 年 2 月 19 日
編集済み: John D'Errico 2023 年 2 月 19 日
@Khalid Alshumayri - did you understand the answers? This is mathematically impossible in general, certainly for polynomials of higher degree than 4. Even for lower polynomials, at best you would need to use a root finder, something like solve. There will be no single valued function you can formulate as the inverse function for most polynomials. And even if the inverse does technically exist if the polynomial is monotonic, the solution is still rather a messy one, even for 3rd or degree polynomials, involving radicals and complex numbers. Note that even degree polynomials will NEVER be monontonic functions.

サインインしてコメントする。

回答 (2 件)

Walter Roberson
Walter Roberson 2012 年 5 月 13 日
polynomials of degree 2 or higher cannot be inverted to give a polynomial.
The inverse of the particular polynomial you indicate is the union of three expressions.
If you have the symbolic toolbox, you can use solve()

Marcin Konowalczyk
Marcin Konowalczyk 2017 年 11 月 1 日
@Walter is right, but what you can do is approximate them using, for example, this function. This works only in a small domain where your polynomial is well conditioned (monotonically increasing) and fails horribly otherwise, but for certain cases (see the docstring of the linked function) it is useful.

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by