I'm trying to find some $f(x) \neq 0$ that integrated from $0$ to $\infty$ or $-\infty$ to $\infty$ results in $0$. It can be $\int_0^\infty$ or $\int_{-\infty}^\infty$ doesn't matter since it goes to zero.
$\int_0^\infty f(x) \: dx =0$ or $\int_{-\infty }^\infty f(x)\: dx = 0$
Thinking about graphs of functions I thougt that $\int_{-\infty }^\infty \arctan x \:dx$ would work but I'm not sure. I only studied Riemann integrals though.
Any help will be appreciated, thanks.
Consider arbitrary fonctions $h(x)$ and $g(x)$ both integrable on $a\leq x\leq b$ Compute $A$ and $B$ : $$\int_a^b h(x)=A$$ $$\int_a^b g(x)=B$$ Then define a function $f(x)$ : $$f(x)=B\:h(x)-A\:g(x)$$ $$\int_a^b f(x)=0$$ This show how to construct an infinity of functions $f(x)$ which all have the property $$\int_a^b f(x)=0$$
Now the answer to the question :
With $a=0$ and $b$ infinite and with any functions $h(x)$ and $g(x)$ such as the next integrals be convergent. Compute $A$ and $B$ : $$\int_0^\infty h(x)=A$$ $$\int_0^\infty g(x)=B$$ The function $f(x)=B\:h(x)-A\:g(x)$ satisfies $\int_0^\infty f(x)=0$.
Same method for $\int_{-\infty}^\infty f(x)=0$.
EXAMPLE:
$h(x)=\frac{1}{1+x^2}\quad\implies A=\int_0^\infty h(x)=\pi$
$g(x)=\frac{1}{1+x^4}\quad\implies B=\int_0^\infty g(x)=\frac{\pi}{\sqrt{2}}$ $$\int_{-\infty}^\infty f(x)=\int_{-\infty}^\infty \left(\frac{1}{1+x^2}-\frac{\sqrt{2}}{1+x^4}\right)dx=0$$