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 \left (z\frac{d}{dz}+a \right )w = \left (z\frac{d}{dz}+b \right )\frac{dw}{dz}}
... is translated to the CAS output ...
Semantic latex: (z \deriv [1]{ }{z} + a) w =(z \deriv [1]{ }{z} + b) \frac{dw}{dz}
Confidence: 0
Mathematica
Translation: (z*D[+ , {z, 1}]a)*w == (z*D[+ , {z, 1}]b)*Divide[d*w,d*z]
Information
Sub Equations
- (z*D[+ , {z, 1}]a)*w = (z*D[+ , {z, 1}]b)*Divide[d*w,d*z]
Free variables
- a
- b
- d
- 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: ((z*D[+ , {z, 1}]a)*w)-((z*D[+ , {z, 1}]b)*Divide[d*w,d*z])
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation: (z*diff(+ , z, 1)a)*w == (z*diff(+ , z, 1)b)*(d*w)/(d*z)
Information
Sub Equations
- (z*diff(+ , z, 1)a)*w = (z*diff(+ , z, 1)b)*(d*w)/(d*z)
Free variables
- a
- b
- d
- 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: (z*diff(+ , [z$(1)])a)*w = (z*diff(+ , [z$(1)])b)*(d*w)/(d*z)
Information
Sub Equations
- (z*diff(+ , [z$(1)])a)*w = (z*diff(+ , [z$(1)])b)*(d*w)/(d*z)
Free variables
- a
- b
- d
- 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
Is part of
Description
- differential equation for this function
Complete translation information:
{
"id" : "FORMULA_58a689402d7b9e3cdbf35cc360cb40d5",
"formula" : "\\left (z\\frac{d}{dz}+a \\right )w = \\left (z\\frac{d}{dz}+b \\right )\\frac{dw}{dz}",
"semanticFormula" : "(z \\deriv [1]{ }{z} + a) w =(z \\deriv [1]{ }{z} + b) \\frac{dw}{dz}",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "(z*D[+ , {z, 1}]a)*w == (z*D[+ , {z, 1}]b)*Divide[d*w,d*z]",
"translationInformation" : {
"subEquations" : [ "(z*D[+ , {z, 1}]a)*w = (z*D[+ , {z, 1}]b)*Divide[d*w,d*z]" ],
"freeVariables" : [ "a", "b", "d", "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" : "(z*D[+ , {z, 1}]a)*w",
"rhs" : "(z*D[+ , {z, 1}]b)*Divide[d*w,d*z]",
"testExpression" : "((z*D[+ , {z, 1}]a)*w)-((z*D[+ , {z, 1}]b)*Divide[d*w,d*z])",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "(z*diff(+ , z, 1)a)*w == (z*diff(+ , z, 1)b)*(d*w)/(d*z)",
"translationInformation" : {
"subEquations" : [ "(z*diff(+ , z, 1)a)*w = (z*diff(+ , z, 1)b)*(d*w)/(d*z)" ],
"freeVariables" : [ "a", "b", "d", "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" : "(z*diff(+ , [z$(1)])a)*w = (z*diff(+ , [z$(1)])b)*(d*w)/(d*z)",
"translationInformation" : {
"subEquations" : [ "(z*diff(+ , [z$(1)])a)*w = (z*diff(+ , [z$(1)])b)*(d*w)/(d*z)" ],
"freeVariables" : [ "a", "b", "d", "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" : 20,
"sentence" : 2,
"word" : 7
} ],
"includes" : [ "a", "z", "d", "w = \\left (z\\frac{d}{dz}+a \\right )\\frac{dw}{dz}", "b" ],
"isPartOf" : [ "\\left (z\\frac{d}{dz}+a \\right ) \\left (z\\frac{d}{dz}+b \\right )w =\\left (z\\frac{d}{dz}+c \\right )\\frac{dw}{dz}" ],
"definiens" : [ {
"definition" : "differential equation for this function",
"score" : 0.7968541685700381
} ]
}