kill(all); f[i,j]:=-cos(i*x)/(1+sin(i*x)^j);

M:genmatrix(f,2,2);

integrate(M,x);