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 D_+(x) = \frac12 \int_0^\infty e^{-t^2/4}\,\sin(xt)\,dt.}

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

Semantic latex: D_+(x) = \frac12 \int_0^\infty \expe^{-t^2/4} \sin(xt) \diff{t}

Confidence: 0

Mathematica

Translation: Subscript[D, +][x] == Divide[1,2]*Integrate[Exp[- (t)^(2)/4]*Sin[x*t], {t, 0, Infinity}, GenerateConditions->None]

Information

Sub Equations

  • Subscript[D, +][x] = Divide[1,2]*Integrate[Exp[- (t)^(2)/4]*Sin[x*t], {t, 0, Infinity}, GenerateConditions->None]

Free variables

  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Recognizes e with power as the exponential function. It was translated as a function.
  • Sine; Example: \sin@@{z}

Will be translated to: Sin[$0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E1 Mathematica: https://reference.wolfram.com/language/ref/Sin.html

Tests

Symbolic
Numeric

SymPy

Translation: Symbol('{D}_{+}')(x) == (1)/(2)*integrate(exp(- (t)**(2)/4)*sin(x*t), (t, 0, oo))

Information

Sub Equations

  • Symbol('{D}_{+}')(x) = (1)/(2)*integrate(exp(- (t)**(2)/4)*sin(x*t), (t, 0, oo))

Free variables

  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Recognizes e with power as the exponential function. It was translated as a function.
  • Sine; Example: \sin@@{z}

Will be translated to: sin($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E1 SymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#sin

Tests

Symbolic
Numeric

Maple

Translation: D[+](x) = (1)/(2)*int(exp(- (t)^(2)/4)*sin(x*t), t = 0..infinity)

Information

Sub Equations

  • D[+](x) = (1)/(2)*int(exp(- (t)^(2)/4)*sin(x*t), t = 0..infinity)

Free variables

  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
  • Recognizes e with power as the exponential function. It was translated as a function.
  • Sine; Example: \sin@@{z}

Will be translated to: sin($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E1 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=sin

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Complete translation information:

{
  "id" : "FORMULA_7b3cb100315044dbfee6dfdc07407142",
  "formula" : "D_+(x) = \\frac12 \\int_0^\\infty e^{-t^2/4}\\sin(xt)dt",
  "semanticFormula" : "D_+(x) = \\frac12 \\int_0^\\infty \\expe^{-t^2/4} \\sin(xt) \\diff{t}",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Subscript[D, +][x] == Divide[1,2]*Integrate[Exp[- (t)^(2)/4]*Sin[x*t], {t, 0, Infinity}, GenerateConditions->None]",
      "translationInformation" : {
        "subEquations" : [ "Subscript[D, +][x] = Divide[1,2]*Integrate[Exp[- (t)^(2)/4]*Sin[x*t], {t, 0, Infinity}, GenerateConditions->None]" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "D" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
          "\\sin" : "Sine; Example: \\sin@@{z}\nWill be translated to: Sin[$0]\nRelevant links to definitions:\nDLMF:         http://dlmf.nist.gov/4.14#E1\nMathematica:  https://reference.wolfram.com/language/ref/Sin.html"
        }
      },
      "numericResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    },
    "SymPy" : {
      "translation" : "Symbol('{D}_{+}')(x) == (1)/(2)*integrate(exp(- (t)**(2)/4)*sin(x*t), (t, 0, oo))",
      "translationInformation" : {
        "subEquations" : [ "Symbol('{D}_{+}')(x) = (1)/(2)*integrate(exp(- (t)**(2)/4)*sin(x*t), (t, 0, oo))" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "D" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
          "\\sin" : "Sine; Example: \\sin@@{z}\nWill be translated to: sin($0)\nRelevant links to definitions:\nDLMF:  http://dlmf.nist.gov/4.14#E1\nSymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#sin"
        }
      },
      "numericResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    },
    "Maple" : {
      "translation" : "D[+](x) = (1)/(2)*int(exp(- (t)^(2)/4)*sin(x*t), t = 0..infinity)",
      "translationInformation" : {
        "subEquations" : [ "D[+](x) = (1)/(2)*int(exp(- (t)^(2)/4)*sin(x*t), t = 0..infinity)" ],
        "freeVariables" : [ "x" ],
        "tokenTranslations" : {
          "D" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
          "\\expe" : "Recognizes e with power as the exponential function. It was translated as a function.",
          "\\sin" : "Sine; Example: \\sin@@{z}\nWill be translated to: sin($0)\nRelevant links to definitions:\nDLMF:  http://dlmf.nist.gov/4.14#E1\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=sin"
        }
      },
      "numericResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "wasAborted" : false,
        "crashed" : false,
        "testCalculationsGroups" : [ ]
      },
      "symbolicResults" : {
        "overallResult" : "SKIPPED",
        "numberOfTests" : 0,
        "numberOfFailedTests" : 0,
        "numberOfSuccessfulTests" : 0,
        "numberOfSkippedTests" : 0,
        "numberOfErrorTests" : 0,
        "crashed" : false,
        "testCalculationsGroup" : [ ]
      }
    }
  },
  "positions" : [ ],
  "includes" : [ "D_+(x) = \\frac12 \\int_0^\\infty e^{-t^2/4}\\,\\sin(xt)\\,dt", "x" ],
  "isPartOf" : [ "D_+(x) = \\frac12 \\int_0^\\infty e^{-t^2/4}\\,\\sin(xt)\\,dt" ],
  "definiens" : [ ]
}

Specify your own input