
for N=2:2:40

    D1=F_DM(1,N);  
    D2=F_DM(2,N);

    j=[0:1:N-1];  x=[2*pi*j/N];

    for j=1:N
       s=sin(x(j)); c=cos(x(j));
       u0(j)=1./(2+s);
       u1(j)=-c*u0(j)^2;
       u2(j)=s*u0(j)^2+2*c*c*u0(j)^3;
    end

    e1=sum(abs(D1*u0'-u1'));
    e2=sum(abs(D2*u0'-u2'));
    
    xx(0.5*N)=N;
    err(N*0.5)=e1/N;
    frr(N*0.5)=e2/N;

end

    plot (xx, err, xx, frr, '--')
    

