LaTeX to CAS translator

Jump to navigation Jump to search

This mockup demonstrates the concept of TeX to Computer Algebra System (CAS) conversion.

The demo-application converts LaTeX functions which directly translate to CAS counterparts.

Functions without explicit CAS support are available for translation via a DRMF package (under development).

The following LaTeX input ...

{\displaystyle \begin{align} \Gamma(x)\Gamma(y) &= \int_{z=0}^\infty\int_{t=0}^1 e^{-z} (zt)^{x-1}(z(1-t))^{y-1}z\,dt \,dz \\[6pt] &= \int_{z=0}^\infty e^{-z}z^{x+y-1} \,dz\cdot\int_{t=0}^1 t^{x-1}(1-t)^{y-1}\,dt\\ &=\Gamma(x+y) \cdot \Beta(x,y). \end{align}}

... is translated to the CAS output ...

Semantic latex: \begin{align}\EulerGamma@{x} \EulerGamma@{y} &= \int_{z=0}^\infty \int_{t=0}^1 \expe^{-z}(zt)^{x-1}(z(1 - t))^{y-1} zdt dz \\ &= \int_{z=0}^\infty \expe^{-z} z^{x+y-1} dz \cdot \int_{t=0}^1 t^{x-1}(1 - t)^{y-1} dt \\ &= \EulerGamma@{x + y} \cdot \Beta(x , y) .\end{align}

Confidence: 0.61788109628084

Mathematica

Translation:

Information

Symbol info

  • (LaTeX -> Mathematica) The input LaTeX is invalid: Unable to retrieve free variables for limit expression.

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

  • (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \EulerGamma [\EulerGamma]

Tests

Symbolic
Numeric

Maple

Translation:

Information

Symbol info

  • (LaTeX -> Maple) The input LaTeX is invalid: Unable to retrieve free variables for limit expression.

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_dc0310cfc7331094560465a7e9d83aa7",
  "formula" : "\\begin{align}\n\\Gamma(x)\\Gamma(y) &= \\int_{z=0}^\\infty\\int_{t=0}^1 e^{-z} (zt)^{x-1}(z(1-t))^{y-1}zdt dz \\\\\n &= \\int_{z=0}^\\infty e^{-z}z^{x+y-1} dz\\cdot\\int_{t=0}^1 t^{x-1}(1-t)^{y-1}dt\\\\\n &=\\Gamma(x+y) \\cdot \\Beta(x,y).\n\\end{align}",
  "semanticFormula" : "\\begin{align}\\EulerGamma@{x} \\EulerGamma@{y} &= \\int_{z=0}^\\infty \\int_{t=0}^1 \\expe^{-z}(zt)^{x-1}(z(1 - t))^{y-1} zdt dz \\\\ &= \\int_{z=0}^\\infty \\expe^{-z} z^{x+y-1} dz \\cdot \\int_{t=0}^1 t^{x-1}(1 - t)^{y-1} dt \\\\ &= \\EulerGamma@{x + y} \\cdot \\Beta(x , y) .\\end{align}",
  "confidence" : 0.6178810962808362,
  "translations" : {
    "Mathematica" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Mathematica) The input LaTeX is invalid: Unable to retrieve free variables for limit expression."
        }
      }
    },
    "SymPy" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\EulerGamma [\\EulerGamma]"
        }
      }
    },
    "Maple" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Maple) The input LaTeX is invalid: Unable to retrieve free variables for limit expression."
        }
      }
    }
  },
  "positions" : [ ],
  "includes" : [ "x, y", "\\Gamma(x+y)", "y", "\\Gamma", "\\Beta", "x", "\\begin{align}\\Gamma(x)\\Gamma(y) &= \\int_{z=0}^\\infty\\int_{t=0}^1 e^{-z} (zt)^{x-1}(z(1-t))^{y-1}z\\,dt \\,dz \\\\[6pt] &= \\int_{z=0}^\\infty e^{-z}z^{x+y-1} \\,dz\\cdot\\int_{t=0}^1 t^{x-1}(1-t)^{y-1}\\,dt\\\\ &=\\Gamma(x+y) \\cdot \\Beta(x,y).\\end{align}" ],
  "isPartOf" : [ "\\begin{align}\\Gamma(x)\\Gamma(y) &= \\int_{z=0}^\\infty\\int_{t=0}^1 e^{-z} (zt)^{x-1}(z(1-t))^{y-1}z\\,dt \\,dz \\\\[6pt] &= \\int_{z=0}^\\infty e^{-z}z^{x+y-1} \\,dz\\cdot\\int_{t=0}^1 t^{x-1}(1-t)^{y-1}\\,dt\\\\ &=\\Gamma(x+y) \\cdot \\Beta(x,y).\\end{align}" ],
  "definiens" : [ ]
}

Specify your own input