Question: unable to execute add

Dear Sir,  I want to know why the procedure  appear the error : (in U1) unable to execute add.

My procedure:

restart:
>
> h0:=0.156;
> d:=0.32*h0;
> l:=1;
> h1:=h0-d;
> h2:=h0+d;
> h5:=evalf(2/3*h0);
> h7:=h0;
> s1:=evalf(2/3);
> s2:=evalf(2/3);
> g:=9.8;
> d1:=1;
> Term:=10;
> Num:=5:
> n:=1:
>
>
> for N from 1 to Num do
> k0:=evalf(0.5*Pi+2*(N-1)*Pi/(Num-1)):
> tau0:=evalf(k0*h0):
> omega:=evalf((g*k0*tanh(k0*h0))^(1/2)):
> E:=g/(omega)^2:
> k1:=abs(fsolve(omega^2=g*k*tanh(k*h1),k)):
> tau1:=evalf(k1*h1):
> k2:=abs(fsolve(omega^2=g*k*tanh(k*h2),k)):
> tau2:=evalf(k2*h2):
> k5:=abs(fsolve(omega^2=g*k*tanh(k*h5),k)):
> tau5:=evalf(k5*h5):
>
> zeta1:=evalf((tau0+tau5)/2):
>
> Q:=tau->(16*tau^4+32*tau^3*sinh(2*tau)-9*sinh(2*tau)*sinh(4*tau)+12*tau*(tau+sinh(2*tau))*((cosh(2*tau))^2-2*cosh(2*tau)+3))/3/(2*tau+sinh(2*tau))^4; # ding yi han shu
>
> CCC:=unapply(taylor(2/sinh(2*tau),tau=zeta1,Term+1),tau):
> DDD:=unapply(taylor((1+2*tau/sinh(2*tau))^2*(1/s1^2+Q(tau)),tau=zeta1,Term+1),tau):
>
> for i from 0 to Term do
> u[i]:=coeff(CCC(tau),tau-zeta1,i);
> v[i]:=coeff(DDD(tau),tau-zeta1,i);
> end do;
>
> i:='i':
>
> c[0]:=1:
> c[1]:=0:
> d[0]:=0:
> d[1]:=1:
>
> for p from 2 to Term do
> c[p]:=-1/p/(p-1)*add((p-i-1)*u[i]*c[p-i-1]+v[i]*c[p-i-2],i=0..p-2);
> d[p]:=-1/p/(p-1)*add((p-i-1)*u[i]*d[p-i-1]+v[i]*d[p-i-2],i=0..p-2);
> end do:
>
> Term1:=i-1;
> f:=()->zeta1;
> U1:=tau->add(c[p]*(tau-f())^(p),p=0..Term1-1);
> U1(tau0);
> end do;

Please Wait...