# What is the commutator of a reasonably-behaved function of an operator and the derivative of that function? What is $[f(\hat x) ,f'(\hat x) ]$?

I tried to do the usual procedure and expand the commutator, but couldn't proceed after I Taylor-expanded $$f(\hat x)$$.

$$\Big[f(\hat x),\frac{d}{dx}f(\hat x)\Big]=$$

$$f(\hat x)f'(\hat x)-f'(\hat x)f(\hat x)=$$

$$\sum_0^{\infty}\frac{f^{n}(\hat x_0)}{n!}(\hat x-\hat x_0)^n\sum_0^{\infty}\frac{f^{n+1}(\hat x_0)}{n!}(\hat x-\hat x_0)^n-\sum_0^{\infty}\frac{f^{n+1}(\hat x_0)}{n!}(\hat x-\hat x_0)^n\sum_0^{\infty}\frac{f^{n}(\hat x_0)}{n!}(\hat x-\hat x_0)^n$$

And from here I don't know what to do. Maybe it is not possible to know that commutator without more knowledge of $$f$$.

Could you direct me into the right direction?

I want this commutator to be 0 because it would make my life much easier in a homework problem, that is how I encountered this question.

A function $$f : \mathbb{R}\to\mathbb{R}$$ can be applied to any self-adjoint operator $$A$$ by acting on its eigenvalues. This is the definition of what it means to apply the function to an operator.
That is, if $$A$$ has eigenvalues $$\lambda_i$$ with an eigenbasis $$\lvert \lambda_i\rangle$$, then $$f(A)\lvert \lambda_i\rangle = f(\lambda_i)\lvert \lambda_i\rangle$$. In particular, $$f(A)$$ is diagonal in the basis where $$A$$ is diagonal.
Therefore, for any two functions $$f,g$$, the operators $$f(A),g(A)$$ are simultaneously diagonal in the eigenbasis of $$A$$. Two operators that are simultaneously diagonal commute, so $$f(A)$$ and $$g(A)$$ always commute regardless of what their actual functional form is, so in particular when $$g = f'$$.