Bill Allombert on Sat, 21 Jul 2018 11:15:41 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: generating function solution to poly


On Sat, Jul 21, 2018 at 06:38:30PM +1000, Kevin Ryde wrote:
> I have a generating function (and more terms too)
> 
>     g = x^2 + x^3 + x^4 + 3*x^5 + 6*x^6 + 12*x^7 + 29*x^8 + 67*x^9 + O(x^10);
> 
> which satisfies a cubic
> 
>     (1+x)*g^3 - 2*g^2 + (1-x+2*x^2)*g - x^2 == 0
> 
> Is there an easy or good way to have gp solve that for series g?

A least you can use Newton algorithm:

? P=substvec((1+x)*g^3 - 2*g^2 + (1-x+2*x^2)*g - x^2,[x,g],[X,y]);
? g=subst(x^2 + x^3 + x^4 + 3*x^5 + 6*x^6 + 12*x^7 + 29*x^8 + 67*x^9 + O(x^10),x,X);
? g=truncate(g)-subst(P,y,truncate(g))/subst(P',y,g)
%3 =
%X^2+X^3+X^4+3*X^5+6*X^6+12*X^7+29*X^8+67*X^9+157*X^10+383*X^11+936*X^12+2312*X^13+5786*X^14+14570*X^15+36949*X^16+94331*X^17+242064*X^18+624186*X^19+O(X^20)
? g=truncate(g)-subst(P,y,truncate(g))/subst(P',y,g)
%4 =
%X^2+X^3+X^4+3*X^5+6*X^6+12*X^7+29*X^8+67*X^9+157*X^10+383*X^11+936*X^12+2312*X^13+5786*X^14+14570*X^15+36949*X^16+94331*X^17+242064*X^18+624186*X^19+1616635*X^20+4203201*X^21+10966876*X^22+28706758*X^23+75362376*X^24+198377688*X^25+523487156*X^26+1384556332*X^27+3669730294*X^28+9745658682*X^29+25928832750*X^30+69102981762*X^31+184461169797*X^32+493133170811*X^33+1320186423637*X^34+3539013613735*X^35+9498878431290*X^36+25525571978822*X^37+68669526237832*X^38+184932214210492*X^39+O(X^40)
etc.

Cheers,
Bill