Question on how to make product rule for differentiation consistent with operators? By the product rule for differentiation:$$\frac{\partial(\hat A\psi)}{\partial x}=\left(\frac{\partial\hat A}{\partial x}\right)\psi+\hat A\left(\frac{\partial\psi}{\partial x}\right)\tag{1}$$
Where $\hat A$ is an operator and $\psi$ is a function depend on $x$ i.e. $\psi=\psi(x)$.
My question is: when $\hat A$ takes the form of momentum operator: $\hat A=\hat P=-i\hbar \frac{\partial}{\partial x}$, it looks like the product rule for differentiation no longer work (I'm not sure this statement is right or not) since the correct answer should be:
$$\frac{\partial(\hat P\psi)}{\partial x}=-i\hbar\left(\frac{\partial^2}{\partial x^2}\right)\psi-i\hbar\left(\frac{\partial^2\psi}{\partial x^2}\right).$$
It doesn't equal to the answer given by $(1)$.
Another question:
$$\frac{\partial(\psi\hat A)}{\partial t}=\left(\frac{\partial\psi}{\partial t}\right)\hat A+\psi\left(\frac{\partial\hat A}{\partial t}\right)\tag{2}$$
Where $\hat A$ now takes the form of  $\hat A=\frac{\partial}{\partial t}$ and $\psi$ is a function depend on $t$ i.e. $\psi=\psi(t)$, then the product rule for differentiation now do works. (I'm pretty sure about this one is correct because it's a derivation from the book.)
I must have confused something. Can someone help me or give me some comments that may correct my question please?
 A: OP is essentially asking how to make sense of
$$\frac{\partial\hat{A}}{\partial x}\tag{i}$$
in OP's eq. (1), where $\hat{A}$ is a differential operator, in particular if $\hat{A}=\frac{\partial}{\partial x}$. The problem is partly that the notation (i) is ambiguous, cf. e.g. Do derivatives of operators act on the operator itself or are they "added to the tail" of operators? In OP's case, the derivative in (i) does not act further, so we can rewrite (i) via Leibniz rule as a commutator
$$ \left[\frac{\partial}{\partial x},\hat{A}\right]\tag{i'}$$
Then OP's eq. (1) turns into a well-known non-commutative Leibniz rule:
$$ \left[\frac{\partial}{\partial x},\hat{A}\psi\right]~=~\left[\frac{\partial}{\partial x},\hat{A}\right]\psi+\hat{A}\underbrace{\left[\frac{\partial}{\partial x},\psi\right]}_{=\psi^{\prime}(x)},
\tag{1'}$$
free of notational paradoxes. (Technically, the wavefunction $\psi\leftrightarrow \hat{M}_{\psi}$ is here identified with a zeroth-order differential operator, i.e. a left multiplication operator $\hat{M}_{\psi}\phi:=\psi\phi$.)
