gudrunhe / secdec

a program to evaluate dimensionally regulated parameter integrals numerically
GNU General Public License v3.0
26 stars 5 forks source link

Problem with square roots #22

Open ltmoos opened 2 years ago

ltmoos commented 2 years ago

Hello,

I am currently trying to run pySecDec with the following generate-file: (This is just kind of a minimal example, in general I expect overlapping divergences from the part with the square roots and thus cannot put it into remainder_expression )

#!/usr/bin/env python3

import shutil
from pySecDec import make_package

if __name__ == "__main__":

make_package(

name = 't5o',
integration_variables = ['t2','x','t4','t5','x2','t8','t9','t10'],
regulators = ['eps'],
real_parameters = ['zz'],

split = True,
enforce_complex = True,

requested_orders = [-1],
polynomials_to_decompose = ['(t6*(1 - t9) + t9)','((1-t2)*t3*(1-t3)*t4*(1-t4)*t9*(1-t9))**(-eps)',
'(t5*(1-t5))**(-1-eps)','(t2*t6)**(1-2*eps)','(1-t6)**(-2*eps)','(t8*(1-t8)*t10*(1-t10))**(-1/2-eps)','(t9 - 2*sqrt(t3*(1-t3)*t9*(1-t9)*t6)  * (-1 + 2*t8)* (-1 + zz) + t3 * (t6 * (-1 + t9) + t9) * (-1 + zz) + t6 * zz - t6 * t9 * zz)**(-1)'],
other_polynomials = ['(1-t6*zz)**(-1)','(zz)**(2-3*eps)','(1-zz)**(1-2*eps)'],

form_work_space = '1G',
)

but I get the following error message:

sympy.polys.polyerrors.PolynomialError: sqrt(t3*t6*t9*(1 - t3)*(1 - t9)) contains an element of the set of generators.

From my understanding, pySecDec should in principle be working with square roots, but is it problematic in this case that the expression contains e.g. t3, 1-t3, sqrt(t3) and sqrt1-t3)?

Greetings, Lars

jPhy commented 2 years ago

Try replacing sqrt(t3*(1-t3)*t9*(1-t9)*t6) by (t3*(1-t3)*t9*(1-t9)*t6)**(1/2).

ltmoos commented 2 years ago

Try replacing sqrt(t3*(1-t3)*t9*(1-t9)*t6) by (t3*(1-t3)*t9*(1-t9)*t6)**(1/2).

sympy seems to automatically convert x**(1/2) to sqrt(x) and then gives me the same error message

gudrunhe commented 2 years ago

It seems possible solutions would require some manual work. (a) a non-linear variable transformation to eliminate the square-root, or (b) define the argument of the square root as a separate function and put it into polynomials_to_decompose with power zero, then pysecdec would decompose it but not multiply it to the decomposed polynomials. However this would require some manual step to insert it back into the full expression (and it is not guaranteed that the full expression has the same factorisation properties). Furthermore, the expression seems to generate singularities at x=1, so it would need a "split" or some other transformation to map the singularities to the origin.

jPhy commented 2 years ago

I missed that the sqrt is actually part of a larger expression in your polynomials_to_decompose. If you just had sqrt(t3*(1-t3)*t9*(1-t9)*t6) in your polynomials_to_decompose, then pySecDec would just deal with it as expected, definitely when using **(1/2) instead of sqrt. However, you have (t9 - 2*sqrt(t3*(1-t3)*t9*(1-t9)*t6) * (-1 + 2*t8)* (-1 + zz) + t3 * (t6 * (-1 + t9) + t9) * (-1 + zz) + t6 * zz - t6 * t9 * zz)**(-1) where the base/denominator cannot be represented as a polynomial.

You probably want to provide that expression as a remainder_expression:

    make_package(

    name = 't5o',
    integration_variables = ['t2','x','t4','t5','x2','t8','t9','t10'],
    regulators = ['eps'],
    real_parameters = ['zz'],

    split = True,
    enforce_complex = True,

    requested_orders = [-1],
    polynomials_to_decompose = ['(t6*(1 - t9) + t9)','((1-t2)*t3*(1-t3)*t4*(1-t4)*t9*(1-t9))**(-eps)',
    '(t5*(1-t5))**(-1-eps)','(t2*t6)**(1-2*eps)','(1-t6)**(-2*eps)','(t8*(1-t8)*t10*(1-t10))**(-1/2-eps)'],
    other_polynomials = ['(1-t6*zz)**(-1)','(zz)**(2-3*eps)','(1-zz)**(1-2*eps)'],
    remainder_expression='(t9 - 2*sqrt(t3*(1-t3)*t9*(1-t9)*t6)  * (-1 + 2*t8)* (-1 + zz) + t3 * (t6 * (-1 + t9) + t9) * (-1 + zz) + t6 * zz - t6 * t9 * zz)**(-1)',

    form_work_space = '1G',
    )