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 \int_1^\infty e^{iax}\frac{\ln x}{x} \, \operatorname{d}x = -\frac{\pi^2}{24} + \gamma\left(\frac{\gamma}{2}+\ln a\right)+\frac{\ln^2 a}{2} -\frac{\pi}{2}i\left(\gamma+\ln a\right) + \sum_{n\ge 1}\frac{(ia)^n}{n!n^2} ~. }

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

Semantic latex: \int_1^\infty \expe^{\iunit ax} \frac{\ln x}{x} \operatorname \diff{x} = - \frac{\cpi^2}{24} + \EulerConstant(\frac{\EulerConstant}{2} + \ln a) + \frac{\ln^2 a}{2} - \frac{\cpi}{2} \iunit(\EulerConstant + \ln a) + \sum_{n\ge 1} \frac{(\iunit a)^n}{n!n^2}

Confidence: 0

Mathematica

Translation:

Information

Symbol info

  • (LaTeX -> Mathematica) The input LaTeX is invalid: \operatorname has no argument

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

  • (LaTeX -> SymPy) The input LaTeX is invalid: \operatorname has no argument

Tests

Symbolic
Numeric

Maple

Translation:

Information

Symbol info

  • (LaTeX -> Maple) The input LaTeX is invalid: \operatorname has no argument

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_cee139daf4f1cac2dcfdc0ebd0d7f8b4",
  "formula" : "\\int_1^\\infty e^{iax}\\frac{\\ln x}{x}  \\operatorname{d}x = \n-\\frac{\\pi^2}{24} + \\gamma\\left(\\frac{\\gamma}{2}+\\ln a\\right)+\\frac{\\ln^2 a}{2} \n-\\frac{\\pi}{2}i\\left(\\gamma+\\ln a\\right) + \\sum_{n\\ge 1}\\frac{(ia)^n}{n!n^2}  ~",
  "semanticFormula" : "\\int_1^\\infty \\expe^{\\iunit ax} \\frac{\\ln x}{x} \\operatorname \\diff{x} = - \\frac{\\cpi^2}{24} + \\EulerConstant(\\frac{\\EulerConstant}{2} + \\ln a) + \\frac{\\ln^2 a}{2} - \\frac{\\cpi}{2} \\iunit(\\EulerConstant + \\ln a) + \\sum_{n\\ge 1} \\frac{(\\iunit a)^n}{n!n^2}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Mathematica) The input LaTeX is invalid: \\operatorname has no argument"
        }
      }
    },
    "SymPy" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> SymPy) The input LaTeX is invalid: \\operatorname has no argument"
        }
      }
    },
    "Maple" : {
      "translation" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> Maple) The input LaTeX is invalid: \\operatorname has no argument"
        }
      }
    }
  },
  "positions" : [ ],
  "includes" : [ "\\gamma", "\\pi", "\\int_1^\\infty e^{iax}\\frac{\\ln x}{x} \\, \\operatorname{d}x = -\\frac{\\pi^2}{24} + \\gamma\\left(\\frac{\\gamma}{2}+\\ln a\\right)+\\frac{\\ln^2 a}{2} -\\frac{\\pi}{2}i\\left(\\gamma+\\ln a\\right) + \\sum_{n\\ge 1}\\frac{(ia)^n}{n!n^2}", "x" ],
  "isPartOf" : [ "\\int_1^\\infty e^{iax}\\frac{\\ln x}{x} \\, \\operatorname{d}x = -\\frac{\\pi^2}{24} + \\gamma\\left(\\frac{\\gamma}{2}+\\ln a\\right)+\\frac{\\ln^2 a}{2} -\\frac{\\pi}{2}i\\left(\\gamma+\\ln a\\right) + \\sum_{n\\ge 1}\\frac{(ia)^n}{n!n^2}" ],
  "definiens" : [ ]
}

Specify your own input