Le dimanche 29 janvier 2017 08:47:22 UTC+1, Ralf Stephan a écrit :
>
>
> Note that replacing other parameters by 0 does not always work, for 
>> example for sum((-1)^k*comb(n,k)/comb(k+a,k),k)=a/(n+a), I had to put non-0 
>> values for the parameter.
>>
>
> Proving the identity does not seem a problem here:
> sage: F(n,k)=(-1)^k*binomial(n,k)/binomial(k+a,k)/a*(n+a)
> sage: c = F(n,k).WZ_certificate(n,k); c
> (a + k)*k/((a + n)*(k - n - 1))
> sage: G(n,k) = c * F(n,k)
> sage: (F(n+1,k) - F(n,k) - G(n,k+1) + G(n,k)).simplify_full()
> 0
>
> (using a Pynac prototype and the #22090 branch)
>

I get the following polynomials
A=x0^2*x1+x0^2*x2-x0*x1*x2-x0*x2^2+x0*x2+x0-x1*x2-x1-2*x2^2-3*x2-1
B=x0^2*x1+x0^2*x2+x0*x1^2+x0*x1*x2+x0*x1+2*x0*x2+x0+x1*x2+x1+x2+1
then computing resultant(A(x0),B(x0+t)) with x1=x2=0 returns 0 (one row of 
the Sylvester matrix is identically 0)

>  
>
>> I'd be curious to compare with the randomize evaluation method.
>>
>
> Is there a way to get the "Gosper term" of an expression from Giac? I can 
> only see
>  bool gosper(const polynome & P,const polynome & Q,const polynome & 
> R,polynome & Y,gen & deno,GIAC_CONTEXT);
>
>
this is the internal function that solves P = Q E[Y] - R Y for Y.
For a normal user, sum will do the job:
sum((-1)^k*(-a*k-k*n-n-1)*a!*n!/(a*(k-n-1)*(a+k)!*(-k+n)!),k);
The following Xcas code may be used to get a WZ certificate:

// Wilf-Zeiberger certificate for sum(U,k)=res
wz(U,res,n,k):={
  local F,dF,G;
  F:=U/res;
  dF:=simplify(F(n=n+1)-F);
  G:=sum(dF,k);
  retourne factor(simplify(G/F(k=k-1)));
}:;

Note that I have implemented optimizations discussed in this thread 
yesterday, you need to synchronize with geogebra SVN to check the speed of 
wz.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to