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

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.


i am trying to export an animated gif file but the export windows freezes and exports an empty file with zero bytes

the animation was created by: display(map(p, convert(A(() .. (), 2), list)), insequence = true)

i have tried to give maple some time (2-3 hours) and i even tried to restart the computer and lauch maple and try to export it but it didnt worked

how can i export it or how can i plot the using commands



i will seprate coefficients of a,a^2,a^3 and this coefficients equivalent zero(0) in EQ below,how can i do this?

EQ:= 3.522088319*10^(-10)*a^2*q21(T)+3.522088319*10^(-10)*a^3*q22(T)-6.094634327*10^(-16)*a*q41(T)-6.094634327*10^(-16)*a^2*q42(T)+6.094634327*10^(-16)*a*q51(T)+6.094634327*10^(-16)*a^2*q52(T)-1.106493792*10^(-9)*a*q11(T)-1.106493792*10^(-9)*a^2*q12(T)+2.429209785*10^(-24)*a^2*(diff(q21(T), T, T))+2.429209785*10^(-24)*a^3*(diff(q22(T), T, T)) = 0

1 2 Page 1 of 2