how i solve a polynomial equation with exponents that are not integers?

20 views (last 30 days)
For example: 0,32567*x^(-0,05673)+0,2223*x^(0,7319)+...+0,00863*x^(-0,000657)=0

Accepted Answer

John D'Errico
John D'Errico on 28 Feb 2014
Edited: John D'Errico on 28 Feb 2014
It is a general nonlinear equation, not a polynomial. Calling it that does not make it so, even though it looks vaguely like one.
You find the root of any such problem using fzero, IF a root exists. Note that when x is negative there will be issues, as a negative number raised to a non-integer power will not yield a real number. So using your example...
fun = @(x) 0.32567*x.^-0.05673 + 0.2223*x.^0.7319 + 0.00863*x.^-0.000657;
fun(-1)
ans =
0.18114 + 0.10812i
As it turns out, this function is a bit boring along the positive real line. Ok, it is VERY boring. With all positive coefficients, there will never be a positive real solution. We need something with both positive and negative coefficients in the mix to make it interesting. (Of course, in context of polynomials, I think Descartes had something to say here.)
fun = @(x) -0.723 + 0.32567*x.^-0.25673 + 0.8223*x.^0.7319 - 0.363*x.^1.657;
ezplot(fun,[0,2])
grid on
It appears this function has three roots on the positive real line. ALWAYS plot your problems when you can. Plots give you a great deal of intuition about what is happening.
format long g
x = fzero(fun,[eps,2])
x =
1.37482509521088
fun(x)
ans =
2.22044604925031e-16
So close enough. Of course, this is only one of the roots. By a careful search for sign changes, we can force fzero to find the other roots. But roots cannot work on problems like this.
Or, we can throw the symbolic TB at it, which in this case, happens to find the second positive real root.
syms x
fsym = -0.723 + 0.32567*x.^-0.25673 + 0.8223*x.^0.7319 - 0.363*x.^1.657;
xs = solve(fsym)
xs =
0.22525988470397199278453292791815
  4 Comments
John D'Errico
John D'Errico on 1 Mar 2014
Descartes rule of signs. which can tell you the maximum number of zeros of a polynomial function.
While I won't attempt to make any conclusions about whether it would hold in general, it certainly applies in the simple case. I.e., if all coefficients of the function are positive, then there can NEVER be any real positive roots.

Sign in to comment.

More Answers (1)

Walter Roberson
Walter Roberson on 28 Feb 2014
Those are not polynomial equations, by definition.

Categories

Find more on Polynomials in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!