Consider the following quantity,
$$I = \int x^2|\eta(x)|^2 \ dx,$$.
For $\eta(x)$ a solution to some linear equation, we have
$\eta(x) = \int a(k) e^{ikx} \ dk$ where, for $\eta$ to be real, we have $a(-k) = a^*(k)$.
Therefore, the integral $I$ becomes
$$I = \int\int a(k)a^*(k')\left(\int_{-\infty}^{\infty} x^2 e^{i(k-k')x}\ dx\right) \ dk dk'$$.
Now, the term in parenthesis can be found to be $-\delta''(k-k')$ where $\delta$ is the dirac delta function and primes are differentiation w.r.t $k$. Therefore, $I$ becomes
$$I=-\int a(k')\left(\frac{\partial^2}{\partial k^2} a(k)\right) \ dk$$.
Now, consider a wave packet defined as $$a(k) =S/k\quad k\in(k_o-dk/2,k_o+dk/2),$$ and zero otherwise, $S$ is a constant, $dk$ is the bandwidth and $k_o$ is some central wavenumber.
Now, if I substitute this into the last equation for $I$, this yields a negative number, which is absurd since $I$ is a positive definite integral.
What am I missing?