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 V(a,x)=\frac{\Gamma(\tfrac12+a)}{\pi}[\sin( \pi a) D_{-a-\tfrac12}(x)+D_{-a-\tfrac12}(-x)] .}
... is translated to the CAS output ...
Semantic latex: \paraV@{a}{x} = \frac{\Gamma(\tfrac12+a)}{\cpi} [\sin(\cpi a) \WhittakerparaD{-a-\tfrac12}@{x} + \WhittakerparaD{-a-\tfrac12}@{- x}]
Confidence: 0.86035642002378
Mathematica
Translation: Divide[GAMMA[1/2 + a], Pi]*(Sin[Pi*(a)] * ParabolicCylinderD[-(a) - 1/2, x] + ParabolicCylinderD[-(a) - 1/2, -(x)]) == Divide[\[CapitalGamma]*(Divide[1,2]+ a),Pi]*(Sin[Pi*a]*ParabolicCylinderD[- a -Divide[1,2], x]+ ParabolicCylinderD[- a -Divide[1,2], - x])
Information
Sub Equations
- Divide[GAMMA[1/2 + a], Pi]*(Sin[Pi*(a)] * ParabolicCylinderD[-(a) - 1/2, x] + ParabolicCylinderD[-(a) - 1/2, -(x)]) = Divide[\[CapitalGamma]*(Divide[1,2]+ a),Pi]*(Sin[Pi*a]*ParabolicCylinderD[- a -Divide[1,2], x]+ ParabolicCylinderD[- a -Divide[1,2], - x])
Free variables
- \[CapitalGamma]
- a
- x
Symbol info
- Whittaker's notation D for the parabolic cylinder function; Example: \WhittakerparaD{\nu}@{z}
Will be translated to: ParabolicCylinderD[$0, $1] Relevant links to definitions: DLMF: http://dlmf.nist.gov/12.1 Mathematica: https://reference.wolfram.com/language/ref/ParabolicCylinderD.html
- Pi was translated to: Pi
- 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
- Parabolic cylinder function V; Example: \paraV@{a}{z}
Will be translated to: Alternative translations: [Divide[GAMMA[1/2 + $0], Pi]*(Sin[Pi*($0)] * ParabolicCylinderD[-($0) - 1/2, $1] + ParabolicCylinderD[-($0) - 1/2, -($1)])]Relevant links to definitions: DLMF: http://dlmf.nist.gov/12.4#E2 Mathematica: https://reference.wolfram.com/language/ref/Divide.html
Tests
Symbolic
Test expression: (Divide[GAMMA[1/2 + a], Pi]*(Sin[Pi*(a)] * ParabolicCylinderD[-(a) - 1/2, x] + ParabolicCylinderD[-(a) - 1/2, -(x)]))-(Divide[\[CapitalGamma]*(Divide[1,2]+ a),Pi]*(Sin[Pi*a]*ParabolicCylinderD[- a -Divide[1,2], x]+ ParabolicCylinderD[- a -Divide[1,2], - x]))
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation:
Information
Symbol info
- (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \paraV [\paraV]
Tests
Symbolic
Numeric
Maple
Translation: CylinderV(a, x) = (Gamma*((1)/(2)+ a))/(Pi)*(sin(Pi*a)*CylinderD(- a -(1)/(2), x)+ CylinderD(- a -(1)/(2), - x))
Information
Sub Equations
- CylinderV(a, x) = (Gamma*((1)/(2)+ a))/(Pi)*(sin(Pi*a)*CylinderD(- a -(1)/(2), x)+ CylinderD(- a -(1)/(2), - x))
Free variables
- Gamma
- a
- x
Symbol info
- Whittaker's notation D for the parabolic cylinder function; Example: \WhittakerparaD{\nu}@{z}
Will be translated to: CylinderD($0, $1) Relevant links to definitions: DLMF: http://dlmf.nist.gov/12.1 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=CylinderD
- Pi was translated to: Pi
- 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
- Parabolic cylinder function V; Example: \paraV@{a}{z}
Will be translated to: CylinderV($0, $1) Relevant links to definitions: DLMF: http://dlmf.nist.gov/12.4#E2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=CylinderV
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Description
- parabolic cylinder
- function
- Abramowitz
- notation
- Whittaker
- Stegun
Complete translation information:
{
"id" : "FORMULA_3917cd1bf33fbdb465269a3cfbe67e4e",
"formula" : "V(a,x)=\\frac{\\Gamma(\\tfrac12+a)}{\\pi}[\\sin( \\pi a) D_{-a-\\tfrac12}(x)+D_{-a-\\tfrac12}(-x)]",
"semanticFormula" : "\\paraV@{a}{x} = \\frac{\\Gamma(\\tfrac12+a)}{\\cpi} [\\sin(\\cpi a) \\WhittakerparaD{-a-\\tfrac12}@{x} + \\WhittakerparaD{-a-\\tfrac12}@{- x}]",
"confidence" : 0.8603564200237752,
"translations" : {
"Mathematica" : {
"translation" : "Divide[GAMMA[1/2 + a], Pi]*(Sin[Pi*(a)] * ParabolicCylinderD[-(a) - 1/2, x] + ParabolicCylinderD[-(a) - 1/2, -(x)]) == Divide[\\[CapitalGamma]*(Divide[1,2]+ a),Pi]*(Sin[Pi*a]*ParabolicCylinderD[- a -Divide[1,2], x]+ ParabolicCylinderD[- a -Divide[1,2], - x])",
"translationInformation" : {
"subEquations" : [ "Divide[GAMMA[1/2 + a], Pi]*(Sin[Pi*(a)] * ParabolicCylinderD[-(a) - 1/2, x] + ParabolicCylinderD[-(a) - 1/2, -(x)]) = Divide[\\[CapitalGamma]*(Divide[1,2]+ a),Pi]*(Sin[Pi*a]*ParabolicCylinderD[- a -Divide[1,2], x]+ ParabolicCylinderD[- a -Divide[1,2], - x])" ],
"freeVariables" : [ "\\[CapitalGamma]", "a", "x" ],
"tokenTranslations" : {
"\\WhittakerparaD" : "Whittaker's notation D for the parabolic cylinder function; Example: \\WhittakerparaD{\\nu}@{z}\nWill be translated to: ParabolicCylinderD[$0, $1]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/12.1\nMathematica: https://reference.wolfram.com/language/ref/ParabolicCylinderD.html",
"\\cpi" : "Pi was translated to: Pi",
"\\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",
"\\paraV" : "Parabolic cylinder function V; Example: \\paraV@{a}{z}\nWill be translated to: \nAlternative translations: [Divide[GAMMA[1/2 + $0], Pi]*(Sin[Pi*($0)] * ParabolicCylinderD[-($0) - 1/2, $1] + ParabolicCylinderD[-($0) - 1/2, -($1)])]Relevant links to definitions:\nDLMF: http://dlmf.nist.gov/12.4#E2\nMathematica: https://reference.wolfram.com/language/ref/Divide.html"
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "ERROR",
"numberOfTests" : 1,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 1,
"crashed" : false,
"testCalculationsGroup" : [ {
"lhs" : "Divide[GAMMA[1/2 + a], Pi]*(Sin[Pi*(a)] * ParabolicCylinderD[-(a) - 1/2, x] + ParabolicCylinderD[-(a) - 1/2, -(x)])",
"rhs" : "Divide[\\[CapitalGamma]*(Divide[1,2]+ a),Pi]*(Sin[Pi*a]*ParabolicCylinderD[- a -Divide[1,2], x]+ ParabolicCylinderD[- a -Divide[1,2], - x])",
"testExpression" : "(Divide[GAMMA[1/2 + a], Pi]*(Sin[Pi*(a)] * ParabolicCylinderD[-(a) - 1/2, x] + ParabolicCylinderD[-(a) - 1/2, -(x)]))-(Divide[\\[CapitalGamma]*(Divide[1,2]+ a),Pi]*(Sin[Pi*a]*ParabolicCylinderD[- a -Divide[1,2], x]+ ParabolicCylinderD[- a -Divide[1,2], - x]))",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "",
"translationInformation" : {
"tokenTranslations" : {
"Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\paraV [\\paraV]"
}
}
},
"Maple" : {
"translation" : "CylinderV(a, x) = (Gamma*((1)/(2)+ a))/(Pi)*(sin(Pi*a)*CylinderD(- a -(1)/(2), x)+ CylinderD(- a -(1)/(2), - x))",
"translationInformation" : {
"subEquations" : [ "CylinderV(a, x) = (Gamma*((1)/(2)+ a))/(Pi)*(sin(Pi*a)*CylinderD(- a -(1)/(2), x)+ CylinderD(- a -(1)/(2), - x))" ],
"freeVariables" : [ "Gamma", "a", "x" ],
"tokenTranslations" : {
"\\WhittakerparaD" : "Whittaker's notation D for the parabolic cylinder function; Example: \\WhittakerparaD{\\nu}@{z}\nWill be translated to: CylinderD($0, $1)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/12.1\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=CylinderD",
"\\cpi" : "Pi was translated to: Pi",
"\\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",
"\\paraV" : "Parabolic cylinder function V; Example: \\paraV@{a}{z}\nWill be translated to: CylinderV($0, $1)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/12.4#E2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=CylinderV"
}
}
}
},
"positions" : [ {
"section" : 1,
"sentence" : 7,
"word" : 44
} ],
"includes" : [ "a", "V(a,z)", "f(a,z)", "U(a,z)", "D_{p}(x)", "V" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "parabolic cylinder",
"score" : 0.6202889650070861
}, {
"definition" : "function",
"score" : 0.5835050192745167
}, {
"definition" : "Abramowitz",
"score" : 0.5730317852477183
}, {
"definition" : "notation",
"score" : 0.5730317852477183
}, {
"definition" : "Whittaker",
"score" : 0.5730317852477183
}, {
"definition" : "Stegun",
"score" : 0.5243095238095238
} ]
}