Symmetric Bilinear Form — cxroots 1.1.0 documentation

# Symmetric Bilinear Form

To find the distinct roots \(\{z_i\}_{i=1}^n\) and corresponding multiplicities \(\{m_i\}\) of the given function \(f(z)\) within the given contour \(C\) use is made of the fact that

\[\frac{1}{2\pi i} \int_C \phi(z)\psi(z) \frac{f'(z)}{f(z)} dz = \sum_{i=1}^n m_i \phi(z_i) \psi(z_i)\]

In cxroots the left hand side is computed using the function `prod()`.

`cxroots.CountRoots.` `prod`(C, f, df=None, phi=None, psi=None, absTol=1e-12, relTol=1e-12, divMin=3, divMax=15, m=2, intMethod='quad', integerTol=inf, verbose=False, callback=None)

  Compute the symmetric bilinear form used in (1.12) of [KB].

  \[<\phi,\psi> = \frac{1}{2\pi i} \oint_C \phi(z) \psi(z) \frac{f'(z)}{f(z)} dz.\]

  Parameters: | C (`Contour`) – A contour in the complex plane for. No roots or poles of f should lie on C. f (function) – Function of a single variable f(x) df (function, optional) – Function of a single variable, df(x), providing the derivative of the function f(x) at the point x. If not provided then df is approximated using a finite difference method. phi (function, optional) – Function of a single variable phi(x). If not provided then phi(z)=1. psi (function, optional) – Function of a single variable psi(x). If not provided then psi(z)=1. absTol (float, optional) – Absolute error tolerance for integration. relTol (float, optional) – Relative error tolerance for integration. divMin (int, optional) – Only used if intMethod=’romb’. Minimum number of divisions before the Romberg integration routine is allowed to exit. divMax (int, optional) – Only used if intMethod=’romb’. The maximum number of divisions before the Romberg integration routine of a path exits. m (int, optional) – Only used if df=None and intMethod=’quad’. Must be even. The argument order=m is passed to numdifftools.Derivative and is the order of the error term in the Taylor approximation. intMethod ({'quad', 'romb'}, optional) – If ‘quad’ then scipy.integrate.quad is used to perform the integral. If ‘romb’ then Romberg integraion, using scipy.integrate.romb, is performed instead. integerTol (float, optional) – Only used when intMethod is ‘romb’. The integration routine will not exit unless the result is within integerTol of an integer. This is useful when computing the number of roots in a contour, which must be an integer. By default integerTol is inf. verbose (bool, optional) – If True runtime information will be printed. False be default. callback (function, optional) – Only used when intMethod is ‘romb’. A function that at each step in the iteration is passed the current approximation for the integral, the estimated error of that approximation and the number of iterations. If the return of callback evaluates to True then the integration will end.
  Returns: | complex – The value of the integral <phi, psi>. float – An estimate of the error for the integration.

  References

  [KB] | “Computing the zeros of analytic functions” by Peter Kravanja, Marc Van Barel, Springer 2000