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 z^2 \frac{d^2y}{dz^2} + z \frac{dy}{dz} + (z^2 - \nu^2)y = z^{\mu+1}.}
... is translated to the CAS output ...
Semantic latex: z^2 \deriv [2]{y}{z} + z \frac{dy}{dz} +(z^2 - \nu^2) y = z^{\mu+1}
Confidence: 0
Mathematica
Translation: (z)^(2)* D[y, {z, 2}]+ z*Divide[d*y,d*z]+((z)^(2)- \[Nu]^(2))*y == (z)^(\[Mu]+ 1)
Information
Sub Equations
- (z)^(2)* D[y, {z, 2}]+ z*Divide[d*y,d*z]+((z)^(2)- \[Nu]^(2))*y = (z)^(\[Mu]+ 1)
Free variables
- \[Mu]
- \[Nu]
- d
- y
- 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: ((z)^(2)* D[y, {z, 2}]+ z*Divide[d*y,d*z]+((z)^(2)- \[Nu]^(2))*y)-((z)^(\[Mu]+ 1))
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation: (z)**(2)* diff(y, z, 2)+ z*(d*y)/(d*z)+((z)**(2)- (Symbol('nu'))**(2))*y == (z)**(Symbol('mu')+ 1)
Information
Sub Equations
- (z)**(2)* diff(y, z, 2)+ z*(d*y)/(d*z)+((z)**(2)- (Symbol('nu'))**(2))*y = (z)**(Symbol('mu')+ 1)
Free variables
- Symbol('mu')
- Symbol('nu')
- d
- y
- 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: (z)^(2)* diff(y, [z$(2)])+ z*(d*y)/(d*z)+((z)^(2)- (nu)^(2))*y = (z)^(mu + 1)
Information
Sub Equations
- (z)^(2)* diff(y, [z$(2)])+ z*(d*y)/(d*z)+((z)^(2)- (nu)^(2))*y = (z)^(mu + 1)
Free variables
- d
- mu
- nu
- y
- 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
Description
- inhomogeneous form of the Bessel differential equation
- Lommel differential equation
Complete translation information:
{
"id" : "FORMULA_fe93d9dbb6a232fc737271e1e2722088",
"formula" : "z^2 \\frac{d^2y}{dz^2} + z \\frac{dy}{dz} + (z^2 - \\nu^2)y = z^{\\mu+1}",
"semanticFormula" : "z^2 \\deriv [2]{y}{z} + z \\frac{dy}{dz} +(z^2 - \\nu^2) y = z^{\\mu+1}",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "(z)^(2)* D[y, {z, 2}]+ z*Divide[d*y,d*z]+((z)^(2)- \\[Nu]^(2))*y == (z)^(\\[Mu]+ 1)",
"translationInformation" : {
"subEquations" : [ "(z)^(2)* D[y, {z, 2}]+ z*Divide[d*y,d*z]+((z)^(2)- \\[Nu]^(2))*y = (z)^(\\[Mu]+ 1)" ],
"freeVariables" : [ "\\[Mu]", "\\[Nu]", "d", "y", "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" : "(z)^(2)* D[y, {z, 2}]+ z*Divide[d*y,d*z]+((z)^(2)- \\[Nu]^(2))*y",
"rhs" : "(z)^(\\[Mu]+ 1)",
"testExpression" : "((z)^(2)* D[y, {z, 2}]+ z*Divide[d*y,d*z]+((z)^(2)- \\[Nu]^(2))*y)-((z)^(\\[Mu]+ 1))",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "(z)**(2)* diff(y, z, 2)+ z*(d*y)/(d*z)+((z)**(2)- (Symbol('nu'))**(2))*y == (z)**(Symbol('mu')+ 1)",
"translationInformation" : {
"subEquations" : [ "(z)**(2)* diff(y, z, 2)+ z*(d*y)/(d*z)+((z)**(2)- (Symbol('nu'))**(2))*y = (z)**(Symbol('mu')+ 1)" ],
"freeVariables" : [ "Symbol('mu')", "Symbol('nu')", "d", "y", "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" : "(z)^(2)* diff(y, [z$(2)])+ z*(d*y)/(d*z)+((z)^(2)- (nu)^(2))*y = (z)^(mu + 1)",
"translationInformation" : {
"subEquations" : [ "(z)^(2)* diff(y, [z$(2)])+ z*(d*y)/(d*z)+((z)^(2)- (nu)^(2))*y = (z)^(mu + 1)" ],
"freeVariables" : [ "d", "mu", "nu", "y", "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" : 0,
"word" : 16
} ],
"includes" : [ ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "inhomogeneous form of the Bessel differential equation",
"score" : 0.7125985104912714
}, {
"definition" : "Lommel differential equation",
"score" : 0.6859086196238077
} ]
}