LaTeX to CAS translator

Jump to navigation Jump to search

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 \mathbf{M}_\alpha(x)}

... is translated to the CAS output ...

Semantic latex: \modStruveM{\alpha}@{x}

Confidence: 0.68307091716107

Mathematica

Translation: StruveL[\[Alpha], x] - BesselI[\[Alpha], x]

Information

Sub Equations

  • StruveL[\[Alpha], x] - BesselI[\[Alpha], x]

Free variables

  • \[Alpha]
  • x

Symbol info

  • Could be the second Feigenbaum constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

  • Associated Modified Struve function; Example: \modStruveM{\nu}@{z}

Will be translated to: StruveL[$0, $1] - BesselI[$0, $1] Relevant links to definitions: DLMF: http://dlmf.nist.gov/11.2#E6 Mathematica: https://reference.wolfram.com/language/ref/StruveL.html

Tests

Symbolic
Numeric

SymPy

Translation:

Information

Symbol info

  • (LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \modStruveM [\modStruveM]

Tests

Symbolic
Numeric

Maple

Translation: StruveL(alpha, x) - BesselI(alpha, x)

Information

Sub Equations

  • StruveL(alpha, x) - BesselI(alpha, x)

Free variables

  • alpha
  • x

Symbol info

  • Could be the second Feigenbaum constant.

But this system doesn't know how to translate it as a constant. It was translated as a general letter.

  • Associated Modified Struve function; Example: \modStruveM{\nu}@{z}

Will be translated to: StruveL($0, $1) - BesselI($0, $1) Relevant links to definitions: DLMF: http://dlmf.nist.gov/11.2#E6 Maple: https://www.maplesoft.com/support/help/maple/view.aspx?path=StruveL

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

  • Failed to parse (unknown function "\taud"): {\displaystyle \mathbf{H}_\alpha(x)=\frac{2\left(\frac{x}{2}\right)^\alpha}{\sqrt\pi\Gamma\left(\alpha+\frac{1}{2}\right)}\int_0^1(1-t^2)^{\alpha-\frac{1}{2}}\sin xtdt=\frac{2\left(\frac{x}{2}\right)^\alpha}{\sqrt\pi\Gamma\left(\alpha+\frac{1}{2}\right)}\int_0^\frac{\pi}{2}\sin(x\cos\tau)\sin^{2\alpha}\taud\tau=\frac{2\left(\frac{x}{2}\right)^\alpha}{\sqrt\pi\Gamma\left(\alpha+\frac{1}{2}\right)}\int_0^\frac{\pi}{2}\sin(x\sin\tau)\cos^{2\alpha}\taud\tau}
  • Failed to parse (unknown function "\taud"): {\displaystyle \mathbf{K}_\alpha(x)=\frac{2\left(\frac{x}{2}\right)^\alpha}{\sqrt\pi\Gamma\left(\alpha+\frac{1}{2}\right)}\int_0^\infty(1+t^2)^{\alpha-\frac{1}{2}}e^{-xt}dt=\frac{2\left(\frac{x}{2}\right)^\alpha}{\sqrt\pi\Gamma\left(\alpha+\frac{1}{2}\right)}\int_0^\infty e^{-x\sinh\tau}\cosh^{2\alpha}\taud\tau}
  • Failed to parse (unknown function "\taud"): {\displaystyle \mathbf{L}_\alpha(x)=\frac{2\left(\frac{x}{2}\right)^\alpha}{\sqrt\pi\Gamma\left(\alpha+\frac{1}{2}\right)}\int_0^1(1-t^2)^{\alpha-\frac{1}{2}}\sinh xtdt=\frac{2\left(\frac{x}{2}\right)^\alpha}{\sqrt\pi\Gamma\left(\alpha+\frac{1}{2}\right)}\int_0^\frac{\pi}{2}\sinh(x\cos\tau)\sin^{2\alpha}\taud\tau=\frac{2\left(\frac{x}{2}\right)^\alpha}{\sqrt\pi\Gamma\left(\alpha+\frac{1}{2}\right)}\int_0^\frac{\pi}{2}\sinh(x\sin\tau)\cos^{2\alpha}\taud\tau}
  • Failed to parse (unknown function "\taud"): {\displaystyle \mathbf{M}_\alpha(x)=-\frac{2\left(\frac{x}{2}\right)^\alpha}{\sqrt\pi\Gamma\left(\alpha+\frac{1}{2}\right)}\int_0^1(1-t^2)^{\alpha-\frac{1}{2}}e^{-xt}dt=-\frac{2\left(\frac{x}{2}\right)^\alpha}{\sqrt\pi\Gamma\left(\alpha+\frac{1}{2}\right)}\int_0^\frac{\pi}{2}e^{-x\cos\tau}\sin^{2\alpha}\taud\tau=-\frac{2\left(\frac{x}{2}\right)^\alpha}{\sqrt\pi\Gamma\left(\alpha+\frac{1}{2}\right)}\int_0^\frac{\pi}{2}e^{-x\sin\tau}\cos^{2\alpha}\taud\tau}

Description

  • second-kind version
  • solution
  • non-homogeneous Bessel 's differential equation
  • modified Struve function
  • Struve function
  • mathematics
  • gamma function
  • hypergeometric function
  • Struve
  • power series
  • Neumann function
  • recurrence relation
  • Gauss
  • definition of the Struve function
  • term of the Poisson 's integral representation
  • value
  • term
  • order

Complete translation information:

{
  "id" : "FORMULA_3a4976a36eddbed3449e3dc8635e4034",
  "formula" : "\\mathbf{M}_\\alpha(x)",
  "semanticFormula" : "\\modStruveM{\\alpha}@{x}",
  "confidence" : 0.6830709171610715,
  "translations" : {
    "Mathematica" : {
      "translation" : "StruveL[\\[Alpha], x] - BesselI[\\[Alpha], x]",
      "translationInformation" : {
        "subEquations" : [ "StruveL[\\[Alpha], x] - BesselI[\\[Alpha], x]" ],
        "freeVariables" : [ "\\[Alpha]", "x" ],
        "tokenTranslations" : {
          "\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
          "\\modStruveM" : "Associated Modified Struve function; Example: \\modStruveM{\\nu}@{z}\nWill be translated to: StruveL[$0, $1] - BesselI[$0, $1]\nRelevant links to definitions:\nDLMF:         http://dlmf.nist.gov/11.2#E6\nMathematica:  https://reference.wolfram.com/language/ref/StruveL.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" : "",
      "translationInformation" : {
        "tokenTranslations" : {
          "Error" : "(LaTeX -> SymPy) No translation possible for given token: Cannot extract information from feature set: \\modStruveM [\\modStruveM]"
        }
      },
      "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" : "StruveL(alpha, x) - BesselI(alpha, x)",
      "translationInformation" : {
        "subEquations" : [ "StruveL(alpha, x) - BesselI(alpha, x)" ],
        "freeVariables" : [ "alpha", "x" ],
        "tokenTranslations" : {
          "\\alpha" : "Could be the second Feigenbaum constant.\nBut this system doesn't know how to translate it as a constant. It was translated as a general letter.\n",
          "\\modStruveM" : "Associated Modified Struve function; Example: \\modStruveM{\\nu}@{z}\nWill be translated to: StruveL($0, $1) - BesselI($0, $1)\nRelevant links to definitions:\nDLMF:  http://dlmf.nist.gov/11.2#E6\nMaple: https://www.maplesoft.com/support/help/maple/view.aspx?path=StruveL"
        }
      },
      "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" : 0,
    "sentence" : 3,
    "word" : 30
  } ],
  "includes" : [ "\\mathbf{K}_\\alpha(x)", "\\mathbf{L}_{\\alpha}(x)", "\\alpha", "\\mathbf{H}_{\\alpha}(x)", "\\mathbf{H}_{\\alpha}(z)", "x", "Y_{\\alpha}(x)" ],
  "isPartOf" : [ "\\mathbf{K}_\\alpha(x)", "\\mathbf{L}_{\\alpha}(x)", "\\mathbf{K}_\\alpha(x)=\\mathbf{H}_\\alpha(x)-Y_\\alpha(x)", "\\mathbf{H}_{\\alpha}(x)", "-ie^{-i\\alpha\\pi / 2}\\mathbf{H}_{\\alpha}(ix)", "\\mathbf{M}_\\alpha(x)=\\mathbf{L}_\\alpha(x)-I_\\alpha(x)", "\\mathbf{H}_{\\alpha}(z)", "\\mathbf{H}_\\alpha(z) = \\sum_{m=0}^\\infty \\frac{(-1)^m}{\\Gamma \\left (m+\\frac{3}{2} \\right ) \\Gamma \\left (m+\\alpha+\\frac{3}{2} \\right )} \\left({\\frac{z}{2}}\\right)^{2m+\\alpha+1}", "\\mathbf{H}_\\alpha(x)=\\frac{2\\left(\\frac{x}{2}\\right)^\\alpha}{\\sqrt\\pi\\Gamma\\left(\\alpha+\\frac{1}{2}\\right)}\\int_0^1(1-t^2)^{\\alpha-\\frac{1}{2}}\\sin xtdt=\\frac{2\\left(\\frac{x}{2}\\right)^\\alpha}{\\sqrt\\pi\\Gamma\\left(\\alpha+\\frac{1}{2}\\right)}\\int_0^\\frac{\\pi}{2}\\sin(x\\cos\\tau)\\sin^{2\\alpha}\\taud\\tau=\\frac{2\\left(\\frac{x}{2}\\right)^\\alpha}{\\sqrt\\pi\\Gamma\\left(\\alpha+\\frac{1}{2}\\right)}\\int_0^\\frac{\\pi}{2}\\sin(x\\sin\\tau)\\cos^{2\\alpha}\\taud\\tau", "\\mathbf{K}_\\alpha(x)=\\frac{2\\left(\\frac{x}{2}\\right)^\\alpha}{\\sqrt\\pi\\Gamma\\left(\\alpha+\\frac{1}{2}\\right)}\\int_0^\\infty(1+t^2)^{\\alpha-\\frac{1}{2}}e^{-xt}dt=\\frac{2\\left(\\frac{x}{2}\\right)^\\alpha}{\\sqrt\\pi\\Gamma\\left(\\alpha+\\frac{1}{2}\\right)}\\int_0^\\infty e^{-x\\sinh\\tau}\\cosh^{2\\alpha}\\taud\\tau", "\\mathbf{L}_\\alpha(x)=\\frac{2\\left(\\frac{x}{2}\\right)^\\alpha}{\\sqrt\\pi\\Gamma\\left(\\alpha+\\frac{1}{2}\\right)}\\int_0^1(1-t^2)^{\\alpha-\\frac{1}{2}}\\sinh xtdt=\\frac{2\\left(\\frac{x}{2}\\right)^\\alpha}{\\sqrt\\pi\\Gamma\\left(\\alpha+\\frac{1}{2}\\right)}\\int_0^\\frac{\\pi}{2}\\sinh(x\\cos\\tau)\\sin^{2\\alpha}\\taud\\tau=\\frac{2\\left(\\frac{x}{2}\\right)^\\alpha}{\\sqrt\\pi\\Gamma\\left(\\alpha+\\frac{1}{2}\\right)}\\int_0^\\frac{\\pi}{2}\\sinh(x\\sin\\tau)\\cos^{2\\alpha}\\taud\\tau", "\\mathbf{M}_\\alpha(x)=-\\frac{2\\left(\\frac{x}{2}\\right)^\\alpha}{\\sqrt\\pi\\Gamma\\left(\\alpha+\\frac{1}{2}\\right)}\\int_0^1(1-t^2)^{\\alpha-\\frac{1}{2}}e^{-xt}dt=-\\frac{2\\left(\\frac{x}{2}\\right)^\\alpha}{\\sqrt\\pi\\Gamma\\left(\\alpha+\\frac{1}{2}\\right)}\\int_0^\\frac{\\pi}{2}e^{-x\\cos\\tau}\\sin^{2\\alpha}\\taud\\tau=-\\frac{2\\left(\\frac{x}{2}\\right)^\\alpha}{\\sqrt\\pi\\Gamma\\left(\\alpha+\\frac{1}{2}\\right)}\\int_0^\\frac{\\pi}{2}e^{-x\\sin\\tau}\\cos^{2\\alpha}\\taud\\tau", "\\mathbf{H}_\\alpha(x) - Y_\\alpha(x) = \\frac{\\left(\\frac{x}{2}\\right)^{\\alpha-1}}{\\sqrt{\\pi} \\Gamma \\left (\\alpha+\\frac{1}{2} \\right )} + O\\left(\\left (\\tfrac{x}{2}\\right)^{\\alpha-3}\\right)", "Y_{\\alpha}(x)", "\\begin{align}\\mathbf{H}_{\\alpha -1}(x) + \\mathbf{H}_{\\alpha+1}(x) &= \\frac{2\\alpha}{x} \\mathbf{H}_\\alpha (x) + \\frac{\\left (\\frac{x}{2}\\right)^{\\alpha}}{\\sqrt{\\pi}\\Gamma \\left (\\alpha + \\frac{3}{2} \\right )}, \\\\\\mathbf{H}_{\\alpha -1}(x) - \\mathbf{H}_{\\alpha+1}(x) &= 2 \\frac{d}{dx} \\left (\\mathbf{H}_\\alpha(x) \\right) - \\frac{ \\left( \\frac{x}{2} \\right)^\\alpha}{\\sqrt{\\pi}\\Gamma \\left (\\alpha + \\frac{3}{2} \\right )}.\\end{align}", "\\mathbf{H}_{\\alpha}(z) = \\frac{z^{\\alpha+1}}{2^{\\alpha}\\sqrt{\\pi} \\Gamma \\left (\\alpha+\\tfrac{3}{2} \\right )} {}_1F_2 \\left (1,\\tfrac{3}{2}, \\alpha+\\tfrac{3}{2},-\\tfrac{z^2}{4} \\right )" ],
  "definiens" : [ {
    "definition" : "second-kind version",
    "score" : 0.8728715749853855
  }, {
    "definition" : "solution",
    "score" : 0.8094283008158696
  }, {
    "definition" : "non-homogeneous Bessel 's differential equation",
    "score" : 0.7071400336477065
  }, {
    "definition" : "modified Struve function",
    "score" : 0.6687181434333315
  }, {
    "definition" : "Struve function",
    "score" : 0.6193001060489038
  }, {
    "definition" : "mathematics",
    "score" : 0.4968133815285695
  }, {
    "definition" : "gamma function",
    "score" : 0.451864458892933
  }, {
    "definition" : "hypergeometric function",
    "score" : 0.4469468272392073
  }, {
    "definition" : "Struve",
    "score" : 0.43933458000852793
  }, {
    "definition" : "power series",
    "score" : 0.42517456802546916
  }, {
    "definition" : "Neumann function",
    "score" : 0.35408542099079315
  }, {
    "definition" : "recurrence relation",
    "score" : 0.3522700134674619
  }, {
    "definition" : "Gauss",
    "score" : 0.351603756608273
  }, {
    "definition" : "definition of the Struve function",
    "score" : 0.3463967148619029
  }, {
    "definition" : "term of the Poisson 's integral representation",
    "score" : 0.3065627745308957
  }, {
    "definition" : "value",
    "score" : 0.3065627745308957
  }, {
    "definition" : "term",
    "score" : 0.2850799254098019
  }, {
    "definition" : "order",
    "score" : 0.1439126716984509
  } ]
}

Specify your own input