gftool.hermpade.hermite2_lstsq

gftool.hermpade.hermite2_lstsq(an, p_deg: int, q_deg: int, r_deg: int, rcond=None, fix_qr=None) Tuple[Polynomial, Polynomial, Polynomial][source]

Return the polynomials p, q, r for the quadratic Hermite-Padé approximant.

Same as hermite2, however all elements of an are taken into account. Instead of finding the null-vector of the underdetermined system, the parameter q.coeff[0]=1 is fixed and the system is solved truncating small singular values.

The polynomials fulfill the equation

\[p(x) + q(x) f(x) + r(x) f^2(x) = 𝒪(x^{N_p + N_q + N_r + 2})\]

where \(f(x)\) is the function with Taylor coefficients an, and \(N_x\) are the degrees of the polynomials. The approximant has two branches

\[F^±(z) = [-q(z) ± \sqrt{q^2(z) - 4p(z)r(z)}] / 2r(z)\]
Parameters:
an(L,) array_like

Taylor series coefficients representing polynomial of order L-1.

p_deg, q_deg, r_degint

The order of the polynomials of the quadratic Hermite-Padé approximant. The sum must be at most p_deg + q_deg + r_deg + 2 <= L.

rcondfloat, optional

Cut-off ratio for small singular values. For the purposes of rank determination, singular values are treated as zero if they are smaller than rcond times the largest singular value (default: machine precision times maximum of matrix dimensions).

fix_qrint, optional

The coefficient which is fixed to 1. The values 0 <= fix_qr <= q_deg corresponds to the coefficients of the polynomial q, the values q_deg + 1 <= fix_qr <= q_deg + r_deg + 1 correspond to the coefficients of the polynomial r.

Returns:
p, q, rPolynom

The polynomials p, q, and r building the quadratic Hermite-Padé approximant.

See also

hermite2
Hermite2

High-level interface, guessing the correct branch.

numpy.linalg.lstsq