Jacques Gélinas on Sat, 16 Jun 2018 12:18:37 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
RE: Counting signs in a polynomial of many variables |
This works on the examples in EX, but signs(1/x) crashes GP.
signs(p) = if(!#variables(p), sign(p),\
if(nvs(p=apply(signs,Vec(simplify(p)))), UNK, p[1]));
nvs(V) = my(r,s); sum(k=1,#V,if(s,r=s);s=V[k];r&s&(r!=s));
EX = [0, 1, -1, 0*x, 1+a*x^2, 1-a-b+n*a*b, exp(a*x), 1-x/tan(x)];
apply(signs,EX) == [0, 1, -1, 0, 1, UNK, 1, 1]
De : Jacques Gélinas <jacquesg00@hotmail.com>
Envoyé : 15 juin 2018 14:48 À : pari-users@pari.math.u-bordeaux.fr Objet : Counting signs in a polynomial of many variables The problem is to prove that the _expression_ Q below is positive,
for integers n>1, s>r>0, and real x in [0,1].
After doing substitutions to include the constraints on n,r,s,
I have to check that all the signs are positive, for x=0 and x=1,
since Q is linear in x.
g(r=1,x=0)=(2*r+1-x)/(3-x-1/(r+1)*(n-r-1)/(n-1)*3/(2*r+3)*(2*r+3-x));
Q = numerator(g(r,0)/g(s,0)-g(r,x)/g(s,x))/x;
subst(substvec(Q,[x,n,s],[0,m+2,r+t]),r,y+t)
subst(substvec(Q,[x,n,s],[1,m+2,r+t]),r,y+t)
Could you define a GP function signs(p) to check signs a polynomial p of many variables,
assuming that the coefficients are integers and the variables are positive ?
signs(s+x+r^2*x^2) == 1
signs(-1-r^2*x) == -1
signs(1-r^2*x^2) == 0 (not uniform)
and, maybe, if at all possible,
signs(Pol(exp(a*x)) == 1
signs(Pol(1-x/tan(x)) ) = 1 (Euler 1755, Inst. Calc. Diff. V.119, alternating signs of Bernoulli numbers)
Jacques Gélinas
|