Let’s consider the vector space C0([a,b],R) of continuous real functions defined on a compact interval [a,b]. We can define an inner product on pairs of elements f,g of C0([a,b],R) by ⟨f,g⟩=∫baf(x)g(x) dx.
It is known that f∈C0([a,b],R) is the always vanishing function if we have ⟨xn,f⟩=∫baxnf(x) dx=0 for all integers n≥0. Let’s recall the proof. According to Stone-Weierstrass theorem, for all ϵ>0 it exists a polynomial P such that ‖f–P‖∞≤ϵ. Then 0≤∫baf2=∫baf(f−P)+∫bafP=∫baf(f−P)≤‖f‖∞ϵ(b−a) As this is true for all ϵ>0, we get ∫baf2=0 and f=0.
We now prove that the result becomes false if we change the interval [a,b] into [0,∞), i.e. that one can find a continuous function f∈C0([0,∞),R) such that ∫∞0xnf(x) dx for all integers n≥0. In that direction, let’s consider the complex integral In=∫∞0xne−(1−i)x dx. In is well defined as for x∈[0,∞) we have |xne−(1−i)x|=xne−x and ∫∞0xne−x dx converges. By integration by parts, one can prove that In=n!(1−i)n+1=(1+i)n+12n+1n!=eiπ4(n+1)2n+12n!. Consequently, I4p+3∈R for all p≥0 which means ∫∞0x4p+3sin(x)e−x dx=0 and finally ∫∞0upsin(u1/4)e−u1/4 dx=0 for all integers p≥0 using integration by substitution with x=u1/4. The function u↦sin(u1/4)e−u1/4 is one we were looking for.