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^2y}{dt^2} +\frac{1}{2}\left(\frac{1}{t-e_1}+\frac{1}{t-e_2}+\frac{1}{t-e_3}\right) \frac{dy}{dt} - \frac{A+Bt}{4(t-e_1)(t-e_2)(t-e_3)}y = 0, }
... is translated to the CAS output ...
Semantic latex: \deriv [2]{y}{t} + \frac{1}{2}(\frac{1}{t-e_1} + \frac{1}{t-e_2} + \frac{1}{t-e_3}) \frac{dy}{dt} - \frac{A+Bt}{4(t-e_1)(t-e_2)(t-e_3)} y = 0
Confidence: 0
Mathematica
Translation: D[y, {t, 2}]+Divide[1,2]*(Divide[1,t - Subscript[e, 1]]+Divide[1,t - Subscript[e, 2]]+Divide[1,t - Subscript[e, 3]])*Divide[d*y,d*t]-Divide[A + B*t,4*(t - Subscript[e, 1])*(t - Subscript[e, 2])*(t - Subscript[e, 3])]*y == 0
Information
Sub Equations
- D[y, {t, 2}]+Divide[1,2]*(Divide[1,t - Subscript[e, 1]]+Divide[1,t - Subscript[e, 2]]+Divide[1,t - Subscript[e, 3]])*Divide[d*y,d*t]-Divide[A + B*t,4*(t - Subscript[e, 1])*(t - Subscript[e, 2])*(t - Subscript[e, 3])]*y = 0
Free variables
- A
- B
- Subscript[e, 1]
- Subscript[e, 2]
- Subscript[e, 3]
- d
- t
- y
Symbol info
- You use a typical letter for a constant [the mathematical constant e == Napier's constant == 2.71828182845...].
We keep it like it is! But you should know that Mathematica uses E for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \expe
- 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
Numeric
SymPy
Translation: diff(y, t, 2)+(1)/(2)*((1)/(t - Symbol('{e}_{1}'))+(1)/(t - Symbol('{e}_{2}'))+(1)/(t - Symbol('{e}_{3}')))*(d*y)/(d*t)-(A + B*t)/(4*(t - Symbol('{e}_{1}'))*(t - Symbol('{e}_{2}'))*(t - Symbol('{e}_{3}')))*y == 0
Information
Sub Equations
- diff(y, t, 2)+(1)/(2)*((1)/(t - Symbol('{e}_{1}'))+(1)/(t - Symbol('{e}_{2}'))+(1)/(t - Symbol('{e}_{3}')))*(d*y)/(d*t)-(A + B*t)/(4*(t - Symbol('{e}_{1}'))*(t - Symbol('{e}_{2}'))*(t - Symbol('{e}_{3}')))*y = 0
Free variables
- A
- B
- Symbol('{e}_{1}')
- Symbol('{e}_{2}')
- Symbol('{e}_{3}')
- d
- t
- y
Symbol info
- You use a typical letter for a constant [the mathematical constant e == Napier's constant == 2.71828182845...].
We keep it like it is! But you should know that SymPy uses E for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \expe
- 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(y, [t$(2)])+(1)/(2)*((1)/(t - e[1])+(1)/(t - e[2])+(1)/(t - e[3]))*(d*y)/(d*t)-(A + B*t)/(4*(t - e[1])*(t - e[2])*(t - e[3]))*y = 0
Information
Sub Equations
- diff(y, [t$(2)])+(1)/(2)*((1)/(t - e[1])+(1)/(t - e[2])+(1)/(t - e[3]))*(d*y)/(d*t)-(A + B*t)/(4*(t - e[1])*(t - e[2])*(t - e[3]))*y = 0
Free variables
- A
- B
- d
- e[1]
- e[2]
- e[3]
- t
- y
Symbol info
- You use a typical letter for a constant [the mathematical constant e == Napier's constant == 2.71828182845...].
We keep it like it is! But you should know that Maple uses exp(1) for this constant. If you want to translate it as a constant, use the corresponding DLMF macro \expe
- 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
- algebraic form
- change
- special case of Heun 's equation
- Lamé 's equation
Complete translation information:
{
"id" : "FORMULA_088f5302d8aff4557de6124d359832b2",
"formula" : "\\frac{d^2y}{dt^2} +\\frac{1}{2}\\left(\\frac{1}{t-e_1}+\\frac{1}{t-e_2}+\\frac{1}{t-e_3}\\right) \\frac{dy}{dt} - \\frac{A+Bt}{4(t-e_1)(t-e_2)(t-e_3)}y = 0",
"semanticFormula" : "\\deriv [2]{y}{t} + \\frac{1}{2}(\\frac{1}{t-e_1} + \\frac{1}{t-e_2} + \\frac{1}{t-e_3}) \\frac{dy}{dt} - \\frac{A+Bt}{4(t-e_1)(t-e_2)(t-e_3)} y = 0",
"confidence" : 0.0,
"translations" : {
"Mathematica" : {
"translation" : "D[y, {t, 2}]+Divide[1,2]*(Divide[1,t - Subscript[e, 1]]+Divide[1,t - Subscript[e, 2]]+Divide[1,t - Subscript[e, 3]])*Divide[d*y,d*t]-Divide[A + B*t,4*(t - Subscript[e, 1])*(t - Subscript[e, 2])*(t - Subscript[e, 3])]*y == 0",
"translationInformation" : {
"subEquations" : [ "D[y, {t, 2}]+Divide[1,2]*(Divide[1,t - Subscript[e, 1]]+Divide[1,t - Subscript[e, 2]]+Divide[1,t - Subscript[e, 3]])*Divide[d*y,d*t]-Divide[A + B*t,4*(t - Subscript[e, 1])*(t - Subscript[e, 2])*(t - Subscript[e, 3])]*y = 0" ],
"freeVariables" : [ "A", "B", "Subscript[e, 1]", "Subscript[e, 2]", "Subscript[e, 3]", "d", "t", "y" ],
"tokenTranslations" : {
"e" : "You use a typical letter for a constant [the mathematical constant e == Napier's constant == 2.71828182845...].\nWe keep it like it is! But you should know that Mathematica uses E for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\expe\n",
"\\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" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
},
"SymPy" : {
"translation" : "diff(y, t, 2)+(1)/(2)*((1)/(t - Symbol('{e}_{1}'))+(1)/(t - Symbol('{e}_{2}'))+(1)/(t - Symbol('{e}_{3}')))*(d*y)/(d*t)-(A + B*t)/(4*(t - Symbol('{e}_{1}'))*(t - Symbol('{e}_{2}'))*(t - Symbol('{e}_{3}')))*y == 0",
"translationInformation" : {
"subEquations" : [ "diff(y, t, 2)+(1)/(2)*((1)/(t - Symbol('{e}_{1}'))+(1)/(t - Symbol('{e}_{2}'))+(1)/(t - Symbol('{e}_{3}')))*(d*y)/(d*t)-(A + B*t)/(4*(t - Symbol('{e}_{1}'))*(t - Symbol('{e}_{2}'))*(t - Symbol('{e}_{3}')))*y = 0" ],
"freeVariables" : [ "A", "B", "Symbol('{e}_{1}')", "Symbol('{e}_{2}')", "Symbol('{e}_{3}')", "d", "t", "y" ],
"tokenTranslations" : {
"e" : "You use a typical letter for a constant [the mathematical constant e == Napier's constant == 2.71828182845...].\nWe keep it like it is! But you should know that SymPy uses E for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\expe\n",
"\\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"
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
},
"Maple" : {
"translation" : "diff(y, [t$(2)])+(1)/(2)*((1)/(t - e[1])+(1)/(t - e[2])+(1)/(t - e[3]))*(d*y)/(d*t)-(A + B*t)/(4*(t - e[1])*(t - e[2])*(t - e[3]))*y = 0",
"translationInformation" : {
"subEquations" : [ "diff(y, [t$(2)])+(1)/(2)*((1)/(t - e[1])+(1)/(t - e[2])+(1)/(t - e[3]))*(d*y)/(d*t)-(A + B*t)/(4*(t - e[1])*(t - e[2])*(t - e[3]))*y = 0" ],
"freeVariables" : [ "A", "B", "d", "e[1]", "e[2]", "e[3]", "t", "y" ],
"tokenTranslations" : {
"e" : "You use a typical letter for a constant [the mathematical constant e == Napier's constant == 2.71828182845...].\nWe keep it like it is! But you should know that Maple uses exp(1) for this constant.\nIf you want to translate it as a constant, use the corresponding DLMF macro \\expe\n",
"\\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"
}
},
"numericResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"wasAborted" : false,
"crashed" : false,
"testCalculationsGroups" : [ ]
},
"symbolicResults" : {
"overallResult" : "SKIPPED",
"numberOfTests" : 0,
"numberOfFailedTests" : 0,
"numberOfSuccessfulTests" : 0,
"numberOfSkippedTests" : 0,
"numberOfErrorTests" : 0,
"crashed" : false,
"testCalculationsGroup" : [ ]
}
}
},
"positions" : [ {
"section" : 1,
"sentence" : 3,
"word" : 21
} ],
"includes" : [ "t", "A" ],
"isPartOf" : [ ],
"definiens" : [ {
"definition" : "algebraic form",
"score" : 0.6859086196238077
}, {
"definition" : "change",
"score" : 0.6859086196238077
}, {
"definition" : "special case of Heun 's equation",
"score" : 0.6859086196238077
}, {
"definition" : "Lamé 's equation",
"score" : 0.6460746792928004
} ]
}