Suppose we are given a closed interval $[-M,M] \subseteq \mathbb{R}$, $M > 0$. I would like to know whether there exists a function $\psi \in C^\infty(\mathbb{R}; [0,1])$ such that
- $\psi$ has compact support,
- There exists a constant $ c > 0$ so that $\psi > c$ on $[-M,M]$,
- $\partial_x (x\psi(x)) \ge 0$ everywhere on $\mathbb{R}$.
The function
$$\psi(x) = \frac{1}{1 + x^2}$$
is strictly positive on any compact subset of $\mathbb{R}$ and has the property
$$\partial_x(x \psi) = \frac{(x - 1)^2}{1 + x^2} \ge 0 \quad \text{on } \mathbb{R},$$ and so only lacks the compact support requirement. I'm wondering if there is a method of tapering $1/(1 + x^2)$ off to zero outside of $[-M,M]$ without destroying the $\partial_x(x\psi) \ge 0$ property?
Hints or solutions are greatly appreciated.
You've made an error in your example. You can see this without computation: $x/(1+x^2)>0$ on $(0,\infty)$ and $\to 0$ at $\infty.$ Therefore the derivative of $x\psi (x)$ must be negative somewhere.
For your question, a hint: If $\psi(x)$ has compact support, then so does $x\psi(x).$ How can a smooth function with compact support have everywhere nonnegative derivative?