Cookbook

ASCII Math Examples

Pingree's Potato Patch
Studying the Economics of Detroit
Type this See that Comment
 x^2+y_1+z_12^34
` %height=60px% x^2+y_1+z_12^34 ` subscripts as in TeX, but numbers are treated as a unit
 sin^-1(x)
` %height=60px% sin^-1(x)` function names are treated as constants
 d/(dx)f(x)
 =lim_(h->0)(f(x+h)-f(x))/h
` %height=80px% d/(dx)f(x)=lim_(h->0)(f(x+h)-f(x))/h` complex subscripts are bracketed, displayed under lim
 f(x)=sum_(n=0)^oo
 (f^((n))(a))/(n!)
 (x-a)^n
` %height=80px% f(x)=sum_(n=0)^oo(f^((n))(a))/(n!)(x-a)^n` f^((n))(a) must be bracketed, else the numerator is only a
 int_0^1f(x)dx
` %height=80px% int_0^1f(x)dx` subscripts must come before superscripts
 [[a,b],[c,d]]((n),(k))
` %height=80px% [[a,b],[c,d]]((n),(k))` matrices and column vectors are simple to type
 x/x={(1,if x!=0),
 (text{undefined},if x=0):}
` %height=80px% x/x={(1,if x!=0),(text{undefined},if x=0):}` piecewise defined function are based on matrix notation
 a//b
` %height=50px% a//b` use // for inline fractions
 (a/b)/(c/d)
` %height=90px% (a/b)/(c/d)` with brackets, multiple fraction work as expected
 ((a*b))/c
` %height=70px% ((a*b))/c` only one level of brackets is removed; * gives standard product
 sqrtsqrtroot3x
` %height=70px% sqrtsqrtroot3x` spaces are optional, only serve to split strings that should not match
 (:a,b:) and {:(x,y),(u,v):}
` %height=80px% (:a,b:) and {:(x,y),(u,v):}` angle brackets and invisible brackets
 (a,b]={x in RR :
 a < x <= b}
` %height=50px% (a,b]={x in RR : a < x <= b}` grouping brackets don't have to match
 hat(ab) bar(xy) ulA
 vec v dotx ddot y
` %height=50px% hat(ab) bar(xy) ulA vec v dotx ddot y` accents can be used on any expression
 {::}_(\ 92)^238U
` %height=70px% {::}_(\ 92)^238U` prescripts simulated by subsuperscripts
 {(S_(11),...,S_(1n)),
  (vdots,ddots,vdots),
  (S_(m1),...,S_(mn))]
` %height=110px% {(S_(11),...,S_(1n)),(vdots,ddots,vdots),(S_(m1),...,S_(mn))]` each row must have the same number of expressions, and there should be at least two rows