code: def gradient(self):
          r
          func = self
  
          class FunctionalProductGradient(Operator):
  
              """Functional representing the gradient of ``f(.) * g(.)``."""
  
              def _call(self, x):
                  return (func.right(x) * func.left.gradient(x) +
                          func.left(x) * func.right.gradient(x))
  
          return FunctionalProductGradient(self.domain, self.domain,
                                           linear=False)
docs: r"""Gradient operator of the functional.
  
          Notes
          -----
          The derivative is computed using Leibniz's rule:
  
          .. math::
              [\nabla (f g)](p) = g(p) [\nabla f](p) + f(p) [\nabla g](p)