I am looking for the partial derivative of the function $f$ with respect to $\theta$ in the post https://stats.stackexchange.com/a/404578/372675, but had a different answer to the one in the link. The answer in the post is
$$ \begin{align} \frac{\partial}{\partial{\theta}}\left(\frac{1}{f}\frac{\partial\ln{f}}{\partial{\theta}}\right) = -\frac{1}{f^{2}}\left(\frac{\partial{f}}{\partial{\theta}}\right)^{2} + \frac{1}{f}\frac{\partial^{2}f}{\partial{\theta}^{2}} \end{align} $$
Below is my attempt.
$$\mathrm{Let} \; a = \frac{1}{f}, \; b = \frac{\partial\ln{f}}{\partial{\theta}}, \; \mathrm{then}$$ $$\frac{\partial}{\partial{\theta}}\left(\frac{1}{f}\frac{\partial\ln{f}}{\partial{\theta}}\right) = a'b + b'a= a'\frac{\partial{f}}{\partial{\theta}} + b'\frac{1}{f}$$ $$= -\frac{f'}{f^{2}}\frac{\partial{f}}{\partial{\theta}} + \frac{1}{f}\frac{\partial}{\partial{\theta}}\frac{\partial{f}}{\partial{\theta}} =-\frac{1}{f^{2}}\left(\frac{\partial{f}}{\partial{\theta}}\right)^{2} + \frac{1}{f}\frac{\partial^{2}f}{\left(\partial{\theta}\right)^{2}}$$
Why is my answer different from the one above in the last part? Might I have had an incomplete knowledge or an incorrect misunderstanding of the differentiation rules?
To put it simply, $$\frac{\partial}{\partial{x}} \quad \mathrm{and} \quad \frac{{\partial}^{2}}{\partial{x}^{2}}$$ are operators and not variable that are being multiplied. The former being the first partial derivative with respect to $x$, and the latter being the second partial derivative with respect to $x$. Now imagine we have a function $f$ that is dependent on $x$. We define a function $F'$ to be the partial derivative of $f$ with respect to $x$, i.e., $$F' = \frac{\partial}{\partial{x}}f$$ We can now define a new function $F''$ to be the partial derivative of $F'$ with respect to $x$, which is the second partial derivative of $f$ with respect to $x$. We write them as $$F'' = \frac{\partial}{\partial{x}}F' = \frac{\partial}{\partial{x}}\left(\frac{\partial}{\partial{x}}f\right) = \frac{{\partial}^{2}}{\partial{x}^2}f$$ So to put it in to context, $$\frac{\partial}{\partial{x}}\left(\frac{\partial}{\partial{x}}\right) \neq \frac{\partial}{\partial{x}} \cdot \frac{\partial}{\partial{x}}$$ because, like I mentioned earlier, $$\frac{\partial}{\partial{x}}$$is not a variable that you can multiply.