<P> The general form of the formula to prove the differential line element, is </P> <P> d r = ∑ i ∂ r ∂ x i d x i = ∑ i ∂ r ∂ x i ∂ r ∂ x i ∂ r ∂ x i d x i = ∑ i ∂ r ∂ x i d x i x ^ i (\ displaystyle \ mathrm (d) \ mathbf (r) = \ sum _ (i) (\ frac (\ partial \ mathbf (r)) (\ partial x_ (i))) \ mathrm (dx_ (i)) = \ sum _ (i) \ left (\ frac (\ partial \ mathbf (r)) (\ partial x_ (i))) \ right (\ frac (\ frac (\ partial \ mathbf (r)) (\ partial x_ (i))) (\ left (\ frac (\ partial \ mathbf (r)) (\ partial x_ (i))) \ right)) \ mathrm (dx_ (i)) = \ sum _ (i) \ left (\ frac (\ partial \ mathbf (r)) (\ partial x_ (i))) \ right \ mathrm (dx_ (i)) (\ hat (\ boldsymbol (x))) _ (i)) </P> <P> that is, the change in r (\ displaystyle (\ mathbf (r))) is decomposed into individual changes corresponding to changes in the individual coordinates . To apply this to the present case, you need to calculate how r (\ displaystyle (\ mathbf (r))) changes with each of the coordinates . With the conventions being used, we have </P> <P> r = (r sin ⁡ θ cos ⁡ φ r sin ⁡ θ sin ⁡ φ r cos ⁡ θ) (\ displaystyle \ mathbf (r) = (\ begin (bmatrix) r \ sin \ theta \ cos \ phi \ \ r \ sin \ theta \ sin \ phi \ \ r \ cos \ theta \ end (bmatrix))) </P>

Spherical coordinates in terms of x y z