how to prove $\int_{0}^{1} \frac{1-\cos x}{x^{n}}$ converges only for $n < 3$
I am stuck here :
$\int_{0}^{1} \frac{1-\cos x}{x^{n}} = \frac{x-\sin x}{x^n}\bigg\rvert_0^1-n\int_{0}^{1} \frac{\sin x}{x^n+1}$
how to prove $\int_{0}^{1} \frac{1-\cos x}{x^{n}}$ converges only for $n < 3$
I am stuck here :
$\int_{0}^{1} \frac{1-\cos x}{x^{n}} = \frac{x-\sin x}{x^n}\bigg\rvert_0^1-n\int_{0}^{1} \frac{\sin x}{x^n+1}$
On
$1-cos(x)=-\sum_{k=1}^\infty(-1)^k\frac{x^{2k}}{(2k)!}$. We can use this to keep things bounded for $n<3$, $$ \frac{1-cos(x)}{x^n}=-\sum_{k=1}^\infty(-1)^k\frac{x^{2k-n}}{(2k)!} $$ Indeed, the above is bounded as long as $2-n\geq 0$, or $n$, an integer, is $n\leq 3$.
For $n>3$, you have something at least as bad as $1/x$ you are trying to integrate near 0.
$f: x\mapsto \frac{1-\cos(x)}{x^n}$ is continuous and positive at $(0,1]$. on the other hand, near zero,
$$1-\cos(x)=2\sin^2(\frac x2)\sim \frac{x^2}{2}$$
thus $$f(x)\sim \frac{1}{2x^{n-2}}\;\; (x\to 0^+)$$
hence the integral converges only if $$n-2<1.$$