If f,gf,g are differentiable at xx and g(x)0g(x)\ne0, then gg stays nonzero near xx and

(fg)(x)=f(x)g(x)f(x)g(x)g(x)2.\left(\frac fg\right)'(x)=\frac{f'(x)g(x)-f(x)g'(x)}{g(x)^2}.

This follows by applying the to fg1f\cdot g^{-1} and the chain rule to the reciprocal. The same formula holds for each partial derivative.

Vanishing denominators

The formula does not define a quotient at a zero of gg. A separate extension argument may remove a particular singularity, for example r1ra(r2)=2a(r2)r^{-1}\partial_r a(r^2)=2a'(r^2) for smooth aa. Such cancellation must be established before claiming regularity on the axis.