Just use the usual methods for partial fractions and factorise x2+1 into (x+i)(x-i).