Annihilation operator acting on density operator in the position representation I have a silly question.
I have a state $\hat{\rho}$ and I make the transformation $\hat{\rho}'=\hat{a}\hat{\rho}\hat{a}^\dagger$ (I want to subtract a photon). 
I expand in the position basis the density operator:
\begin{equation}
\hat{\rho}=\iint dx dx'|x\rangle \rho(x, x') \langle x'|
\end{equation}
and the action of $\hat{a}$ is carried out by knowing that $\hat{a}=(\hat{x}+i\hat{p})/\sqrt{2}$. So
\begin{equation}
\hat{\rho}'=\iint dx dx'\hat{a}|x\rangle \rho(x, x') \langle x'|\hat{a}^\dagger=\iint dx dx'|x\rangle \frac{x-\partial_x}{\sqrt{2}}\rho(x, x')\frac{x'+\partial_{x'}}{\sqrt{2}} \langle x'|\hat{a}^\dagger
\end{equation}
where I used $\hat{p}|x\rangle=i\partial_x$ and $\langle x|\hat{p}=-i\partial_x$.
So I conclude that
\begin{equation}
\rho'(x,x')=\frac{x-\partial_x}{\sqrt{2}}\rho(x, x')\frac{x'+\partial_{x'}}{\sqrt{2}}
\end{equation}
My main problem is that I found a reference where it states that
\begin{equation}
\rho'(x,x')=\frac{x+\partial_x}{\sqrt{2}}\frac{x'+\partial_{x'}}{\sqrt{2}}\rho(x, x')
\end{equation}
A part from the signs which are different, I NEED the differential operators to be on the left to carry out the proof which states $W_{\hat{a}\hat{\rho}\hat{a}^\dagger}=\hat{D}W_{\hat{\rho}}$, where $\hat{D}$ is a differential operator and $W$ is the Wigner quasi-probability distribution. How can I just take a differential operator and put it to the left when the function $\rho(x,x')$ is dependent on the variable $x'$? 
Edit: I think I've always been kind of confused for what concerns differential operator being on the right of a function in QM. Are they acting from the right on $\rho'(x,x')$ (being $\rho'(x,x')=\sum_i p_i \phi_i(x) \phi_i^*(x')$ it would act from the right on $\phi_i^*(x')$). On what these operators are supposed to act?
 A: Indeed, you have garbled your x-representation operators big-time. Here, derivatives always act on the right, and only integrations by part will get them to act on the left.
The important fact you could use is that
$$
\hat x = \int \!\! dx ~~|x\rangle x\langle x|, \qquad \hat p = \int \!\! dx ~~|x\rangle (-i) \partial_x \langle x|,
$$
so that 
$$  \bbox[yellow]{
\sqrt{2} \hat a = \int \!\! dx ~~|x\rangle (x +\partial_x  ) \langle x|, \qquad \sqrt{2} \hat a ^\dagger = \int \!\! dx ~~|x\rangle (x -\partial_x  ) \langle x|  },
$$
whence,
$$\hat{\rho}'=\hat{a}\hat{\rho}\hat{a}^\dagger=\frac{1}{2} \int \!\! dy ~~|y\rangle (y +\partial_y  ) \langle y|
  \iint dx dx'~|x\rangle \rho(x, x') \langle x'|  \int \!\! dz |z\rangle (z -\partial_z  ) \langle z|\\
= \frac{1}{2} \iiiint dx dx' dy dz ~|y\rangle (y+\partial_y) \delta(y-x) \rho(x,x') \delta(x'-z) (z-\partial_z)\langle z| \\
= \frac{1}{2} \iiiint dx dx' dy dz ~|y\rangle \Bigl (  (y-\partial_x) \delta(y-x)\Bigr )  \rho(x,x') \Bigl  ((z-\partial_{x'})\delta(x'-z)\Bigr )  \langle z| \\
=   \frac{1}{2} \iint dx dx'   |x\rangle \Bigl ((x+\partial_x)   (x'+\partial_{x'})   \rho(x,x')  \Bigr ) \langle x'| ,
$$
after collapsing the δ-functions and integrating by parts their derivatives,
mindful of symmetries such as $(\partial_y+\partial_x)\delta(y-x)=0$, etc.

N.B. You might also choose, with Segal and Bargmann (the magnificent), to change representation from $|x\rangle$ to Fock space,
$$
|x\rangle= \frac{e^{x^2/2}}{\pi^{1/4}} e^{-(a^\dagger-\sqrt{2} x)^2/2}  |0\rangle, 
$$
but this is  hardly recommended for your question.
