It took me quite some time (and googling) to understand the partial differentiation technique reported in Riley, Hobson and Bence Mathematical Methods for Physics and Engineering, chapter 5.6 (pg. 160 in my edition).
I report it here to check if I understood it correctly, and maybe also to help someone else with my same problem.
To obtain a second partial derivative with polar coordinates (change of variables) they compute the first partial derivative with respect of x:
$$\frac{∂}{∂x} = \cos φ \frac{∂}{∂ρ} − \frac{\sin φ}{ρ}\frac{∂g}{∂φ}$$
and then (with g being the f function in polar coordinates):
$$\frac{∂^{2}f}{∂x^{2}} = \frac{∂}{∂x}(\frac{∂f}{∂x}) = \frac{∂}{∂x}(\frac{∂}{∂x})f$$ $$=(\cos φ \frac{∂}{∂ρ} − \frac{\sin φ}{ρ}\frac{∂}{∂φ})(\cos φ \frac{∂g}{∂ρ} − \frac{\sin φ}{ρ}\frac{∂g}{∂φ})$$
but here comes the tricky passage:
$$=\cos^{2} φ \frac{∂^{2}g}{∂ρ^{2}} − \frac{2 \cos φ \sin φ}{ρ^{2}}\frac{∂g}{∂φ} - \frac{2 \cos φ \sin φ}{ρ}\frac{∂^{2}g}{∂φ∂ρ} + \frac{\sin^{2}φ}{ρ}\frac{∂g}{∂ρ}+\frac{\sin^{2}φ}{ρ^{2}}\frac{∂^{2}g}{∂φ^{2}}$$
I was naively thinking that it was a simple multiplication and could not figure out the result.
As I understood, it is not a multiplication but rather an "application".
Let's take the first term:
$$cos φ \frac{∂}{∂ρ}(\cos φ \frac{∂g}{∂ρ} − \frac{\sin φ}{ρ}\frac{∂g}{∂φ})$$
Applying the product rule, it becomes:
$$cos φ (\frac{∂}{∂ρ}(\cos φ)\frac{∂g}{∂ρ} + \cos φ \frac{∂}{∂ρ}\frac{∂g}{∂ρ} − \frac{∂}{∂ρ}(\frac{\sin φ}{ρ})\frac{∂g}{∂φ} - \frac{\sin φ}{ρ}\frac{∂}{∂ρ}\frac{∂g}{∂φ})$$
then:
$$\cos φ (0\frac{∂g}{∂ρ} + \cos φ \frac{∂^{2}g}{∂ρ^{2}} + \frac{\sin φ}{ρ^{2}}\frac{∂g}{∂φ} - \frac{\sin φ}{ρ}\frac{∂^{2}g}{∂ρ∂φ})$$
and so on with the other terms.
I still find this notation rather confusing, but now my results are in line with the book.