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 \mathbf{J}_{\nu-1}(z)-\mathbf{J}_{\nu+1}(z)=2\dfrac{\partial}{\partial z}\mathbf{J}_\nu(z)}
... is translated to the CAS output ...
Semantic latex: \AngerJ{\nu-1}@{z} - \AngerJ{\nu+1}@{z} = 2 \deriv [1]{ }{z} \AngerJ{\nu}@{z}
Confidence: 0.95339737112618
Mathematica
Translation: AngerJ[\[Nu]- 1, z]- AngerJ[\[Nu]+ 1, z] == 2*D[AngerJ[\[Nu], z], {z, 1}]
Information
Sub Equations
- AngerJ[\[Nu]- 1, z]- AngerJ[\[Nu]+ 1, z] = 2*D[AngerJ[\[Nu], z], {z, 1}]
Free variables
- \[Nu]
- z
Symbol info
- Anger function; Example: \AngerJ{v}@{z}
Will be translated to: AngerJ[$0, $1] Relevant links to definitions: DLMF: http://dlmf.nist.gov/11.10#E1 Mathematica: https://reference.wolfram.com/language/ref/AngerJ.html
- Derivative; Example: \deriv[n]{f}{x}
Will be translated to: D[$1, {$2, $0}] Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.4#E4 Mathematica: https://reference.wolfram.com/language/ref/D.html
Tests
Symbolic
Test expression: (AngerJ[\[Nu]- 1, z]- AngerJ[\[Nu]+ 1, z])-(2*D[AngerJ[\[Nu], z], {z, 1}])
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: \AngerJ [\AngerJ]
Tests
Symbolic
Numeric
Maple
Translation: AngerJ(nu - 1, z)- AngerJ(nu + 1, z) = 2*diff(AngerJ(nu, z), [z$(1)])
Information
Sub Equations
- AngerJ(nu - 1, z)- AngerJ(nu + 1, z) = 2*diff(AngerJ(nu, z), [z$(1)])
Free variables
- nu
- z
Symbol info
- Anger function; Example: \AngerJ{v}@{z}
Will be translated to: AngerJ($0, $1) Relevant links to definitions: DLMF: http://dlmf.nist.gov/11.10#E1 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=AngerJ
- Derivative; Example: \deriv[n]{f}{x}
Will be translated to: diff($1, [$2$($0)]) Relevant links to definitions: DLMF: http://dlmf.nist.gov/1.4#E4 Maple: https://www.maplesoft.com/support/help/Maple/view.aspx?path=diff
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Is part of
Description
- anger
- Weber function
- homogeneous form of delay differential equation
- inhomogeneous form of delay differential equation
Complete translation information:
{
"id" : "FORMULA_add68c6be5dd0fa8ec57ce3bb80f1f10",
"formula" : "\\mathbf{J}_{\\nu-1}(z)-\\mathbf{J}_{\\nu+1}(z)=2\\dfrac{\\partial}{\\partial z}\\mathbf{J}_\\nu(z)",
"semanticFormula" : "\\AngerJ{\\nu-1}@{z} - \\AngerJ{\\nu+1}@{z} = 2 \\deriv [1]{ }{z} \\AngerJ{\\nu}@{z}",
"confidence" : 0.9533973711261826,
"translations" : {
"Mathematica" : {
"translation" : "AngerJ[\\[Nu]- 1, z]- AngerJ[\\[Nu]+ 1, z] == 2*D[AngerJ[\\[Nu], z], {z, 1}]",
"translationInformation" : {
"subEquations" : [ "AngerJ[\\[Nu]- 1, z]- AngerJ[\\[Nu]+ 1, z] = 2*D[AngerJ[\\[Nu], z], {z, 1}]" ],
"freeVariables" : [ "\\[Nu]", "z" ],
"tokenTranslations" : {
"\\AngerJ" : "Anger function; Example: \\AngerJ{v}@{z}\nWill be translated to: AngerJ[$0, $1]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/11.10#E1\nMathematica: https://reference.wolfram.com/language/ref/AngerJ.html",
"\\deriv1" : "Derivative; Example: \\deriv[n]{f}{x}\nWill be translated to: D[$1, {$2, $0}]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/1.4#E4\nMathematica: https://reference.wolfram.com/language/ref/D.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" : "AngerJ[\\[Nu]- 1, z]- AngerJ[\\[Nu]+ 1, z]",
"rhs" : "2*D[AngerJ[\\[Nu], z], {z, 1}]",
"testExpression" : "(AngerJ[\\[Nu]- 1, z]- AngerJ[\\[Nu]+ 1, z])-(2*D[AngerJ[\\[Nu], z], {z, 1}])",
"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: \\AngerJ [\\AngerJ]"
}
}
},
"Maple" : {
"translation" : "AngerJ(nu - 1, z)- AngerJ(nu + 1, z) = 2*diff(AngerJ(nu, z), [z$(1)])",
"translationInformation" : {
"subEquations" : [ "AngerJ(nu - 1, z)- AngerJ(nu + 1, z) = 2*diff(AngerJ(nu, z), [z$(1)])" ],
"freeVariables" : [ "nu", "z" ],
"tokenTranslations" : {
"\\AngerJ" : "Anger function; Example: \\AngerJ{v}@{z}\nWill be translated to: AngerJ($0, $1)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/11.10#E1\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=AngerJ",
"\\deriv1" : "Derivative; Example: \\deriv[n]{f}{x}\nWill be translated to: diff($1, [$2$($0)])\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/1.4#E4\nMaple: https://www.maplesoft.com/support/help/Maple/view.aspx?path=diff"
}
}
}
},
"positions" : [ {
"section" : 5,
"sentence" : 0,
"word" : 13
} ],
"includes" : [ "\\mathbf{J}_{\\nu}", "J_{\\nu}", "\\nu", "\\mathbf{E}_{\\nu-1}(z)-\\mathbf{E}_{\\nu+1}(z)=2\\dfrac{\\partial}{\\partial z}\\mathbf{E}_\\nu(z)" ],
"isPartOf" : [ "\\mathbf{E}_{\\nu-1}(z)-\\mathbf{E}_{\\nu+1}(z)=2\\dfrac{\\partial}{\\partial z}\\mathbf{E}_\\nu(z)" ],
"definiens" : [ {
"definition" : "anger",
"score" : 0.8601921133785482
}, {
"definition" : "Weber function",
"score" : 0.7356153575222844
}, {
"definition" : "homogeneous form of delay differential equation",
"score" : 0.722
}, {
"definition" : "inhomogeneous form of delay differential equation",
"score" : 0.5816270233429564
} ]
}