For the purpose of a quantum optics experiment, I come to the following problem : 

Let $X,P \in \mathbf{R}^2$

\begin{equation}
   J(\psi) = | \int_{-X}^{X} x |\psi^2(x) | dx + \int_{-P}^{P} p |Tf(\psi)^2(p) | dp |
\end{equation}

Find:

\begin{equation}
  \left\{
      \begin{aligned}
       \sup_{ \psi  } J(\psi)  \\
      \text{with constraint} \int_{\mathbf{R}} |\psi^2(x) | dx = 1
      \end{aligned}
    \right.
\end{equation}

where Tf is the Fourier transform

$\psi$ functions are supposed to be smooth enough for any purpose. That's why I don't explicitly state in what space they live. 

I tried in this way : 

1) If i upper bound each term *independantly*, I can obtain X+P with a  $\psi^2(x) = \delta(X) $ and $Tf(\psi^2(p)) = \delta(p)$ . From now on, the aim is to make the best of the relation between $\psi$ and its Tf


2) In quantum physics, the problem can be rewritten in the following form :

\begin{equation}
   J(\psi) = | \int_{-X}^{X} x |\psi^2(x) | dx + \int_{-P}^{P} \psi^*(x) \frac{\partial \psi}{\partial x} - \psi(x) \frac{\partial \psi^*}{\partial x}  dx |
\end{equation}


I tried to differentiate J with respect to $\psi$ and $\psi^*$ in order to apply Lagrange multipliers on the functional space of $\psi$ functions. 

**With X = P and the constraint changed**

\begin{equation}
  \left\{
      \begin{aligned}
       \sup_{ \psi  } J(\psi)  \\
      \text{with constraint} \int_{-X}^X |\psi^2(x) | dx = 1
      \end{aligned}
    \right.
\end{equation}


I found:

\begin{equation}
\exists \lambda \\ \text{ such that } \\
2 i \frac{\partial \psi}{\partial  x} + (x - \lambda) \psi = 0
\end{equation}
which I solved with 
\begin{equation}
\psi = C \exp \left( \frac{i(x^2 - \lambda x)}{2} \right)
\end{equation}


Could you please help me with the general problem ? Would you be aware of any litterature treating it ? It seems to me this is linked to the Pauli Problem, yet slightly different.

Thanks in advance.