MATLAB Answers

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

63 views (last 30 days)
Hazem Elgabra
Hazem Elgabra on 13 May 2012
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...

  0 Comments

Sign in to comment.

Answers (2)

Walter Roberson
Walter Roberson on 13 May 2012
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()

  0 Comments

Sign in to comment.


Marcin Konowalczyk
Marcin Konowalczyk on 1 Nov 2017
@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.

  0 Comments

Sign in to comment.

Tags