# Demo

$\mathrm{\LaTeX\ Output}$
Output LaTeX Code
Output Sage Code
Output Syntax Tree

## Instructions

The toolbars above are just for your convenience; there are multiple alternatives for many of the symbol and operator token. For example, the "not equal" relation can be written as <> (from SQL), != (traditional), or /= (from Haskell). The language is designed to be intuitive, so feel free to experiment. Try finding all six keywords for "proper superset".

Enter a mathematical expression and watch the rendering and parse tree evolve as you type. Please note that no LaTeX/AST output will be rendered until a successful parse. To help maximize the frequency of successful parses, the Lexer will attempt to fix unmatched delimiters as you type. Also note that some delimiters have more than one formate either with or without colons. Namely, absolute value can be written as | ... | or |: ... :|, norm can be written as || ... ||, or ||: ... :||, and vector literals can be surrounded by either < ... > or <: ... :>. Delimiters without colons are context-aware in that they have different meanings other than as delimiters and therefore cannot be automatically matched by the Lexer. Additionally, if an expression is opened with one type of delimiter, it must be closed with the same type (i.e. context-aware vs. specialized).

## Sample Inputs

Click on an expression below to use it as the mathematical input above.

• Slope-Intercept form: y = m*x + b
• Quadratic form: a*x^2 + b*x + c = 0
• Traditional:  x = (-b &pm sqrt(b^2 - 4*a*c))/(2*a)
• Set form: x in {(-b+sqrt(b^2-4*a*c))/(2*a), (-b-sqrt(b^2-4*a*c))/(2*a)}
• Volume of a Sphere:
• V = 4/3*#pi*r^3
• V = 2/3*#tau*r^3
• Integration: &int &_0 &^1 1/(1+x^2) &dx = #p/4
• Differentiation: diff(arcsin(x), x) = 1/sqrt(1-x^2)
• Limits:
• f'(x) = lim((f(x+h)-f(x))/h, h, 0)
• limit((1+r/n)^(t/n), n, infinity) = #e^(r*t)
• Logarithms: ln(x) = log(x, #e)
• Sums and Products:
• On Relations
• sum(root(a,3), a in A)
• prod(exp(5/n), n > 3)
• Over Ranges
• sum(1/n, n, 0, #infinity) = infinity
• prod(x^2, x, a, b)
• Vectors:
• Unit Vectors: #vi = x*#vi/||x*#vi||
• Volume of a Parallelepiped: V = | <u&_x, u&_y, u&_z> &. <: v&_x, v&_y, v&_z :> &x <w&_x, w&_y, w&_z> |
• Area of Parallelogram: A = ||: &v v &x &v w :||
• Logical Connectives: p and (q or r) === p && q || p & & r
• Definition of the subset relation: A subset B <-> a in A implies a in B
• Definition of Big-Oh (notice the two different forms for "absolute value"):
f(x) in O(g(x)) iff exists x&_0 in #Z : exists C in #R : forall x>x&_0 -> |f(x)| <= C*|: g(x) :|
• Ranges:
• Open: x = [: a, b :]
• Closed: x = (: a, b :)
• Half-Open: x = [: a, #infinity :)
• Lists: [#pi, #e, #gamma]