Suppose I know the time evolution of an operator is given by $\dot{\hat{O}} = \frac{i}{\hbar}[\hat{H}(t), \hat{O}(t)]$. Now I want to look at a function $\hat{f}(\hat{O}$, and I want to know the time evolution of the "values" of this function. I assume that I can expand $\hat{f}$ in a taylor series: Since $\hat{O}$ has an Unitary time evolution $U$, I can write: $$\hat{f}(\hat{O}(t)) = \Sigma_i c_i \hat{O}^i(t) = \\ \Sigma_i c_i (\hat{U}_{t, t_0} \hat{O}(t_0) \hat{U}_{t_0, t})^i = \\ \Sigma_i c_i \hat{U}_{t, t_0} \hat{O}(t_0)^i \hat{U}_{t_0, t} = \\ \hat{U}_{t, t_0} \hat{f}(\hat{O}(t_0)) \hat{U}_{t_0, t} $$ Then computing the time derivative will yield: $$ \frac{d}{dt} \hat{f}(\hat{O}(t)) = \frac{i}{\hbar}[\hat{H}, \hat{f}(\hat{O}(t))] $$
However, I fail to arrive at this same result, if I try to compute the derivative directly: $$ \frac{d}{dt} \hat{f}(\hat{O}(t)) = \Sigma_{j=1} c_j j \hat{O}^{j-1}(t) \dot{\hat{O}}\\ = \Sigma_{j=1} c_j j \hat{O}^{j-1}(t) \frac{i}{\hbar}[\hat{H}(t), \hat{O}(t)] $$ To arrive at the same result, I would have to permute the Hamiltonian $\hat{H}$ through the whole product $(\hat{O}(t))^{j-1}$. I'm stuck here. Am I making a mistake somewhere?