LaTeX to CAS translator
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} H_{2n}(x) &= (-1)^n \frac{(2n)!}{n!} \,_1F_1\big(-n, \tfrac12; x^2\big), \\ H_{2n+1}(x) &= (-1)^n \frac{(2n+1)!}{n!}\,2x \,_1F_1\big(-n, \tfrac32; x^2\big), \end{align}}
... is translated to the CAS output ...
Semantic latex: \begin{align}\HermitepolyH{2n}@{x} &= (-1)^n \frac{(2n)!}{n!} _1F_1(-n, \tfrac12; x^2), \\ \HermitepolyH{2n+1}@{x} &= (-1)^n \frac{(2n+1)!}{n!}2x _1F_1(-n, \tfrac32; x^2),\end{align}
Confidence: 0.6696580970907
Mathematica
Translation: HermiteH[2*n, x] == (- 1)^(n)*Subscript[Divide[(2*n)!,(n)!], 1]*Subscript[F, 1][- n ,Divide[1,2]; (x)^(2)] HermiteH[2*n + 1, x] == (- 1)^(n)*Divide[(2*n + 1)!,(n)!]*2*Subscript[x, 1]*Subscript[F, 1][- n ,Divide[3,2]; (x)^(2)]
Information
Sub Equations
- HermiteH[2*n, x] = (- 1)^(n)*Subscript[Divide[(2*n)!,(n)!], 1]*Subscript[F, 1][- n ,Divide[1,2]; (x)^(2)]
- HermiteH[2*n + 1, x] = (- 1)^(n)*Divide[(2*n + 1)!,(n)!]*2*Subscript[x, 1]*Subscript[F, 1][- n ,Divide[3,2]; (x)^(2)]
Free variables
- Subscript[x, 1]
- n
- x
Symbol info
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Hermite polynomial; Example: \HermitepolyH{n}@{x}
Will be translated to: HermiteH[$0, $1] Relevant links to definitions: DLMF: http://dlmf.nist.gov/18.3#T1.t1.r13 Mathematica: https://reference.wolfram.com/language/ref/HermiteH.html
Tests
Symbolic
Numeric
SymPy
Translation:
Information
Symbol info
- (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \HermitepolyH [\HermitepolyH]
Tests
Symbolic
Numeric
Maple
Translation: HermiteH(2*n, x) = (- 1)^(n)*(factorial(2*n))/(factorial(n))[1]*F[1](- n ,(1)/(2); (x)^(2)); HermiteH(2*n + 1, x) = (- 1)^(n)*(factorial(2*n + 1))/(factorial(n))*2*x[1]*F[1](- n ,(3)/(2); (x)^(2))
Information
Sub Equations
- HermiteH(2*n, x) = (- 1)^(n)*(factorial(2*n))/(factorial(n))[1]*F[1](- n ,(1)/(2); (x)^(2))
- HermiteH(2*n + 1, x) = (- 1)^(n)*(factorial(2*n + 1))/(factorial(n))*2*x[1]*F[1](- n ,(3)/(2); (x)^(2))
Free variables
- n
- x
- x[1]
Symbol info
- Function without DLMF-Definition. We keep it like it is (but delete prefix \ if necessary).
- Hermite polynomial; Example: \HermitepolyH{n}@{x}
Will be translated to: HermiteH($0, $1) Relevant links to definitions: DLMF: http://dlmf.nist.gov/18.3#T1.t1.r13 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=HermiteH
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Is part of
Complete translation information:
{
"id" : "FORMULA_409fc881665a7d904c4dd6741c968141",
"formula" : "\\begin{align}\n H_{2n}(x) &= (-1)^n \\frac{(2n)!}{n!} _1F_1(-n, \\tfrac12; x^2), \\\\\n H_{2n+1}(x) &= (-1)^n \\frac{(2n+1)!}{n!}2x _1F_1(-n, \\tfrac32; x^2),\n\\end{align}",
"semanticFormula" : "\\begin{align}\\HermitepolyH{2n}@{x} &= (-1)^n \\frac{(2n)!}{n!} _1F_1(-n, \\tfrac12; x^2), \\\\ \\HermitepolyH{2n+1}@{x} &= (-1)^n \\frac{(2n+1)!}{n!}2x _1F_1(-n, \\tfrac32; x^2),\\end{align}",
"confidence" : 0.6696580970907047,
"translations" : {
"Mathematica" : {
"translation" : "HermiteH[2*n, x] == (- 1)^(n)*Subscript[Divide[(2*n)!,(n)!], 1]*Subscript[F, 1][- n ,Divide[1,2]; (x)^(2)]\nHermiteH[2*n + 1, x] == (- 1)^(n)*Divide[(2*n + 1)!,(n)!]*2*Subscript[x, 1]*Subscript[F, 1][- n ,Divide[3,2]; (x)^(2)]",
"translationInformation" : {
"subEquations" : [ "HermiteH[2*n, x] = (- 1)^(n)*Subscript[Divide[(2*n)!,(n)!], 1]*Subscript[F, 1][- n ,Divide[1,2]; (x)^(2)]", "HermiteH[2*n + 1, x] = (- 1)^(n)*Divide[(2*n + 1)!,(n)!]*2*Subscript[x, 1]*Subscript[F, 1][- n ,Divide[3,2]; (x)^(2)]" ],
"freeVariables" : [ "Subscript[x, 1]", "n", "x" ],
"tokenTranslations" : {
"F" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\HermitepolyH" : "Hermite polynomial; Example: \\HermitepolyH{n}@{x}\nWill be translated to: HermiteH[$0, $1]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/18.3#T1.t1.r13\nMathematica: https://reference.wolfram.com/language/ref/HermiteH.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" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\HermitepolyH [\\HermitepolyH]"
}
},
"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" : "HermiteH(2*n, x) = (- 1)^(n)*(factorial(2*n))/(factorial(n))[1]*F[1](- n ,(1)/(2); (x)^(2)); HermiteH(2*n + 1, x) = (- 1)^(n)*(factorial(2*n + 1))/(factorial(n))*2*x[1]*F[1](- n ,(3)/(2); (x)^(2))",
"translationInformation" : {
"subEquations" : [ "HermiteH(2*n, x) = (- 1)^(n)*(factorial(2*n))/(factorial(n))[1]*F[1](- n ,(1)/(2); (x)^(2))", "HermiteH(2*n + 1, x) = (- 1)^(n)*(factorial(2*n + 1))/(factorial(n))*2*x[1]*F[1](- n ,(3)/(2); (x)^(2))" ],
"freeVariables" : [ "n", "x", "x[1]" ],
"tokenTranslations" : {
"F" : "Function without DLMF-Definition. We keep it like it is (but delete prefix \\ if necessary).",
"\\HermitepolyH" : "Hermite polynomial; Example: \\HermitepolyH{n}@{x}\nWill be translated to: HermiteH($0, $1)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/18.3#T1.t1.r13\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=HermiteH"
}
},
"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" : [ "H_{n}(x)", "\\begin{align} H_{2n}(x) &= (-1)^n \\frac{(2n)!}{n!} \\,_1F_1\\big(-n, \\tfrac12; x^2\\big), \\\\ H_{2n+1}(x) &= (-1)^n \\frac{(2n+1)!}{n!}\\,2x \\,_1F_1\\big(-n, \\tfrac32; x^2\\big),\\end{align}", "x^{n}", "n", "x", "H_{n}", "H_\\lambda(x)", "H_{n}(y)", "2x", "H", "x^{k}" ],
"isPartOf" : [ "\\begin{align} H_{2n}(x) &= (-1)^n \\frac{(2n)!}{n!} \\,_1F_1\\big(-n, \\tfrac12; x^2\\big), \\\\ H_{2n+1}(x) &= (-1)^n \\frac{(2n+1)!}{n!}\\,2x \\,_1F_1\\big(-n, \\tfrac32; x^2\\big),\\end{align}" ],
"definiens" : [ ]
}