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 \tfrac{x^2}{a^2}+\tfrac{y^2}{b^2}=1}

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

Semantic latex: \tfrac{x^2}{a^2}+\tfrac{y^2}{b^2}=1

Confidence: 0

Mathematica

Translation: Divide[(x)^(2),(a)^(2)]+Divide[(y)^(2),(b)^(2)] == 1

Information

Sub Equations

  • Divide[(x)^(2),(a)^(2)]+Divide[(y)^(2),(b)^(2)] = 1

Free variables

  • a
  • b
  • x
  • y

Tests

Symbolic

Test expression: (Divide[(x)^(2),(a)^(2)]+Divide[(y)^(2),(b)^(2)])-(1)

ERROR:

{
    "result": "ERROR",
    "testTitle": "Simple",
    "testExpression": null,
    "resultExpression": null,
    "wasAborted": false,
    "conditionallySuccessful": false
}
Numeric

SymPy

Translation: ((x)**(2))/((a)**(2))+((y)**(2))/((b)**(2)) == 1

Information

Sub Equations

  • ((x)**(2))/((a)**(2))+((y)**(2))/((b)**(2)) = 1

Free variables

  • a
  • b
  • x
  • y

Tests

Symbolic
Numeric

Maple

Translation: ((x)^(2))/((a)^(2))+((y)^(2))/((b)^(2)) = 1

Information

Sub Equations

  • ((x)^(2))/((a)^(2))+((y)^(2))/((b)^(2)) = 1

Free variables

  • a
  • b
  • x
  • y

Tests

Symbolic
Numeric

Dependency Graph Information

Includes

Is part of

  • Failed to parse (syntax error): {\displaystyle \frac{\left(x_1 + su\right)^2}{a^2} + \frac{\left(y_1 + sv\right)^2}{b^2} = 1\ \quad\Longrightarrow\quad 2s\left(\frac{x_1u}{a^2} + \frac{y_1v}{b^2}\right) + s^2\left(\frac{u^2}{a^2} + \frac{v^2}{b^2}\right) = 0\}
  • Failed to parse (syntax error): {\displaystyle \frac{\left(x - x_\circ\right)^2}{a^2} + \frac{\left(y - y_\circ\right)^2}{b^2} = 1 \}
  • Failed to parse (syntax error): {\displaystyle \frac{(x - a)^2}{a^2} + \frac{y^2}{b^2} = 1\}

Description

  • ellipse
  • intersection point of orthogonal tangent
  • circle
  • equation
  • center
  • canonical ellipse equation
  • ellipse with equation
  • equation of a standard ellipse
  • equation of an ellipse
  • left vertex
  • parametric representation of the standard ellipse
  • point of the ellipse
  • standard equation of the ellipse
  • yield
  • affine transformation of the coordinate
  • angle from the positive horizontal axis
  • axis as major axis
  • canonical equation
  • canonical form parameter
  • eccentricity
  • ellipse 's major axis
  • expression
  • formula
  • general equation 's coefficient
  • general form coefficient by the equation
  • generation of point
  • major/minor semi axis
  • principle
  • rotation angle
  • semi-major axis
  • semi-minor axis
  • standard ellipse
  • suitable coordinate system by an equation
  • tangent at a point
  • family of ellipsis
  • metric property
  • new parameter
  • coordinate equation
  • origin with width
  • pencil at the vertex
  • rational parametric equation of an ellipse
  • trigonometric function
  • line 's equation into the ellipse equation
  • radical by suitable squaring
  • section
  • substitution
  • height
  • trigonometric formula

Complete translation information:

