Bill Allombert on Sun, 22 Jul 2018 19:15:59 +0200

 Re: generating function solution to poly

```On Sat, Jul 21, 2018 at 11:15:38AM +0200, Bill Allombert wrote:
> 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);

Sorry, I should have precised: if you use an older version of PARI you
need to do

? y;
? 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);
etc.

so that 'y' has a higher priority than X.

Cheers
Bill

```