Software to render formulas to ASCII art
You can use this Web Application: Diagon
- No need to download anything
- Supports ASCII and Unicode.
- Supports other kind of ASCII art diagrams.
Examples:
sum(i^2, i=0, n) = n^3/2+n^2/2+n/6
output (Unicode)
n
___ 3 2
╲ 2 n n n
╱ i = ── + ── + ─
‾‾‾ 2 2 6
i = 0
output (ASCII):
n
=== 3 2
\ 2 n n n
/ i = -- + -- + -
=== 2 2 6
i = 0
mult(i^2, i=1, n) = (mult(i, i=1, n))^2
2
n ⎛ n ⎞
━┳┳━ 2 ⎜━┳┳━ ⎟
┃┃ i = ⎜ ┃┃ i⎟
i = 1 ⎝i = 1 ⎠
sqrt(1 + sqrt(1 + x/2))
_____________
╱ _____
╱ ╱ x
╱ ╱ 1 + ─
╲╱ 1 + ╲╱ 2
[1,2; 3,4] * [x; y] = [1*x+2*y; 3*x+4*y]
⎛1 2⎞ ⎛x⎞ ⎛1 ⋅ x + 2 ⋅ y⎞
⎜ ⎟ ⋅ ⎜ ⎟ = ⎜ ⎟
⎝3 4⎠ ⎝y⎠ ⎝3 ⋅ x + 4 ⋅ y⎠
int(x^2/2 * dx ,0 ,1) = n^3/6
1
⌠ 2 3
⎮ x n
⎮ ── ⋅ dx = ──
⌡ 2 6
0
phi = 1 + 1/(1+1/(1+1/(1+1/(1+...))))
1
φ = 1 + ───────────────────
1
1 + ───────────────
1
1 + ───────────
1
1 + ───────
1 + ...
Disclaimer: I am the author.
It is an open source project under the MIT license.
I've edited a bit tex2mail to use Unicode for output. Here are the results:
┌──────┐
┌─┐ 3 4 │ 2 6 4
⌠ \│a x ┌─┐ 3 x \│1 - x + x - 3 x
⎮ ───────── dx = \│a ──────────────────────────────────
⌡ ┌──────┐ ┌──────┐
│ 2 ⎛ 2 ⎞ │ 2 2
\│1 - x ⎝ 3 x - 12 ⎠ \│1 - x - 9x + 12
⎡ 1 ⎤n
lim ⎢ 1 + ─ ⎥ = e
n --> oo ⎣ n ⎦
n n
⌠1 x ──┐oo ⌠1 x (log x)
⎮ x dx = > ⎮ ────────── dx.
⌡0 ──┘n=0 ⌡0 n!
┬─┬oo ⎛ 1 ⎞ ⎛ ┬─┬oo 1 ⎞-1 1 1 6
│ │ ⎜ 1-── ⎟ = ⎜ │ │ ───── ⎟ = ───────────────── = ──── = ── ≈ 61%
┴ ┴p ⎜ 2 ⎟ ⎜ ┴ ┴p -2 ⎟ 1 1 ζ(2) 2
⎝ p ⎠ ⎝ 1-p ⎠ 1 + ── + ── + ∙∙∙ π
2 2
2 3
The look depends hugely on the fonts and the browser. If you are interested in the script here is the link.
At this site one can get following:
Input:
int(int(int(psi^2, x = -inf .. inf), y = -inf .. inf), z = -inf .. inf) = 1
Output:
oo oo oo
/ / /
| | | 2
| | | psi dx dy dz = 1
| | |
/ / /
-oo -oo -oo
Input:
sqrt(e) = 1+1/(1+1/(1+1/(1+1/(5+1/(1+1/(1+1/(9+1/(1+1/(1+...)))))))))
Output:
_ 1
\/e = 1 + ---------------------------------------
1
1 + -----------------------------------
1
1 + -------------------------------
1
1 + ---------------------------
1
5 + -----------------------
1
1 + -------------------
1
1 + ---------------
1
9 + -----------
1
1 + -------
1 + ...
Input:
e^x = 1 + x + x^2/2! + x^3/3! + x^4/4! + ... = 1 + sum(x^n/n!, n = 1 .. inf)
Output:
oo
2 3 4 ===== n
x x x x \ x
e = 1 + x + -- + -- + -- + ... = 1 + > --
2! 3! 4! / n!
=====
n = 1
Input:
(1/4)pisqrt(2) = sum((-1)^(k+1)/(4*k + 1) + (-1)^(k+1)/(4*k - 3), k = 1 .. inf) = 1 + 1/3 - 1/5 - 1/7 + 1/9 + 1/11 - ...
Output:
oo
===== / k + 1 k + 1\
1 __ _ \ |(-1) (-1) | 1 1 1 1 1
- || \/2 = > |--------- + ---------| = 1 + - - - - - + - + -- - ...
4 / \ 4 k + 1 4 k - 3 / 3 5 7 9 11
=====
k = 1
Input:
sin(a)/a = cos(a/2) * cos(a/4) * cos(a/8) * cos(a/16) * ... = prod(cos(a/2^n), n = 1 .. inf)
Output:
oo
=====
sin a a a a a | | a
----- = cos - cos - cos - cos -- ... = | | cos --
a 2 4 8 16 | | n
| | 2
n = 1
Input:
lim(1/x^2 - (cos(x)/x)^2, x -> inf) = 1
Output:
/ 2\
| 1 /cos x\ |
lim |-- - |-----| | = 1
| 2 \ x / |
x -> oo \x /
Finally,
$$\int \frac{e^{\sqrt x}}{x^2} \, dx$$
is represented as
Input:
int(e^sqrt(x)/x^2 , x)
Output:
/
| _
| \/x
| e
| ---- dx
| 2
| x
|
/