Solution

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

Away from the origin, differentiate using Einstein notation:
Hence
This gradient is the radial unit vector. Division by is legitimate on the punctured domain; the distance function is not differentiable at the origin.

New to topics? Read the docs here!