Items tagged with zero


I am interested in the behaviour of a system of equations close to the origin- these equations are quite long, and there are a lot of them so i would like to have commands that i can use to assume products of variables are zero. 

here are the first two polynomials:



the varables are the terms with B and a subsript and everything else is a parameter.

My intuition was to use coeffs but I couldn't get anything helpful


at some point in my maple calculations I have to read some symbolic constants because otherwise the expressions become to big. All my constants are in a range 1e-3 to 1e6 or something. No matter how exact I calculate my result always has some Numbers in the range of <1e-20 (how small they actually are varies with Digits) together with numbers 1e-3..1e6. I presume those 1e-20 are just zeros. Can I somehow tell maple to forget/drop very small numbers and assume them all to be zero?



Nonzero complex numbers a, b, and c are such that every pair of the polynomials ( in x )
a*x^11+b*x^4+c, b*x^11+c*x^4+a, c*x^11+a*x^4+b has a common root. How to prove or disprove with Maple that all the three polynomials have a common root? I am aware of the resultant command in Maple.

In the following problem though b and c are same (except the way denominator 2 is hanfled), command ' a-b ' readily answers zero, but a-c not so. Why? Only on condition of assumption real it gives zero!

a := (1/2)*(kappa*omega^2+omega^3)*(Y+(1/2)*(-sqrt(N)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+sqrt(N)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)/(kappa*omega^2+omega^3))^2/omega:

b := (1/2)*(kappa*omega^2+omega^3)*(Y+(1/2)*(-sqrt(N)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+sqrt(N)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)/(kappa*omega^2+omega^3))^2/omega:




c := (1/2)*(kappa*omega^2+omega^3)*(Y+(-sqrt(N)*omega^(3/2)*sin(theta[2])*cos(varphi[2])*lambda__b+sqrt(N)*omega^(3/2)*sin(theta[1])*cos(varphi[1])*lambda__a)/(2*(kappa*omega^2+omega^3)))^2/omega:








Why the answer is not given as zero?





What difference therms b and c make for Maple? Are they not same?

Ramakrishnan V



Assume that I have r:= -6x+3y+23x2-4xyz+7z. By using coeffs(r,x,'k') I can find the coefficients of 1, x, and x2

What should I write to get the conditions that make the coefficient of x zero? How can I just pick the coefficient of x, and solve it. 

I have several coefficients but the answer of this question will help me.

Hi all


I don't know what is its meaning???


The plot and the solved Zero-roots aren't coincident with each other...


Zero-roots: 7.532332868 Wheras from the plot we noticed that there's a root near 14...


And why this Code can't find other Zero-roots?


Thanks a lot


and f=

The elements of W are none zero. I want a procedure that return "true" if f is none zero w.r.t. W and return

"false" otherwise.

Let B is a list of polynomial conditions such that  are none zero. Consider one polynomial f. How can I detect that f is none zero w.r.t. B? For example if B=[a-1,b+2,b-c,ac-1] and f=a^2c-ac-a+1. From B we can conclude that a<>1 and b<>2 and b<>c and ac<>1. How can I deduce that f<>0 w.r.t. B automatically?

How can i solve the problem? (Error, (in f) division by zero)


f := proc (z, n) local x, i, k, j;
for i to n
if i = n then x[i] := trunc(z/10^(n-1))
else x[i] := trunc((`mod`(z, 10^i))/10^(i-1))
end if
end do;
printf("The number %d has the digits:", z);
x[n+1] := 0;
for k from n by -1 to 1
x[n+1] := x[n+1]+x[k]
end do;
printf("The checksum is:");
for j to n
if `mod`(z, x[j]) = 0 then printf("The number is divisible by: %d\n", x[j])
else printf("The number is not divisible by: %d\n", x[j])
end if
end do;
for j to n
if `mod`(x[n+1], x[j]) = 0 then printf("The sum is divisible by: %d\n", x[j])
else printf("The sum is not divisible by: %d\n", x[j])
end if
end do
end proc;

f(12305, 4)

Error, (in f) division by zero

I have to solve a numerical problem and I was wondering how to make maple treat very small numbers as zero. Say I do not care about anything less than 10^-5, so maple should treat all such numbers as zero. How to set this behaviour for the entire session? Thanks!


I need to show what happens to the zero r=20 of f(x)= (x-1)(x-2)..(x-20)-(1/10^8)*(x^19) and the hint given is that the secant method in double precision gives an approximate in [20,21].

At present, I'm calling the secant method on f with a tolerance of 1/(10^12) with an initial x=20, but I'm stuck as to what the second initial value would be. What is the right approach to this question?


This is my code for the Extended Euclidean Algorthim which should return integer l, polynomials pi,ri,si,ti for 0<=i<=l+1. And polynomial qi for 1<=i<=l such that si(f)+ti(g) = ri and sl(f)+tl(g)=rl=GCD(f,g).
The problem is, I keep getting division by zero. Also it evaluates pi = lcoeff(ri-1 - qiri) to be zero, everytime. Even when I remove this it still says there is a division of zero, which must be coming from qi:=quo(ri-1,ri, x); however I do not know why considering the requirements for the loop are that r[i] not equal zero. I really could use a fresh pair of eyes to see what I've done wrong. Any help would be greatly appreciated!!


i need to remove all the elements from a matrix that are almost zero, for example, from this matrix:

matrix = (Matrix(2, 2, {(1, 1) = 1/1000000000000000000, (1, 2) = 1, (2, 1) = 1, (2, 2) = 1}))

i need to remove the smallest element, so the final matrix will be like:

matrix = (Matrix(2, 2, {(1, 1) = 0, (1, 2) = 1, (2, 1) = 1, (2, 2) = 1}))

Is there a simple way to do that? Maybe forcing Maple to use number above a threshold?




Hey I have a list of matrices and I want to define a proc that will search through the first matrices entries looking for zeroes, and if it finds one to move on to the next matrix in the list and look for zeroes and so on. if for some reason all matrices in the list have zeroes i would like the proc to answer with 0. otherwise I would like it to answer with the ndex of the first matrix wth all non-zero entries. I've played with things and occasionally made things work. But in general I do not have a solution. This is what I'e tried:

Things like this:

options trace;
local f,j,t,k;
for f from 1 to n while y<=q do;
for j from 1 to n do;
if evalb(C[k](f,j)=0) then;
else next;
end if;
end do;
end do;
end proc;

like this:

local f,j,t,k;
global S;
options trace;
if y=q then return "no";
end if;
for f from 1 to n do;
for j from 1 to n do;
if evalb(C[y](f,j)=0) then;
end if;
end do;
end do;
end proc;

And I think I understand well why these are not workinging however I wondered what I can do that will be syntactically (sp?) correct.


1 2 Page 1 of 2