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 \frac{d^2w}{dz^2}+\left(-\frac{1}{4}+\frac{\kappa}{z}+\frac{1/4-\mu^2}{z^2}\right)w=0.}
... is translated to the CAS output ...
Semantic latex: \deriv [2]{w}{z} +(- \frac{1}{4} + \frac{\kappa}{z} + \frac{1/4-\mu^2}{z^2}) w = 0
Confidence: 0
Mathematica
Translation: D[w, {z, 2}]+(-Divide[1,4]+Divide[\[Kappa],z]+Divide[1/4 - \[Mu]^(2),(z)^(2)])*w == 0
Information
Sub Equations
- D[w, {z, 2}]+(-Divide[1,4]+Divide[\[Kappa],z]+Divide[1/4 - \[Mu]^(2),(z)^(2)])*w = 0
Free variables
- \[Kappa]
- \[Mu]
- w
- z
Symbol info
- 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: (D[w, {z, 2}]+(-Divide[1,4]+Divide[\[Kappa],z]+Divide[1/4 - \[Mu]^(2),(z)^(2)])*w)-(0)
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation: diff(w, z, 2)+(-(1)/(4)+(Symbol('kappa'))/(z)+(1/4 - (Symbol('mu'))**(2))/((z)**(2)))*w == 0
Information
Sub Equations
- diff(w, z, 2)+(-(1)/(4)+(Symbol('kappa'))/(z)+(1/4 - (Symbol('mu'))**(2))/((z)**(2)))*w = 0
Free variables
- Symbol('kappa')
- Symbol('mu')
- w
- z
Symbol info
- 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 SymPy: https://docs.sympy.org/latest/tutorial/calculus.html#derivatives
Tests
Symbolic
Numeric
Maple
Translation: diff(w, [z$(2)])+(-(1)/(4)+(kappa)/(z)+(1/4 - (mu)^(2))/((z)^(2)))*w = 0
Information
Sub Equations
- diff(w, [z$(2)])+(-(1)/(4)+(kappa)/(z)+(1/4 - (mu)^(2))/((z)^(2)))*w = 0
Free variables
- kappa
- mu
- w
- z
Symbol info
- 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
Description
- Whittaker 's equation
Complete translation information:
{
"id" : "FORMULA_16ec3a3583ee2b4621d316bf839c1725",
"formula" : "\\frac{d^2w}{dz^2}+\\left(-\\frac{1}{4}+\\frac{\\kappa}{z}+\\frac{1/4-\\mu^2}{z^2}\\right)w=0",
"semanticFormula" : "\\deriv [2]{w}{z} +(- \\frac{1}{4} + \\frac{\\kappa}{z} + \\frac{1/4-\\mu^2}{z^2}) w = 0",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "D[w, {z, 2}]+(-Divide[1,4]+Divide[\\[Kappa],z]+Divide[1/4 - \\[Mu]^(2),(z)^(2)])*w == 0",
"translationInformation" : {
"subEquations" : [ "D[w, {z, 2}]+(-Divide[1,4]+Divide[\\[Kappa],z]+Divide[1/4 - \\[Mu]^(2),(z)^(2)])*w = 0" ],
"freeVariables" : [ "\\[Kappa]", "\\[Mu]", "w", "z" ],
"tokenTranslations" : {
"\\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" : "D[w, {z, 2}]+(-Divide[1,4]+Divide[\\[Kappa],z]+Divide[1/4 - \\[Mu]^(2),(z)^(2)])*w",
"rhs" : "0",
"testExpression" : "(D[w, {z, 2}]+(-Divide[1,4]+Divide[\\[Kappa],z]+Divide[1/4 - \\[Mu]^(2),(z)^(2)])*w)-(0)",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "diff(w, z, 2)+(-(1)/(4)+(Symbol('kappa'))/(z)+(1/4 - (Symbol('mu'))**(2))/((z)**(2)))*w == 0",
"translationInformation" : {
"subEquations" : [ "diff(w, z, 2)+(-(1)/(4)+(Symbol('kappa'))/(z)+(1/4 - (Symbol('mu'))**(2))/((z)**(2)))*w = 0" ],
"freeVariables" : [ "Symbol('kappa')", "Symbol('mu')", "w", "z" ],
"tokenTranslations" : {
"\\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\nSymPy: https://docs.sympy.org/latest/tutorial/calculus.html#derivatives"
}
}
},
"Maple" : {
"translation" : "diff(w, [z$(2)])+(-(1)/(4)+(kappa)/(z)+(1/4 - (mu)^(2))/((z)^(2)))*w = 0",
"translationInformation" : {
"subEquations" : [ "diff(w, [z$(2)])+(-(1)/(4)+(kappa)/(z)+(1/4 - (mu)^(2))/((z)^(2)))*w = 0" ],
"freeVariables" : [ "kappa", "mu", "w", "z" ],
"tokenTranslations" : {
"\\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" : 0,
"sentence" : 2,
"word" : 4
} ],
"includes" : [ "\\mu", "\\kappa", "z" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "Whittaker 's equation",
"score" : 0.6859086196238077
} ]
}