# question on Leibniz formula

let $$f(x)=\int_{1}^{x}{\frac{\cos y\sin x}{y^2+y+1}dy}$$ then find all values of $$x$$ for which $$f'(x)=0$$?

I tried directly differentiating but I got stuck on $$f'(x)=\cos x\left(\int_1^x{\frac{\cos y}{y^2+y+1}dy}+\frac{\sin x}{x^2+x+1}\right)$$

• The last integral is totally wrong Sep 22 at 14:23
• @MathAttack I did $f(x)=\sin x\int_1^x{\frac{cosy}{y^2+y+1}dy}$ then differentiated by product rule what did I do wrong? Sep 22 at 14:29
• @Gonçalo I edited the question Sep 22 at 14:38

Given: $$f(x)=\int_{1}^{x} \frac{\cos y \sin x}{y^2+y+1} dy$$
Take the derivative (Using the product rule for the RHS): $$\implies \frac{d}{dx}f(x)=\frac{d}{dx}[\sin(x)\int_{1}^{x} \frac{\cos y}{y^2+y+1} dy]$$ $$\implies f'(x)=\cos(x)\int_{1}^{x} \frac{\cos y}{y^2+y+1}dy +\frac{\cos x}{x^2+x+1}\sin x$$ Now we want to find all values of x such that $$f'(x)=0$$: $$\cos x \int_{1}^{x}\frac{\cos y}{y^2+y+1} dy +\frac{\sin x \cos x}{x^2+x+1}=0$$ Well, notice that the integral will not be zero simultaneously with the other expression (As if $$x=1$$ (to make the integral zero), then the other expression is not zero; and if there exists an $$x$$ such that the integral is zero, the other expression won't be zero. Hence, it seems the only way to make this equation to be zero is to set $$cos(x)=0$$ and so $$x=(2n+1)\frac{\pi}{2}$$ is the solution for all integers $$n$$.