My Approach:
Using Leibniz Rule: $f'\left(x\right)=\frac{\sin x\cos x}{x^{2}+x+1}=\frac{\sin2x}{2\left(x^{2}+x+1\right)}$.
Now $f'\left(x\right)=0$ when $\sin2x=0\to2x=n\pi\to x=\frac{n\pi}{2}$
So according to me $f'\left(x\right)=0\ ∀\ x\ =\frac{n\pi}{2\ },\ n∈Z$
But the solution given is, $f'\left(x\right)=0\ ∀\ x\ =\frac{\left(2n+1\right)\pi}{2\ },\ n∈Z$
Where am i wrong?
Edit: $\sin x$ should be taken out for using the Leibniz formula because for the integral $\sin x$ is a constant
HINT
The proposed function is expressed as \begin{align*} f(x) & = \int_{1}^{x}\frac{\sin(x)\cos(y)}{y^{2} + y + 1}\mathrm{dy} = \sin(x)\int_{1}^{x}\frac{\cos(y)}{y^{2} + y + 1}\mathrm{d}y \end{align*}
Having noticed that, we can apply the product rule: \begin{align*} f'(x) & = \cos(x)\int_{1}^{x}\frac{\cos(y)}{y^{2} + y + 1}\mathrm{d}y + \frac{\sin(x)\cos(x)}{x^{2} + x + 1}\\\\ & = \cos(x)\left[\int_{0}^{x}\frac{\cos(y)}{y^{2} + y + 1}\mathrm{d}y + \frac{\sin(x)}{x^{2} + x + 1}\right] \end{align*}
Can you take it from here?