x[r_,th_, ph_]:=r*Sin[th]*Cos[ph]
y[r_,th_,ph_]:=r*Sin[th]*Sin[ph]
z[r_,th_,ph_]:=r*Cos[th]

dx2=(D[x[r[th,ph], th, ph], th]*dth + D[x[r[th,ph], th, ph], ph]*dph  + D[x[r[th,ph], th, ph], r]*dr )^2

dy2=(D[y[r[th,ph], th, ph], th]*dth + D[y[r[th,ph], th, ph], ph]*dph  + D[y[r[th,ph], th, ph], r]*dr )^2

dz2=(D[z[r[th,ph], th, ph], th]*dth + D[z[r[th,ph], th, ph], ph]*dph  + D[z[r[th,ph], th, ph], r]*dr )^2

ds2=Simplify[dx2+dy2+dz2]

Simplify[Sqrt[(r^2+ Derivative[1,0][r][th,ph]^2)*(r^2*Sin[th]^2+Derivative[0,1][r][th,ph]^2)-(Derivative[1,0][r][th,ph]*Derivative[0,1][r][th,ph])^2]]

(* Get determinant for line element of non-constant radius r *)

g11=Expand[ds2]//.{dth^2->1, dph->0}
g12=Expand[ds2]//.{dth*dph->1, dth^2->0, dph^2->0}
g22=Expand[ds2]//.{dph^2->1, dth->0}

det=Simplify[Sqrt[g11*g22-1/4*g12^2]]