Monday, September 27, 2010

Math equation input 2


i=1ni3=(n(n+1)2)2



\begin{gra ph}width=400; height=300; xmin=-6.3; xmax=6.3;
xscl=1; plot(3cos(x^2)) \end{graph}


Displacement: s=ut+12at2
Trigonometry: tan2x+1=sec2x
Summation: π=4i=1n(-1)k+12k-1



f(x)=n=0f(n)(a)n!(x-a)n

f(x)=n=0fn(a)n!(x-a)n

Matrices

AB=(8451)(-851-15)=(8×-8+4×18×5+4×-155×-8+1×15×5+1×-15)

=(-60-20-3910)
Quadratic Equation

If ax2+bx+c=0, then

x=-b±b2-4ac2a
Fractions on Fractions

6x+232x+4=6x+2 ÷ 32x+4=6x+2×2(x+2)3=4
Roots

x3≠3x
Another matrix example

This next example was one I tried to create using WPMathPub but had trouble because it wasn’t very intuitive (see WPMathPub article).

[53cos26701-2sin5]

Now, that was much easier compared to WPMathPub! This is the code I used for the above ASCIIMathML:

[(5, 3, cos 2), (6, 7, 0), (1,-2, sin 5)]

In ASCIIMathML, it can be rendered easily like this:

3∫x2 dx+5∫x dx+9∫ dx


This is some example code:

\begin{gra ph}width=400; height=300; xmin=-6.3; xmax=6.3;
xscl=1; plot(3cos(x^2)) \end{graph}

Here is the resulting graph. Move your mouse cursor over the graph – it tells you the x- and y-coordinates of the cursor position.

1 2 3 4 5 6 -1 -2 -3 -4 -5 -6 1 2 3 4 -1 -2 -3 -4
Update
width=400; height=300; xmin=-6.3; xmax=6.3;xscl=1; axes(); plot(3cos(x^2))

I’ll do a separate article soon about the graphing capabilities of ASCIIMathML.








setBorder(0)
initPicture(-5,5)
axes(2, 1, "labels", 1)

stroke = "blue"
plot("sin(x)")

stroke = "red"
plot(["5*t*cos(pi*t)", "5*t*sin(pi*t)"],0,1)

stroke = "green"
strokewidth = "2"
marker = "arrowdot"
line([0,1], [pi/2,1])
dot([pi,0], "open", cpi)

text([-2.5,-2.5], "ASCIIsvg Example")



Type this See that Comment
x2+y1+z1234 x2+y1+z1234 subscripts as in TeX, but numbers are treated as a unit
sin-1(x) sin-1(x) function names are treated as constants
ddxf(x)=limh0f(x+h)-f(x)h ddxf(x)=limh→0f(x+h)-f(x)h complex subscripts are bracketed, displayed under lim
ddxf(x)=limh0f(x+h)-f(x)h ddxf(x)=limh→0f(x+h)-f(x)h standard LaTeX notation is an alternative
f(x)=n=0f(n)(a)n!(x-a)n f(x)=∑n=0∞f(n)(a)n!(x-a)n f^((n))(a) must be bracketed, else the numerator is only a
f(x)=n=0f(n)(a)n!(x-a)n f(x)=∑n=0∞f(n)(a)n!(x-a)n standard LaTeX produces the same result
01f(x)dx ∫01f(x)dx subscripts must come before superscripts
[abcd](nk) [abcd](nk) matrices and column vectors are simple to type
xx={1ifx0undefinedifx=0 xx={1ifx≠0undefinedifx=0 piecewise defined function are based on matrix notation
a/b a/b use // for inline fractions
abcd abcd with brackets, multiple fraction work as expected
ab/cd ab/cd without brackets the parser chooses this particular expression
(ab)c (a⋅b)c only one level of brackets is removed; * gives standard product
x3 x3 spaces are optional, only serve to split strings that should not match
a,bandxyuv 〈a,b〉andxyuv angle brackets and invisible brackets
(a,b]={xa<xb} (a,b]={x∈ℝ|a grouping brackets don't have to match
abc-123.45-1.1 abc-123.45-1.1 non-tokens are split into single characters,
but decimal numbers are parsed with possible sign
ab^xy¯A̲vx.y.. ab^xy¯A̲v→x.y.. accents can be used on any expression (work well in IE)
AB3..ℬ..AB.AB AB3..ℬ..AB.AB font commands; can use any brackets around argument
=defor=Δ (or :=) =defor=Δ(or:=) symbols can be stacked
 92238U  92238U prescripts simulated by subsuperscripts

No comments: