I have a task like that and I'm hopeless with that:
Find the function so that $$J_0=\int_0^\infty f(x)\,{\rm d}x $$ converges and the integrals $$J_1=\int_0^\infty f(x)\sin x \,{\rm d}x,\quad J_2=\int_0^\infty f(x)\sin (x^2)\, {\rm d}x$$ diverge.
Does anyone have a clue for searched function? Thank you so much.
Obviously $J_0$ should converge only conditional. The idea is to choose $f$ with the same sign as $\sin x$ or $\sin(x^2)$, so after multiplication it will become positive.
Let $g(x) = \frac{\sin x}{x}$ and $h(x) = \frac{\sin\left(x^2\right)}{x}$. It's easy to check that $\int_1^\infty g(x)\,\rm dx$ and $\int_1^\infty h(x)\,\rm dx$ converge, and $\int_1^\infty g(x)\sin x\,\rm dx$ and $\int_1^\infty h(x)\sin\left(x^2\right)\,\rm dx$ diverge.
Now, we have three possibilities.
If $\int_1^\infty g(x)\sin\left(x^2\right)\,\rm dx$ diverges, take $f(x) = g(x)$.
If $\int_1^\infty h(x)\sin\left(x\right)\,\rm dx$ diverges, take $f(x) = h(x)$.
If they both converge, take $f(x) = g(x) + h(x)$.