The correct option is D −2x+ln(x+1)
I=∫log(x2+x)dx
Now, integrating by parts taking u=log(x2+x),v=1
I=xlog(x2+x)−∫(2x+1)1x2+xxdx=xlog(x2+x)−2∫2x+2−12x+2dx=xlog(x2+x)−2∫(1−12(x+1))dx=xlog(x2+x)−2x+log(x+1)+c
Equating it to the given integral, we get, f(x)=−2x+log(x+1)