.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/04_sunset_dispersion.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_04_sunset_dispersion.py: Two-loop sunset: imaginary part and dispersion relation ======================================================= The imaginary part of the massive sunset from its phase-space representation, and the twice-subtracted dispersion relation :math:`S(s) - S(0) - s S'(0)`. Both are precision-checked numerical integrations, validated against Feynman-parameter integrals and a closed form. Each subtracted value takes 10-20 s. .. GENERATED FROM PYTHON SOURCE LINES 10-19 .. rst-class:: sphx-glr-script-out .. code-block:: none threshold (m1+m2+m3)^2 = 17.1915082254503 s = 10: Im S = 0.0 S(s) - S(0) - s S'(0) = (-0.914137148613 + 0.0j) s = 20: Im S = -0.375849653338 S(s) - S(0) - s S'(0) = (-5.11009352005 - 0.375849653338j) s = 50: Im S = -24.9914650397 S(s) - S(0) - s S'(0) = (-20.0295703709 - 24.9914650397j) s = 100: Im S = -88.1849955516 S(s) - S(0) - s S'(0) = (-19.9854890522 - 88.1849955516j) | .. code-block:: Python import mpmath as mp from ramanujan_qft import sunset_im, sunset_subtracted, sunset_threshold m = (1, 2, 3) print("threshold (m1+m2+m3)^2 =", sunset_threshold(*m)) for s in (10, 20, 50, 100): print(f"s = {s:>4}: Im S = {mp.nstr(sunset_im(s, *m), 12):>16} " f"S(s) - S(0) - s S'(0) = {mp.nstr(sunset_subtracted(s, *m), 12)}") .. rst-class:: sphx-glr-timing **Total running time of the script:** (1 minutes 36.433 seconds) .. _sphx_glr_download_auto_examples_04_sunset_dispersion.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 04_sunset_dispersion.ipynb <04_sunset_dispersion.ipynb>` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 04_sunset_dispersion.py <04_sunset_dispersion.py>` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: 04_sunset_dispersion.zip <04_sunset_dispersion.zip>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_