# How to show a function is a test function?

How to show that $$\psi =(x^2\phi)'$$where $\phi$ is a test function, is a test function if and only if $\int_{-\infty}^{\infty} \psi\, dx=\int_{0}^{\infty} \psi\, dx=\psi(0)=0$

-
Whenever $\phi$ is a test function, then $x^2\phi$ is a test function too, and hence so is $\psi = (x^2\phi)'$. As $\psi$ is the derivative of a test function, the integral of $\psi$ is of course $0$. Since $\psi(x) = x^2\phi'(x) + 2x\phi(x)$, and $0^2\cdot \phi(0) = 0$, the other equalities are also given. – Daniel Fischer Oct 26 '13 at 20:41
@DanielFischer Thank you very much – user236626 Oct 26 '13 at 21:28

The question is not worded correctly. If $\phi$ is a test function, then so is $\psi$, no additional conditions are needed. The actual question is: given that $\psi$ is a test function, show that the following are equivalent:

1. $\psi$ is of the form $\psi=(x^2\phi)'$ (with $\phi$ a test function).
2. $\int_{-\infty}^{\infty} \psi dx=\int_{0}^{\infty} \psi dx=\psi(0)=0$

That 1 implies 2 is explained in Daniel Fischer's comment. In the converse direction, let $\Psi$ be an antiderivative of $\psi$ such that $\Psi(0)=0$. The first two conditions in 2 imply that $\Psi$ vanishes at $\pm \infty$, hence is a test function. The last condition says that $\Phi'(0)=0$. From L'Hôpital's rule it follows that the function $\phi(x)=\Psi(x)/x^2$ has a finite limit at $0$, namely $\Psi''(0)/2$. Extending it by $\phi(0)=\Psi''(0)/2$, we get a continuous function on $\mathbb R$. It remains to show that $\phi$ is $C^\infty$ smooth in a neighborhood of $0$, for which I refer to Quotient of two smooth functions is smooth.

-
Why if $\phi$ is a test function, then $\psi$ is a test function? – user236626 Oct 28 '13 at 20:12
@user236626 It's smooth. And each derivative of $\psi$ is a linear combination of derivatives of $\phi$ with polynomial coefficients, which gives the required decay at infinity. – user103402 Oct 28 '13 at 23:38