Package-X is hosted by Hepforge, IPPP Durham

Hiren H. Patel


Package‑X is a Mathematica package for the analytic calculation and symbolic manipulation of one-loop Feynman integrals in relativistic quantum field theory.

    Technical features

  • Computes dimensionally regulated one-loop integrals with up to four distinct propagators of arbitrarily high rank.
  • Calculates traces of Dirac matrices in d dimensions for closed fermion loops, or carries out Dirac algebra for open fermion lines
  • Generates analytic results for any kinematic configuration (e.g. at zero external momentum, at physical threshold, etc.) for real masses and external invariants.
  • Provides analytic expressions for UV-divergent, IR-divergent and finite parts either separately or all together.
  • Computes discontinuities across cuts of one-loop integrals.
  • Constructs Taylor series expansions for one-loop integrals.
  • Evaluates with either machine precision or arbitrary precision arithmetic, and is always consistent with the + prescription.

    User interface features

  • Complete documentation available online and within the Wolfram Documentation Center which includes
    • over 350 basic usage examples with detailed information for every symbol defined by Package‑X,
    • 4 project-scale tutorials,
    • and instructions on linking Package‑X to FeynCalc, LoopTools, and the COLLIER library.
  • Readable and intuitive input
  • Output easily manipulatable and readily numerically evaluatable
  • Command-line friendly

Reference and Source

Package‑X was developed after several long years of tedious work. Please include the following citation if Package‑X was useful for your publication.
    Hiren H. Patel, Comput. Phys. Commun. 197, 276 (2015),
    ePrint: arXiv:1503.01469

Esentially all algorithms and formulae used by Package‑X can be viewed in handwritten form at (Vol II, §1 and §5, and Vol V).

Bug report and feature request

Please report any bugs to Any comments and suggestions for improvements, including feature requests, are welcome.

Latest Program Files, License, and Release Notes

Package‑X 2.1 is closed source and distributed under the CC by 4.0 license agreement.

v2.1.0: (September 7, 2017) Download | Primer | Documentation
  • Numerous symbols have been renamed to make Package‑X command-line friendly (more info).
  • Added option Dimensions->4 to LoopIntegrate, LoopRefine, and LoopRefineSeries to facilitate the calculation of loop integrals in spacetime dimensions other than 4.
  • Option Part to LoopRefine can now take the setting Discontinuity[s] to calculate discontinuities across normal threshold cuts of one-loop integrals.
  • The precision of output of special functions (ScalarC0, ScalarD0, etc) evaluated with arbitrary precision arithmetic now tracks the precision of input. It is no longer necessary to experimentally adjust the input precision to achieve the desired precision.
  • X`Utilities`EnableFancyInput and X`Utilities`DisableFancyInput have been renamed to X`Utilities`EnableFancyIO and X`Utilities`DisableFancyIO, respectively.
  • LoopIntegrate and Projector no longer support v1.0 syntax.
  • PVC no longer automatically reorganizes its arguments.
  • Added tutorial "Tree-Level e+e→γγ Cross Secion by The Optical Theorem".
  • Added tutorial "Linking Package-X to COLLIER".
  • Fixed a bug affecting FermionLineExpand and LoopIntegrate that occasionally caused FermionLineProduct to be expanded incorrectly.
  • Fixed a bug where D0Expand would fail to return an analytic expression when trying to expand ScalarD0IR16 in certain cases (thanks, Christoph Bobeth).


Any computer running Mathematica 8.0.4 or higher.
Recommended: Mathematica 10.1.0 or higher.

Note A bug was introduced in Mathematica 10.4.0 (fixed in 11.0.0) causing the numerical evaluation of Package‑X special functions compiled to the Wolfram Virtual Machine (e.g. ScalarC0, ScalarD0, ...) to take an excessive amount of time.

Installation Instructions

Uncompress downloaded file, and copy the Package‑X folder (/X) with all its contents to the folder $UserBaseDirectory/Applications/. See the primer for details.

Expansion Packs

Interface to the COLLIER library for rapid numerical evaluation of Passarino-Veltman functions GPLv3 Download | Documentation 8.0+
Compute vector derivatives (gradients) of loop integrals CC by 4.0 (by request) 10.1+
Reduce Passarino-Veltman functions to scalar functions without limiting to 4 dimensions, and without inserting explicit formulae CC by 4.0 (by request) 8.0+

To install an expansion pack, uncompress the downloaded file, and copy the directory with all its contents to the folder $UserBaseDirectory/Applications/ (but not inside the Package‑X directory itself).