We know that,
#color(red)((1)int(d(f(x)))/f(x) =ln|f(x)|+c#
#color(blue)((2)int1/(x^2+a^2)dx=1/atan^-1(x/a)+c#
Here,
#I=intx^2/(x^2+x+4)dx#
#=int((x^2+x+4)-(x+4))/(x^2+x+4)dx#
#=int(1-(x+4)/(x^2+x+4))dx#
#=int1dx-1/2int(2x+8)/(x^2+x+4)dx#
#=x-1/2int((2x+1)+7)/(x^2+x+4)dx#
#=x-1/2int(2x+1)/(x^2+x+4)dx-1/2int7/(x^2+x+4)dx#
#=x-1/2int(color(red)(d(x^2+x+4))/color(red)((x^2+x+4)))dx-
7/2int1/(x^2+x+1/4+15/4)dx#
#=x-1/2color(red)(ln|x^2+x+4|)-7/2color(blue)(int 1/((x+1/2)^2+
(sqrt15/2)^2)dx#
#=x-1/2ln|x^2+x+4|-7/2*color(blue)(1/(sqrt15/2)
tan^-1((x+1/2)/(sqrt15/2)))+c#
#=x-1/2ln|x^2+x+4|-7/sqrt15 tan^-1((2x+1)/sqrt15)+c#