Question: adomian polynomial for nolinear function

i have two nonlinear functions from which one is exicuted properly but 2nd funnction not risponde properly. i can not understan how to overcome it
 

restart

with(LinearAlgebra):

F := proc (x) options operator, arrow; x^2 end proc:

F(u(t));

u(t)^2

(1)

G := proc (w) options operator, arrow; w*dw/dt end proc:

G(h(t));

h(t)*dw/dt

(2)

for n from 0 while n <= 6 do V[n] := (diff(F(sum(t^i*u[i], i = 0 .. n)), [`$`(t, n)]))/factorial(n); U[n] := (diff(G(sum(t^i*h[i], i = 0 .. n)), [`$`(t, n)]))/factorial(n) end do:

t := 0;

0

(3)

for i from 0 while i <= n-1 do A[i] := V[i]; B[i] := U[i] end do;

u[0]^2

 

h[0]*dw/dt

 

2*u[0]*u[1]

 

h[1]*dw/dt

 

2*u[0]*u[2]+u[1]^2

 

h[2]*dw/dt

 

2*u[0]*u[3]+2*u[1]*u[2]

 

h[3]*dw/dt

 

2*u[0]*u[4]+2*u[1]*u[3]+u[2]^2

 

h[4]*dw/dt

 

2*u[0]*u[5]+2*u[1]*u[4]+2*u[2]*u[3]

 

h[5]*dw/dt

 

2*u[0]*u[6]+2*u[1]*u[5]+2*u[2]*u[4]+u[3]^2

 

h[6]*dw/dt

(4)

for j from 0 while j <= n-1 do u[0] := 1; u[j+1] := int(x*B[j], x)+int(A[j], x) end do;

1

 

(1/2)*x^2*h[0]*dw/dt+x

 

1

 

(1/2)*x^2*h[1]*dw/dt+(1/3)*x^3*h[0]*dw/dt+x^2

 

1

 

(1/2)*x^2*h[2]*dw/dt+(1/3)*x^3*h[1]*dw/dt+(5/12)*x^4*h[0]*dw/dt+x^3+(1/20)*h[0]^2*dw^2*x^5/dt^2

 

1

 

(1/2)*x^2*h[3]*dw/dt+(1/3)*x^3*h[2]*dw/dt+(1/6)*x^4*h[1]*dw/dt+(1/6)*x^5*h[0]*dw/dt+(1/2)*x^4+(13/180)*h[0]^2*dw^2*x^6/dt^2+(2/5)*((1/3)*h[0]*dw/dt+(1/2)*h[0]*dw*((1/2)*h[1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