Re: polynomial inversion
- From: "John D'Errico" <woodchips@xxxxxxxxxxxxxxxx>
- Date: Fri, 17 Oct 2008 09:33:01 +0000 (UTC)
"Rajib Ahsan" <rajib_ahsan@xxxxxxxxx> wrote in message <gd9gvg$i6e$1@xxxxxxxxxxxxxxxxxx>...
Hello,
I have a polynomial equation of 4th order like:
P = 3 + 2*x + 4*x^2 + 5*x^3 + 7*x^4
Here, x is a 2D square matrix.
I want to get the inverse of this polynomial. Can anyone help me in this purpose? Urgent help needed!!!
Thanks in advance.
The funny thing is, if I tell you how to
compute the inverse, I'll be wrong since
all you wish to know is how to compute
1./P, the arithmetic inverse. Or, perhaps
your question is to swap the coefficients
of the terms, low for high.
But, assuming that you actually wish to
compute a functional inverse, there is still
a problem, since if you have x, then you
don't need the inverse. Polyval will evaluate
the function.
So, is it possible that you are given an
array of values of the dependent variable,
P(x), and you wish to compute x for each
one? While this might be what you mean,
it is not what you have said.
You do realize that such an inverse is
almost never unique for a 4th order
polynomial? So the problem is there will
almost always be any of zero, two or four
real solutions to the problem for every
value of your dependent variable? And,
occasionally, there will be 1 or 3 real
solutions? If you are willing to admit the
complex solutions, then there will always
be exactly four solutions.
Computing the inverse of a 4th order
polynomial is best left to roots, which will
always find all four complex solutions.
Loop over the values of the dependent
variable, and subtract that value from the
constant term in the polynomial to call
roots. Then choose the solution that you
prefer.
John
.
- References:
- polynomial inversion
- From: Rajib Ahsan
- polynomial inversion
- Prev by Date: Re: Calling MATLAB from Fortran
- Next by Date: Re: Please tell me how to convert Matlab code to C code
- Previous by thread: polynomial inversion
- Next by thread: get object out of struct?
- Index(es):
Relevant Pages
|