{
  "id" : "FORMULA_7d0056d71dcc5ec47120f24edf027406",
  "formula" : "\\tfrac{x^2}{a^2}+\\tfrac{y^2}{b^2}=1",
  "semanticFormula" : "\\tfrac{x^2}{a^2}+\\tfrac{y^2}{b^2}=1",
  "confidence" : 0.0,
  "translations" : {
    "Mathematica" : {
      "translation" : "Divide[(x)^(2),(a)^(2)]+Divide[(y)^(2),(b)^(2)] == 1",
      "translationInformation" : {
        "subEquations" : [ "Divide[(x)^(2),(a)^(2)]+Divide[(y)^(2),(b)^(2)] = 1" ],
        "freeVariables" : [ "a", "b", "x", "y" ]
      },
      "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" : "Divide[(x)^(2),(a)^(2)]+Divide[(y)^(2),(b)^(2)]",
          "rhs" : "1",
          "testExpression" : "(Divide[(x)^(2),(a)^(2)]+Divide[(y)^(2),(b)^(2)])-(1)",
          "testCalculations" : [ {
            "result" : "ERROR",
            "testTitle" : "Simple",
            "testExpression" : null,
            "resultExpression" : null,
            "wasAborted" : false,
            "conditionallySuccessful" : false
          } ]
        } ]
      }
    },
    "SymPy" : {
      "translation" : "((x)**(2))/((a)**(2))+((y)**(2))/((b)**(2)) == 1",
      "translationInformation" : {
        "subEquations" : [ "((x)**(2))/((a)**(2))+((y)**(2))/((b)**(2)) = 1" ],
        "freeVariables" : [ "a", "b", "x", "y" ]
      }
    },
    "Maple" : {
      "translation" : "((x)^(2))/((a)^(2))+((y)^(2))/((b)^(2)) = 1",
      "translationInformation" : {
        "subEquations" : [ "((x)^(2))/((a)^(2))+((y)^(2))/((b)^(2)) = 1" ],
        "freeVariables" : [ "a", "b", "x", "y" ]
      }
    }
  },
  "positions" : [ {
    "section" : 20,
    "sentence" : 0,
    "word" : 3
  } ],
  "includes" : [ "\\tfrac{x^2}{a^2}+\\tfrac{y^2}{b^2} = 1", "= 1", "b", "\\frac{x^2}{a^2}+\\frac{y^2}{b^2} = 1", "\\tfrac{x^2}{a^2} + \\tfrac{y^2}{b^2} = 1", "a", "y", "x", "\\frac{x^2}{a^2} + \\frac{y^2}{b^2} = 1", "\\frac{x^2}{a^2}+\\frac{y^2}{b^2}= 1" ],
  "isPartOf" : [ "\\frac{\\left(x_1 + su\\right)^2}{a^2} + \\frac{\\left(y_1 + sv\\right)^2}{b^2} = 1\\ \\quad\\Longrightarrow\\quad  2s\\left(\\frac{x_1u}{a^2} + \\frac{y_1v}{b^2}\\right) + s^2\\left(\\frac{u^2}{a^2} + \\frac{v^2}{b^2}\\right) = 0\\", "\\tfrac{x^2}{a^2}+\\tfrac{y^2}{b^2} = 1", "\\frac{x^2}{a^2}+\\frac{y^2}{b^2} = 1", "\\tfrac{x^2}{a^2} + \\tfrac{y^2}{b^2} = 1", "\\frac{\\left(x - x_\\circ\\right)^2}{a^2} + \\frac{\\left(y - y_\\circ\\right)^2}{b^2} = 1 \\", "\\frac{x^2}{a^2} + \\frac{y^2}{b^2} = 1", "\\frac{(x - a)^2}{a^2} + \\frac{y^2}{b^2} = 1\\", "\\tfrac{\\left(x - x_\\circ\\right)^2}{a^2} +  \\tfrac{\\left(y - y_\\circ\\right)^2}{b^2} = 1", "\\frac{x^2}{a^2}+\\frac{y^2}{b^2}= 1" ],
  "definiens" : [ {
    "definition" : "ellipse",
    "score" : 0.8609998166517733
  }, {
    "definition" : "intersection point of orthogonal tangent",
    "score" : 0.722
  }, {
    "definition" : "circle",
    "score" : 0.6584038577190456
  }, {
    "definition" : "equation",
    "score" : 0.47231271046425893
  }, {
    "definition" : "center",
    "score" : 0.42102418301027866
  }, {
    "definition" : "canonical ellipse equation",
    "score" : 0.35068571428571427
  }, {
    "definition" : "ellipse with equation",
    "score" : 0.3412842247769857
  }, {
    "definition" : "equation of a standard ellipse",
    "score" : 0.3412842247769857
  }, {
    "definition" : "equation of an ellipse",
    "score" : 0.3412842247769857
  }, {
    "definition" : "left vertex",
    "score" : 0.3412842247769857
  }, {
    "definition" : "parametric representation of the standard ellipse",
    "score" : 0.3412842247769857
  }, {
    "definition" : "point of the ellipse",
    "score" : 0.3412842247769857
  }, {
    "definition" : "standard equation of the ellipse",
    "score" : 0.3412842247769857
  }, {
    "definition" : "yield",
    "score" : 0.3412842247769857
  }, {
    "definition" : "affine transformation of the coordinate",
    "score" : 0.31459433390952196
  }, {
    "definition" : "angle from the positive horizontal axis",
    "score" : 0.31459433390952196
  }, {
    "definition" : "axis as major axis",
    "score" : 0.31459433390952196
  }, {
    "definition" : "canonical equation",
    "score" : 0.31459433390952196
  }, {
    "definition" : "canonical form parameter",
    "score" : 0.31459433390952196
  }, {
    "definition" : "eccentricity",
    "score" : 0.31459433390952196
  }, {
    "definition" : "ellipse 's major axis",
    "score" : 0.31459433390952196
  }, {
    "definition" : "expression",
    "score" : 0.31459433390952196
  }, {
    "definition" : "formula",
    "score" : 0.31459433390952196
  }, {
    "definition" : "general equation 's coefficient",
    "score" : 0.31459433390952196
  }, {
    "definition" : "general form coefficient by the equation",
    "score" : 0.31459433390952196
  }, {
    "definition" : "generation of point",
    "score" : 0.31459433390952196
  }, {
    "definition" : "major/minor semi axis",
    "score" : 0.31459433390952196
  }, {
    "definition" : "principle",
    "score" : 0.31459433390952196
  }, {
    "definition" : "rotation angle",
    "score" : 0.31459433390952196
  }, {
    "definition" : "semi-major axis",
    "score" : 0.31459433390952196
  }, {
    "definition" : "semi-minor axis",
    "score" : 0.31459433390952196
  }, {
    "definition" : "standard ellipse",
    "score" : 0.31459433390952196
  }, {
    "definition" : "suitable coordinate system by an equation",
    "score" : 0.31459433390952196
  }, {
    "definition" : "tangent at a point",
    "score" : 0.31459433390952196
  }, {
    "definition" : "family of ellipsis",
    "score" : 0.27476039357851473
  }, {
    "definition" : "metric property",
    "score" : 0.27476039357851473
  }, {
    "definition" : "new parameter",
    "score" : 0.27476039357851473
  }, {
    "definition" : "coordinate equation",
    "score" : 0.22750321381914684
  }, {
    "definition" : "origin with width",
    "score" : 0.22750321381914684
  }, {
    "definition" : "pencil at the vertex",
    "score" : 0.22750321381914684
  }, {
    "definition" : "rational parametric equation of an ellipse",
    "score" : 0.22750321381914684
  }, {
    "definition" : "trigonometric function",
    "score" : 0.22750321381914684
  }, {
    "definition" : "line 's equation into the ellipse equation",
    "score" : 0.17878095238095237
  }, {
    "definition" : "radical by suitable squaring",
    "score" : 0.17878095238095237
  }, {
    "definition" : "section",
    "score" : 0.17878095238095237
  }, {
    "definition" : "substitution",
    "score" : 0.17878095238095237
  }, {
    "definition" : "height",
    "score" : 0.13359313986716373
  }, {
    "definition" : "trigonometric formula",
    "score" : 0.13359313986716373
  } ]
}

Specify your own input