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 p_{n-1}(x)}

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

Semantic latex: p_{n-1}(x)

Confidence: 0

Mathematica

Translation: Subscript[p, n - 1][x]

Information

Sub Equations

  • Subscript[p, n - 1][x]

Free variables

  • n
  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

SymPy

Translation: Symbol('{p}_{n - 1}')(x)

Information

Sub Equations

  • Symbol('{p}_{n - 1}')(x)

Free variables

  • n
  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

Maple

Translation: p[n - 1](x)

Information

Sub Equations

  • p[n - 1](x)

Free variables

  • n
  • x

Symbol info

  • Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

Description

  • weight
  • term of the orthogonal polynomial
  • coefficient
  • integral expression
  • yield
  • side
  • polynomial
  • degree
  • right hand side
  • Orthogonal polynomial
  • scalar product
  • recurrence relation
  • polynomial of degree
  • term in the bracket
  • 3-term recurrence relation
  • nth degree
  • Eq
  • convention
  • st
  • equation
  • integral
  • term
  • i.e. monic
  • infinity
  • maximal degree
  • Abscissas
  • eigenvalue of this tridiagonal matrix
  • i.e.
  • matrix form
  • node for the Gaussian quadrature
  • so-called Jacobi matrix
  • standard basis vector
  • three-term recurrence relation
  • zero
  • dash
  • derivative
  • standard Legendre polynomial of m-th degree
  • expression in equation

Complete translation information:

