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 \,(d/dx) \log(\sin\pi x)=\pi\cot\pi x}
... is translated to the CAS output ...
Semantic latex: (d / dx) \log(\sin \cpi x) = \cpi \cot \cpi x
Confidence: 0
Mathematica
Translation: (d/d*x)*Log[(Sin[Pi]*x) ] == Pi*Cot[Pi]*x
Information
Sub Equations
- (d/d*x)*Log[(Sin[Pi]*x) ] = Pi*Cot[Pi]*x
Free variables
- d
- x
Symbol info
- Pi was translated to: Pi
- Logarithm; Example: \log@@{z}
Will be translated to: Log[$0] Constraints: z != 0 Branch Cuts: (-\infty, 0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E2 Mathematica: https://reference.wolfram.com/language/ref/Log.html
- 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
- Cotangent; Example: \cot@@{z}
Will be translated to: Cot[$0] Constraints: z != k*\cpi \forall k \in \Integers Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E7 Mathematica: https://reference.wolfram.com/language/ref/Cot.html
Tests
Symbolic
Test expression: ((d/d*x)*Log[(Sin[Pi]*x) ])-(Pi*Cot[Pi]*x)
ERROR:
{
"result": "ERROR",
"testTitle": "Simple",
"testExpression": null,
"resultExpression": null,
"wasAborted": false,
"conditionallySuccessful": false
}
Numeric
SymPy
Translation: (d/d*x)*log((sin(pi)*x) ) == pi*cot(pi)*x
Information
Sub Equations
- (d/d*x)*log((sin(pi)*x) ) = pi*cot(pi)*x
Free variables
- d
- x
Symbol info
- Pi was translated to: pi
- Logarithm; Example: \log@@{z}
Will be translated to: log($0) Constraints: z != 0 Branch Cuts: (-\infty, 0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E2 SymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#log
- Sine; Example: \sin@@{z}
Will be translated to: sin($0) Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E1 SymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#sin
- Cotangent; Example: \cot@@{z}
Will be translated to: cot($0) Constraints: z != k*\cpi \forall k \in \Integers Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E7 SymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#cot
Tests
Symbolic
Numeric
Maple
Translation: (d/d*x)*log((sin(Pi)*x) ) = Pi*cot(Pi)*x
Information
Sub Equations
- (d/d*x)*log((sin(Pi)*x) ) = Pi*cot(Pi)*x
Free variables
- d
- x
Symbol info
- Pi was translated to: Pi
- Logarithm; Example: \log@@{z}
Will be translated to: log($0) Constraints: z != 0 Branch Cuts: (-\infty, 0] Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.2#E2 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=log
- 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
- Cotangent; Example: \cot@@{z}
Will be translated to: cot($0) Constraints: z != k*\cpi \forall k \in \Integers Relevant links to definitions: DLMF: http://dlmf.nist.gov/4.14#E7 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=cot
Tests
Symbolic
Numeric
Dependency Graph Information
Includes
Is part of
Complete translation information:
{
"id" : "FORMULA_7a207c9c670439d6f859dc15d2cdc668",
"formula" : "(d/dx) \\log(\\sin\\pi x)=\\pi\\cot\\pi x",
"semanticFormula" : "(d / dx) \\log(\\sin \\cpi x) = \\cpi \\cot \\cpi x",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "(d/d*x)*Log[(Sin[Pi]*x) ] == Pi*Cot[Pi]*x",
"translationInformation" : {
"subEquations" : [ "(d/d*x)*Log[(Sin[Pi]*x) ] = Pi*Cot[Pi]*x" ],
"freeVariables" : [ "d", "x" ],
"tokenTranslations" : {
"\\cpi" : "Pi was translated to: Pi",
"\\log" : "Logarithm; Example: \\log@@{z}\nWill be translated to: Log[$0]\nConstraints: z != 0\nBranch Cuts: (-\\infty, 0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.2#E2\nMathematica: https://reference.wolfram.com/language/ref/Log.html",
"\\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",
"\\cot" : "Cotangent; Example: \\cot@@{z}\nWill be translated to: Cot[$0]\nConstraints: z != k*\\cpi \\forall k \\in \\Integers\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E7\nMathematica: https://reference.wolfram.com/language/ref/Cot.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/d*x)*Log[(Sin[Pi]*x) ]",
"rhs" : "Pi*Cot[Pi]*x",
"testExpression" : "((d/d*x)*Log[(Sin[Pi]*x) ])-(Pi*Cot[Pi]*x)",
"testCalculations" : [ {
"result" : "ERROR",
"testTitle" : "Simple",
"testExpression" : null,
"resultExpression" : null,
"wasAborted" : false,
"conditionallySuccessful" : false
} ]
} ]
}
},
"SymPy" : {
"translation" : "(d/d*x)*log((sin(pi)*x) ) == pi*cot(pi)*x",
"translationInformation" : {
"subEquations" : [ "(d/d*x)*log((sin(pi)*x) ) = pi*cot(pi)*x" ],
"freeVariables" : [ "d", "x" ],
"tokenTranslations" : {
"\\cpi" : "Pi was translated to: pi",
"\\log" : "Logarithm; Example: \\log@@{z}\nWill be translated to: log($0)\nConstraints: z != 0\nBranch Cuts: (-\\infty, 0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.2#E2\nSymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#log",
"\\sin" : "Sine; Example: \\sin@@{z}\nWill be translated to: sin($0)\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E1\nSymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#sin",
"\\cot" : "Cotangent; Example: \\cot@@{z}\nWill be translated to: cot($0)\nConstraints: z != k*\\cpi \\forall k \\in \\Integers\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E7\nSymPy: https://docs.sympy.org/latest/modules/functions/elementary.html#cot"
}
}
},
"Maple" : {
"translation" : "(d/d*x)*log((sin(Pi)*x) ) = Pi*cot(Pi)*x",
"translationInformation" : {
"subEquations" : [ "(d/d*x)*log((sin(Pi)*x) ) = Pi*cot(Pi)*x" ],
"freeVariables" : [ "d", "x" ],
"tokenTranslations" : {
"\\cpi" : "Pi was translated to: Pi",
"\\log" : "Logarithm; Example: \\log@@{z}\nWill be translated to: log($0)\nConstraints: z != 0\nBranch Cuts: (-\\infty, 0]\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.2#E2\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=log",
"\\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",
"\\cot" : "Cotangent; Example: \\cot@@{z}\nWill be translated to: cot($0)\nConstraints: z != k*\\cpi \\forall k \\in \\Integers\nRelevant links to definitions:\nDLMF: http://dlmf.nist.gov/4.14#E7\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=cot"
}
}
}
},
"positions" : [ ],
"includes" : [ "\\,(d/dx) \\log(\\sin\\pi x)=\\pi\\cot\\pi x" ],
"isPartOf" : [ "\\,(d/dx) \\log(\\sin\\pi x)=\\pi\\cot\\pi x" ],
"definiens" : [ ]
}