Items tagged with roots roots Tagged Items Feed

I'm trying to create a routine to perform the test of rational roots , but I'm having some problems. Below is the routine I created :

But the program is only printing " aux = -24 " . I don't know what it can be .

I need to modify my code , but I don't know where. Can someone help me? Thank you!

There is something wroung with the t0.

How to correct it?

can anyone please help me to find roots of (2*cos(0.5*x)*sin(0.5*x)*cos(3.775*x)+2.2075*((cos(0.5*x))^2)*sin(3.775*x)-0.453*((sin(0.5*x))^2)*sin(3.775*x)=0 ?

i type on maple like this:


but it said the solutions may have been lost

thanks before



I am trying to find the roots of Hankel function H1(2, z)?


j := 1;
for i from 0 to 10 do z0 := i*step+z_min; x[j] := fsolve(f = 0, z = z0, complex) end do;

for p to 10 do for j from p+1 to 9 do if `and`(Re(x[j])-Re(x[p]) < 0.1e-4, Im(x[j])-Im(x[p]) < 0.1e-4) then for i from j to 10 do x[i] := x[i+1] end do; p := p-1; break end if end do end do;


the first of these two processes works fine however the second does not. The second on is to get rid of same value solutions! I am not sure if I have missed anything and also is there a way to determine a max value in the complex domain and use it in a for loop?



any help would be great 


I'm relatively new to using Maple.

I'm looking for information on how the "factor" function works. I printed its definition, and it refers to "factor/factor" and I can't find any more information on this. I'd like to know so that I could have more trust that it works correctly. Specifically, I'd like to be able to believe that if it does not factor a cubic, then the cubic is irreducible.

I'm specifically looking for rational roots of cubic polynomials. The "solve" function seems to work, and gives me the roots in terms of square roots, cubic roots and rationals. I have no idea why I should believe that "type(x,rational)" would work when the description of "x" is quite complicated.

Does anyone know anything about how "factor" works, or how "type" works when testing whether an expression evaluates to a rational number? Any information would be much appreciated.



I'm have used a program to find the roots of a function 


/ 1 \
x cos(x) - sin(x) sin|---- x|
\1000 /

x_max:=50; x_min:=-50; step:=2; i_max:=(x_max-x_min)/step;

for i from 0 to i_max by 1 do


and my output was of the form of multiple "potential" roots and a bunch of which are the same. So I tried to get rid of the ones which were the same before actually finding the ones which ARE roots. To do that I done....



j := 1; for j to 50 do if x[j]-x[j+1] = 0 then ignore(x[j]) else print(x[j]) end if end do:


and it got rid of the ones which are of the above form but some roots are the same and seperated by more than 1 ... i.e x[ j ]= x[j + 2] or some other number. 


Basically I am trying to generalise the above for loop for all "numbers" instead of 1 but when I try some things the for loop doesnt like it. 

Any help would be good!



Here is a serious achievement of the Roots command:



plot(2^x+3^x+6^x-x^2, x = -6 .. 2, gridlines = false);


The solve command also does the job here:

sol := solve(2^x+3^x+6^x-x^2);



The RealDomain:-solve command fails here.

I wonder how Maple solves it. It would be kind of Maple developers and experts to explain that.

PS. I tried printlevel:=10, but understood the output a little.



Please help, here is my code:


local i,g,B,n,L,tk;

if B<1 then g:=numer(g);fi;
while has(L,0) do
if L=[] then RETURN([]);fi;
L:=map(proc(x,y) [op(1,x)*y,op(2,x)*y];end,L,B);


I dont know why i cant run this code, it always report: 

Error, (in findproot) improper op or subscript selector

option hfloat;
local a;
if nops(a)>=1 then seq([v,a[i]],i=1..nops(a));
end if;
end proc:

The final figure is different between maple12 and maple17.

On 17, unwanted points apprear.

is it a bug?

Hi all, I want to determine the roots of this figure that attached here. But the function has 5 parameters so the code doesn't work for it! Help me.

I have another question: The code that attached, determine the roots on horizontal axis, how could I find the values of root on vertical axis?In this figure I want to know the value of F(0) that cut the vertical axis?


Dear all,

I want to know how can I solve a fourth or higher order equation to find out its roots, actually coefficients of each power terms itself are functins of other parameters not constant.

Please reply as soon as possible, as this is very urgent,


I have a characteristic equation. some times It has polar roots . sometimes It has real roots and sometimes both of them.

I want to extract real roots and extract polar roots if they are.

for instance:



I want to know how can I use if in this part ?

Hi guys,

I am trying to solve for the roots in a polynomial of infinite order. The idea is simply to approximate the infinite polynomial by a high order Taylor expansion, solve for the roots in this polynomial (both real and complex roots exists) and use these roots as initial guesses for finding the authentic roots of the infinite polynomial in this specific range.

I have tried to use the evalf(RootOf(PolyInfinite=0,x,Re + Im)), however the output from RootOf seems to converge to the same 2 or 3 roots almost independent of the initial guess. Is there specific options of this RootOf function that can stabilize the solution or another/better command to use?

On the other hand i could solve this by simply minimizing a least sqaure, however i have not found any optimization solver which supports solutions in the complex domain?

I sincerely hope that you are able to help me.

Kind regards


To motivate some ideas in my research, I've been looking at the expected number of real roots of random polynomials (and their derivatives).  In doing so I have noticed an issue/bug with fsolve and RootFinding[Isolate].  One of the polynomials I came upon was

f(x) = -32829/50000-(9277/50000)*x-(37251/20000)*x^2-(6101/6250)*x^3-(47777/20000)*x^4+(291213/50000)*x^5.

We know that f(x) has at least 1 real root and, in fact, graphing shows that f(x) has exactly 1 real root (~1.018).  However, fsolve(f) and Isolate(f) both return no real roots.  On the other hand, Isolate(f,method=RC) correctly returns the root near 1.018.  I know that fsolve's details page says "It may not return all roots for exceptionally ill-conditioned polynomials", though this system does not seem especially ill-conditioned.  Moreover, Isolate's help page says confidently "All significant digits returned by the program are correct, and unlike purely numerical methods no roots are ever lost, although repeated roots are discarded" which is clearly not the case here.  It also seems interesting that the RealSolving package used by Isolate(f,method=RS) (default method) misses the root while the RegularChains package used by Isolate(f,method=RC) correctly finds the root.

 All-in-all, I am not sure what to make of this.  Is this an issue which has been fixed in more recent incarnations of fsolve or Isolate?  Is this a persistent problem?  Is there a theoretical reason why the root is being missed, particularly for Isolate?

Any help or insight would be greatly appreciated.

Hello everybody,

I want to find all of roots of the complex variables functions in two ways.

(1) find the value which can make the function equals 0

(2) find the real value and imaginary value which make real part and imaginary part of function equal 0

(I know answers of these two case is not equal completely.)


The function is a non-linear function, including sin, cos and Bessel function, such as:


And, I used Analytic and fsolve to do case (1) and (2), but failure. The follow result is how I tried to find the real value answer:


It seems that both of two commands can only find some of roots. 

How to find all of roots of these cases? The related .mw file is attached.


Thanks a lot.


1 2 3 Page 1 of 3