{
  "id" : "FORMULA_80b978ac7277de110547f7202223932a",
  "formula" : "p_{n-1}(x)",
  "semanticFormula" : "p_{n-1}(x)",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Subscript[p, n - 1][x]",
      "translationInformation" : {
        "subEquations" : [ "Subscript[p, n - 1][x]" ],
        "freeVariables" : [ "n", "x" ],
        "tokenTranslations" : {
          "p" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      },
      "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('{p}_{n - 1}')(x)",
      "translationInformation" : {
        "subEquations" : [ "Symbol('{p}_{n - 1}')(x)" ],
        "freeVariables" : [ "n", "x" ],
        "tokenTranslations" : {
          "p" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      },
      "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" : "p[n - 1](x)",
      "translationInformation" : {
        "subEquations" : [ "p[n - 1](x)" ],
        "freeVariables" : [ "n", "x" ],
        "tokenTranslations" : {
          "p" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary)."
        }
      },
      "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" : [ {
    "section" : 5,
    "sentence" : 2,
    "word" : 37
  }, {
    "section" : 5,
    "sentence" : 7,
    "word" : 5
  }, {
    "section" : 5,
    "sentence" : 7,
    "word" : 31
  } ],
  "includes" : [ "p_n(x)", "p_{k}(x)", "p_{n}", "p_{n}(x)", "n", "x", "n - 1", "p_r", "p_s", "1" ],
  "isPartOf" : [ "w_{i} = \\frac{a_{n}}{a_{n-1}}\\frac{\\int_{a}^{b}\\omega(x)p_{n-1}\\left(x\\right)^{2}dx}{p'_{n}(x_{i})p_{n-1}(x_{i})}", "q(x) = p_{n-1}(x)", "\\int_{a}^{b}\\omega(x)\\frac{p_{n}(x)}{x-x_{i}}dx=\\frac{a_{n}}{p_{n-1}(x_{i})}\\int_{a}^{b}\\omega(x)p_{n-1}(x)x^{n-1}dx", "x^{n-1} = \\left(x^{n-1} - \\frac{p_{n-1}(x)}{a_{n-1}}\\right) + \\frac{p_{n-1}(x)}{a_{n-1}}", "\\int_{a}^{b}\\omega(x)\\frac{p_{n}(x)}{x-x_{i}}dx=\\frac{a_{n}}{a_{n-1}p_{n-1}(x_{i})}\\int_{a}^{b}\\omega(x)p_{n-1}(x)^{2}dx", "p_{n+1}(x_{i}) = (a)p_{n}(x_{i}) + (b)p_{n-1}(x_{i})", "p_{n-1}(x_{i})", "p_{r+1}(x) = (x - a_{r,r})p_r(x) - a_{r,r-1}p_{r-1}(x)\\cdots - a_{r,0}p_0(x)", "p_{r+1}(x)=(x-a_{r,r})p_r(x)-a_{r,r-1}p_{r-1}(x)", "p_{r+1}(x)=(x-a_r)p_r(x)-b_rp_{r-1}(x)", "\\tilde{P} = \\begin{bmatrix} p_0(x) & p_1(x) & \\ldots & p_{n-1}(x) \\end{bmatrix}^\\mathsf{T}", "P'_{n-1}(x)", "w_i = \\frac{2}{n(n - 1)\\left[P_{n-1}\\left(x_i\\right)\\right]^2}, \\qquad x_i \\ne \\pm 1" ],
  "definiens" : [ {
    "definition" : "weight",
    "score" : 0.7565123458357419
  }, {
    "definition" : "term of the orthogonal polynomial",
    "score" : 0.6601229053380933
  }, {
    "definition" : "coefficient",
    "score" : 0.651787266688052
  }, {
    "definition" : "integral expression",
    "score" : 0.5730317852477183
  }, {
    "definition" : "yield",
    "score" : 0.5358240086379016
  }, {
    "definition" : "side",
    "score" : 0.5243095238095238
  }, {
    "definition" : "polynomial",
    "score" : 0.48394655054344304
  }, {
    "definition" : "degree",
    "score" : 0.4369378588726675
  }, {
    "definition" : "right hand side",
    "score" : 0.40112702334295636
  }, {
    "definition" : "Orthogonal polynomial",
    "score" : 0.3991329087352022
  }, {
    "definition" : "scalar product",
    "score" : 0.3991329087352022
  }, {
    "definition" : "recurrence relation",
    "score" : 0.39913290873405927
  }, {
    "definition" : "polynomial of degree",
    "score" : 0.3931362465968641
  }, {
    "definition" : "term in the bracket",
    "score" : 0.36644635572940026
  }, {
    "definition" : "3-term recurrence relation",
    "score" : 0.3548916724042835
  }, {
    "definition" : "nth degree",
    "score" : 0.35240476190476183
  }, {
    "definition" : "Eq",
    "score" : 0.34549018289555505
  }, {
    "definition" : "convention",
    "score" : 0.3430032723960334
  }, {
    "definition" : "st",
    "score" : 0.3430032723960334
  }, {
    "definition" : "equation",
    "score" : 0.3378014767666648
  }, {
    "definition" : "integral",
    "score" : 0.3378014767666648
  }, {
    "definition" : "term",
    "score" : 0.31880029202809124
  }, {
    "definition" : "i.e. monic",
    "score" : 0.31631338153357264
  }, {
    "definition" : "infinity",
    "score" : 0.31631338153357264
  }, {
    "definition" : "maximal degree",
    "score" : 0.31631338153357264
  }, {
    "definition" : "Abscissas",
    "score" : 0.3163133815285695
  }, {
    "definition" : "eigenvalue of this tridiagonal matrix",
    "score" : 0.3163133815285695
  }, {
    "definition" : "i.e.",
    "score" : 0.3163133815285695
  }, {
    "definition" : "matrix form",
    "score" : 0.3163133815285695
  }, {
    "definition" : "node for the Gaussian quadrature",
    "score" : 0.3163133815285695
  }, {
    "definition" : "so-called Jacobi matrix",
    "score" : 0.3163133815285695
  }, {
    "definition" : "standard basis vector",
    "score" : 0.3163133815285695
  }, {
    "definition" : "three-term recurrence relation",
    "score" : 0.3163133815285695
  }, {
    "definition" : "zero",
    "score" : 0.3163133815285695
  }, {
    "definition" : "dash",
    "score" : 0.27647944119756235
  }, {
    "definition" : "derivative",
    "score" : 0.27647944119756235
  }, {
    "definition" : "standard Legendre polynomial of m-th degree",
    "score" : 0.27647944119756235
  }, {
    "definition" : "expression in equation",
    "score" : 0.15680028272430657
  } ]
}

Specify your own input