
   function  r=code2_RHS(u,N,cc)

       a=zeros(3, N+1);

       for k=1:N+1
           a(1, k)=0;
           for j=1:N+1
           a(1,k)=a(1,k)+u(j)*cos(pi*(j-1)*(k-1)/N)/cc(j);
           end
           a(1,k)=2*a(1,k)/(N*cc(k));
       end

       for i=2:3
         a(i,N+2)=0; a(i, N+1)=0;
         for k=N:-1:1
          a(i,k)=( a(i,k+2) + 2.*k*a(i-1,k+1) )/cc(k);
         end
       end

       for j=1:N+1
          ss2=0;
          for k=1:N+1
          ss2=ss2+a(3,k)*cos(pi*(j-1)*(k-1)/N);
          end
          r(j)=ss2;
       end
