Proving commutator [${L}_i, f(r)]=0$ I am trying to prove that the angular momentum component operator  ${L}_i$ commutes with any function of ${r}\equiv \sqrt{{\textbf{x}}\cdot{\textbf{x}}}$, i.e.
$$[L_i,  f( r)]=0.$$
I first worked out  that $L_i$ commutes with $\textbf{x}\cdot\textbf{x}$, i.e. $$[L_i,\textbf{x}^2]=0.$$
I then expanded $f(r)$ in terms of a power series:
$$f(r)=\sum_n a_nr^n=\sum_na_n(\textbf{x}\cdot\textbf{x})^{n\over 2}.$$
Next, I want to show that $L_i$ commutes with $(\textbf{x}\cdot\textbf{x})^{n\over 2}$, where $n$ is a positive integer, i.e.
$$[L_i,(\textbf{x}\cdot\textbf{x})^{n\over 2}]=0.$$
What commutator rule can I use to evaluate this?
 A: The answers given by Philip and Alexander are correct, but let me add another snippet of information: one could calculate the commutation in the polar coordinates! Then:
$$\hat{L}_i = \frac{\partial}{\partial \phi_i},$$
whereas $f(r)$ is obviously independent on angle $\phi_i$.
A: Hint 1:
There is a basic identity (derived upon several restrictions) that in your case reads as -
$$[L_i,f(r)]=[L_i,r]f'(r)$$
Applying the same relation you can show that if operator commutes with $r$, it commutes with any function of $r$
You can also use the following for $L_i$ to relax the expression -
$$[AB,C]=A[B,C]+[A,C]B$$
@Philips answer also useful, though in general case (when the operator doesn't commute with the commutator) the order (which side to land the $f'$) matters. In this case you should be able to use the identities to break the expression up to $[x,p]$ commutator, which is constant, thus commutes with everything.
Hint 2:
The following reference seems very helpful for the most general case
http://hdl.lib.byu.edu/1877/1263
General answer:
Essentially, angular momentum operators operate on angle variables (real space representation), while the $f(r)$ function is independent of angular coordinates. Thus you can switch freely the order of operators.
The following reference has solution to your question
http://www.physics.ucc.ie/apeer/PY3102/Angular_momentum.pdf
A: You could use the following rule that states that if you have two operators $A$ and $B$ such that $[B,[A,B]]=0$, then
$$[A, f(B)] = f'(B)[A,B].$$
A: There are multiple ways of proving this, as other answers show. Here is another one. There is a general identity that states that if $[x, y]=0$, then $[x,f(y)]=0$, where $f$ is some function. The result you are after follows immediately from this, with $f(y)=\sqrt y$.
To prove this identity, let us first show that $[x,y]=0$ implies $[x, y^n]$, where $n$ is any non-negative integer. We can do this by induction. Suppose that $[x,y^m]=0$ for all $m<n$. Then,
$$\begin{aligned} \left[x, y^n\right] & = xy^n-y^nx \\ &= xy^{n-1}y -y^{n-1}yx \\ &= y^{n-1}xy-y^{n-1}yx\\ &=y^{n-1}[x,y] \\ &= 0. \end{aligned}$$
Then, since $f(y)$ can be expanded into a Taylor series involving powers of $y$, it follows from $[x,y]=0$ that $[x,f(y)]=0$.
Edit: As has been brought up in comments, the square root function is not actually analytic on $\mathbb{C}$, although it can be chosen to be analytic on $\mathbb{C}-\{0\}$. This would mean the proof may not be valid for this function. I'm not exactly sure that the function being non-analytic at $0$ invalidates this approach though, so I will keep this answer so others can comment on this, and also because $[x,f(y)]=0$ (with $f$ analytic) is a useful identity.
