Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2022/ia/paper-3/9a/b/solution

Differentiating the spherical coordinate system
gives the orthogonal decomposition
where
Thus the scale factors of orthogonal coordinates are
Since the total differential satisfies
comparison of coefficients gives the gradient

New to topics? Read the docs here!