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 H_{n+1}(y) = y^2 H_n(y) - \frac{(2n-1)!!}{\sqrt{\pi} 2^n} y. }

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

Semantic latex: \HeavisideH@{x}_{n+1}(y) = y^2 \HeavisideH@{x}_n(y) - \frac{(2n-1)!!}{\sqrt{\cpi} 2^n} y

Confidence: 0.46998272498685

Mathematica

Translation: Subscript[HeavisideTheta[x], n + 1]*(y) == (y)^(2)* Subscript[HeavisideTheta[x], n]*(y)-Divide[(2*n - 1)!!,Sqrt[Pi]*(2)^(n)]*y

Information

Sub Equations

  • Subscript[HeavisideTheta[x], n + 1]*(y) = (y)^(2)* Subscript[HeavisideTheta[x], n]*(y)-Divide[(2*n - 1)!!,Sqrt[Pi]*(2)^(n)]*y

Free variables

  • n
  • x
  • y

Symbol info

  • Heaviside step function; Example: \HeavisideH@{x}

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

  • Pi was translated to: Pi

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

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

Tests

Symbolic
Numeric

Maple

Translation: Heaviside(x)[n + 1]*(y) = (y)^(2)* Heaviside(x)[n]*(y)-(doublefactorial(2*n - 1))/(sqrt(Pi)*(2)^(n))*y

Information

Sub Equations

  • Heaviside(x)[n + 1]*(y) = (y)^(2)* Heaviside(x)[n]*(y)-(doublefactorial(2*n - 1))/(sqrt(Pi)*(2)^(n))*y

Free variables

  • n
  • x
  • y

Symbol info

  • Heaviside step function; Example: \HeavisideH@{x}

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

  • Pi was translated to: Pi

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Description

  • recurrence relation

Complete translation information:

{
  "id" : "FORMULA_4bf2dd880a1031eba842af046cdac8fe",
  "formula" : "H_{n+1}(y) = y^2 H_n(y) - \\frac{(2n-1)!!}{\\sqrt{\\pi} 2^n} y",
  "semanticFormula" : "\\HeavisideH@{x}_{n+1}(y) = y^2 \\HeavisideH@{x}_n(y) - \\frac{(2n-1)!!}{\\sqrt{\\cpi} 2^n} y",
  "confidence" : 0.4699827249868469,
  "translations" : {
    "Mathematica" : {
      "translation" : "Subscript[HeavisideTheta[x], n + 1]*(y) == (y)^(2)* Subscript[HeavisideTheta[x], n]*(y)-Divide[(2*n - 1)!!,Sqrt[Pi]*(2)^(n)]*y",
      "translationInformation" : {
        "subEquations" : [ "Subscript[HeavisideTheta[x], n + 1]*(y) = (y)^(2)* Subscript[HeavisideTheta[x], n]*(y)-Divide[(2*n - 1)!!,Sqrt[Pi]*(2)^(n)]*y" ],
        "freeVariables" : [ "n", "x", "y" ],
        "tokenTranslations" : {
          "\\HeavisideH" : "Heaviside step function; Example: \\HeavisideH@{x}\nWill be translated to: HeavisideTheta[$0]\nRelevant links to definitions:\nDLMF:         http://dlmf.nist.gov/1.16#E13\nMathematica:  https://reference.wolfram.com/language/ref/HeavisideTheta.html",
          "\\cpi" : "Pi was translated to: Pi"
        }
      },
      "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" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\HeavisideH [\\HeavisideH]"
        }
      },
      "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" : "Heaviside(x)[n + 1]*(y) = (y)^(2)* Heaviside(x)[n]*(y)-(doublefactorial(2*n - 1))/(sqrt(Pi)*(2)^(n))*y",
      "translationInformation" : {
        "subEquations" : [ "Heaviside(x)[n + 1]*(y) = (y)^(2)* Heaviside(x)[n]*(y)-(doublefactorial(2*n - 1))/(sqrt(Pi)*(2)^(n))*y" ],
        "freeVariables" : [ "n", "x", "y" ],
        "tokenTranslations" : {
          "\\HeavisideH" : "Heaviside step function; Example: \\HeavisideH@{x}\nWill be translated to: Heaviside($0)\nRelevant links to definitions:\nDLMF:  http://dlmf.nist.gov/1.16#E13\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=Heaviside",
          "\\cpi" : "Pi was translated to: Pi"
        }
      },
      "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" : 2,
    "sentence" : 11,
    "word" : 14
  } ],
  "includes" : [ "H_n", "y", "n" ],
  "isPartOf" : [ ],
  "definiens" : [ {
    "definition" : "recurrence relation",
    "score" : 0.6859086196238077
  } ]
}

Specify your own input