series1(x,t)=sym(zeros(1,1));
series2(x,t)=sym(zeros(1,1));
l1=-(4/9)*g^4*d+(16/27)*g^6-(5/9)*g^2*d^2-(5/54)*d^3;
m1=20*g^4*d-16*g^6+5*g^2*d^2;
U(2)=-2*g^2*d*csc(g*x)*csc(g*x);
V(1)=l1-(1/9)*m1*cot(g*x)*cot(g*x);
A(1)=A(1)+diff(U(r),x,2)*diff(U(k-r+1),x,3);
B(1)=B(1)+diff(U(r),x,1)*diff(U(k-r+1),x,4);
D(1)=D(1)+diff(U(r),x,2)*(k-r+1)*U(k-r+1);
E(1)=E(1)+diff(U(r),x,1)*(k-r+1)*diff(U(k-r+1),x,1);
F(1)=F(1)+diff(V(r),x,1)*diff(U(k-r+1),x,1);
G(1)=G(1)+V(r)*diff(U(k-r+1),x,2);
C(1)=C(1)+diff(U(l),x,1)*diff(U(r-l+1),x,1)*diff(U(k-r+1),x,2);
U(k+2)=gamma(((k-1)*alpha)+1)/gamma((alpha*(k+1-1))+1)*((1/5)*diff(U(k),x,6)+3*A(1)+3*B(1)+9*C(1)-(k)*diff(U(k+1),x,2)-3*D(1)-3*E(1)+(18/5)*diff(V(k),x,1))
V(k+1)=gamma(((k-1)*beta)+1)/gamma((beta*(k+1-1))+1)*(diff(V(k),x,3)+3*F(1)+3*G(1));
series1(x,t)=simplify(series1(x,t)+U(k)*power(t,k-1));
series2(x,t)=simplify(series2(x,t)+V(k)*power(t,k-1));
C1(row,col)=series1(e,f);
C2(row,col)=series2(e,f);
C1(row, col) =series1(x(i), t(i))
C2(row,col) =series2(x(i),t(i))