Yes, it is okay to simplify x^2 + z^2 to r^2 in your work. This is because in polar coordinates, r represents the distance from the origin to a point, regardless of which plane the point is on.
9.4m questions
12.1m answers