%L2-norm of (I-P_N)((\delta Theta1(i))_y*Theta_1(j))
%L2-norm of (I-P_N)((\delta Theta1(i))_x*Theta_1(j))
%L2-norm of (I-P_N)(( Theta1(i))_y*Theta_1(j))
%L2-norm of (I-P_N)((Theta1(i))_x*Theta_1(j))
function [dtytheta1L2,dtxtheta1L2,txtheta1L2,tytheta1L2]=TTheta1(N,i,ialpha,j,ss,list2,PI);
i1=list2(i,1);
i2=list2(i,2);
j1=list2(j,1);
j2=list2(j,2);
g1=-0.5*(i1^2*ialpha^2+i2^2)*i2;
g2=-0.5*(i1^2*ialpha^2+i2^2)*i1*ialpha;
g3=-0.5*i2;
g4=-0.5*i1*ialpha;
ti=ss(i);
tj=ss(j);
m1=i1+j1+1;
dtytheta1=intval(zeros(2*N+1,4*N+1));   
tytheta1=intval(zeros(2*N+1,4*N+1));
dtxtheta1=intval(zeros(2*N+1,4*N+1));
txtheta1=intval(zeros(2*N+1,4*N+1)); 
    n1=i2+j2+2*N+1;
    n2=i2-j2+2*N+1;
    n3=-i2+j2+2*N+1;
    n4=-i2-j2+2*N+1; 
    dtytheta1(m1,n1)=dtytheta1(m1,n1)+g1;
    dtytheta1(m1,n2)=dtytheta1(m1,n2)+g1*tj;
    dtytheta1(m1,n3)=dtytheta1(m1,n3)-g1*ti;
    dtytheta1(m1,n4)=dtytheta1(m1,n4)-g1*ti*tj;
  
    tytheta1(m1,n1)=tytheta1(m1,n1)+g3;
    tytheta1(m1,n2)=tytheta1(m1,n2)+g3*tj;
    tytheta1(m1,n3)=tytheta1(m1,n3)-g3*ti;
    tytheta1(m1,n4)=tytheta1(m1,n4)-g3*ti*tj;
 
    dtxtheta1(m1,n1)=dtxtheta1(m1,n1)+g2;
    dtxtheta1(m1,n2)=dtxtheta1(m1,n2)+g2*tj;
    dtxtheta1(m1,n3)=dtxtheta1(m1,n3)+g2*ti;
    dtxtheta1(m1,n4)=dtxtheta1(m1,n4)+g2*ti*tj;
    
    txtheta1(m1,n1)=txtheta1(m1,n1)+g4;
    txtheta1(m1,n2)=txtheta1(m1,n2)+g4*tj;
    txtheta1(m1,n3)=txtheta1(m1,n3)+g4*ti;
    txtheta1(m1,n4)=txtheta1(m1,n4)+g4*ti*tj;
    if i1-j1~=0
           signij=sign(i1-j1);
           m1=abs(i1-j1)+1;
           t1=(i2-j2)*signij+2*N+1;
           t2=(i2+j2)*signij+2*N+1;
           t3=(-i2-j2)*signij+2*N+1;
           t4=(-i2+j2)*signij+2*N+1;
           dtytheta1(m1,t1)=dtytheta1(m1,t1)+g1;
           dtytheta1(m1,t2)=dtytheta1(m1,t2)+g1*tj;
           dtytheta1(m1,t3)=dtytheta1(m1,t3)-g1*ti;
           dtytheta1(m1,t4)=dtytheta1(m1,t4)-g1*ti*tj;
           tytheta1(m1,t1)=tytheta1(m1,t1)+g3;
           tytheta1(m1,t2)=tytheta1(m1,t2)+g3*tj;
           tytheta1(m1,t3)=tytheta1(m1,t3)-g3*ti;
           tytheta1(m1,t4)=tytheta1(m1,t4)-g3*ti*tj;
           dtxtheta1(m1,t1)=dtxtheta1(m1,t1)+g2;
           dtxtheta1(m1,t2)=dtxtheta1(m1,t2)+g2*tj;
           dtxtheta1(m1,t3)=dtxtheta1(m1,t3)+g2*ti;
           dtxtheta1(m1,t4)=dtxtheta1(m1,t4)+g2*ti*tj;
            txtheta1(m1,t1)=txtheta1(m1,t1)+g4;
           txtheta1(m1,t2)=txtheta1(m1,t2)+g4*tj;
           txtheta1(m1,t3)=txtheta1(m1,t3)+g4*ti;
           txtheta1(m1,t4)=txtheta1(m1,t4)+g4*ti*tj;
    else
           s1=abs(i2-j2)+2*N+1;
           s2=(i2+j2)+2*N+1;
           s3=abs(-i2-j2)+2*N+1;
           s4=abs(-i2+j2)+2*N+1;
           dtytheta1(1,s1)=dtytheta1(1,s1)+g1;
           dtytheta1(1,s2)=dtytheta1(1,s2)+g1*tj;
           dtytheta1(1,s3)=dtytheta1(1,s3)-g1*ti;
           dtytheta1(1,s4)=dtytheta1(1,s4)-g1*ti*tj;
           tytheta1(1,s1)=tytheta1(1,s1)+g3;
           tytheta1(1,s2)=tytheta1(1,s2)+g3*tj;
           tytheta1(1,s3)=tytheta1(1,s3)-g3*ti;
           tytheta1(1,s4)=tytheta1(1,s4)-g3*ti*tj;
           dtxtheta1(1,s1)=dtxtheta1(1,s1)+g2;
           dtxtheta1(1,s2)=dtxtheta1(1,s2)+g2*tj;
           dtxtheta1(1,s3)=dtxtheta1(1,s3)+g2*ti;
           dtxtheta1(1,s4)=dtxtheta1(1,s4)+g2*ti*tj;
           txtheta1(1,s1)=txtheta1(1,s1)+g4;
           txtheta1(1,s2)=txtheta1(1,s2)+g4*tj;
           txtheta1(1,s3)=txtheta1(1,s3)+g4*ti;
           txtheta1(1,s4)=txtheta1(1,s4)+g4*ti*tj;
    end

      dtytheta1L2=sum(sum(dtytheta1(1:2*N+1,1:N).^2*2*PI^2/ialpha));
      dtytheta1L2=dtytheta1L2+sum(sum(dtytheta1(1:2*N+1,3*N+2:4*N+1).^2*2*PI^2/ialpha));
      dtytheta1L2=dtytheta1L2+sum(sum(dtytheta1(N+2:2*N+1,N+1:3*N+1).^2*2*PI^2/ialpha));
      dtytheta1L2=sqrt(abs(dtytheta1L2));
        dtxtheta1L2=sum(sum(dtxtheta1(1:2*N+1,1:N).^2*2*PI^2/ialpha));
        dtxtheta1L2=dtxtheta1L2+sum(sum(dtxtheta1(1:2*N+1,3*N+2:4*N+1).^2*2*PI^2/ialpha));
        dtxtheta1L2=dtxtheta1L2+sum(sum(dtxtheta1(N+2:2*N+1,N+1:3*N+1).^2*2*PI^2/ialpha));
        dtxtheta1L2=sqrt(abs(dtxtheta1L2));
        tytheta1L2=sum(sum(tytheta1(1:2*N+1,1:N).^2*2*PI^2/ialpha));
        tytheta1L2=tytheta1L2+sum(sum(tytheta1(1:2*N+1,3*N+2:4*N+1).^2*2*PI^2/ialpha));
        tytheta1L2=tytheta1L2+sum(sum(tytheta1(N+2:2*N+1,N+1:3*N+1).^2*2*PI^2/ialpha));
        tytheta1L2=sqrt(abs(tytheta1L2));
        txtheta1L2=sum(sum(txtheta1(1:2*N+1,1:N).^2*2*PI^2/ialpha));
        txtheta1L2=txtheta1L2+sum(sum(txtheta1(1:2*N+1,3*N+2:4*N+1).^2*2*PI^2/ialpha));
        txtheta1L2=txtheta1L2+sum(sum(txtheta1(N+2:2*N+1,N+1:3*N+1).^2*2*PI^2/ialpha));
        txtheta1L2=sqrt(abs(txtheta1L2));