Grab our RSS feed

Scarky.com

28th of September 2009

# Mathematical expressions on Scarky

Since some time it is possible to use sophisticated mathematical expressions in Scarky challenges’ content. A very helpful thing not only in mathematical riddles but also in many programming challenges, where possibility of using of equations and formulas is often desirable.

And here is code used to create expressions above:

$\unitlength{.6}\picture(100) {(50,50){\circle(99)} %%head%%(20,55;50,0;2){\fs{+1}\hat\bullet} %%eyes%%(50,40){\bullet} %%nose%%(50,35){\circle(50,25;34)} %%upper lip%%(50,35){\circle(50,45;34)} %%lower lip%%}$

$\Large\varepsilon=\sum_{i=1}^{n-1} \frac1{\Delta x}\int_{x_i}^{x_{i+1}}\left\{\frac1{\Delta x}\big[ (x_{i+1}-x)y_i^\ast+(x-x_i)y_{i+1}^\ast\big]-f(x)\right\}^2dx$

$\LARGE\tilde y=\left\{ {\ddot x\text{ if \vec x odd}\atop\hat{\,\bar x+1}\text{ if even}}\right.$

$\Large A\ =\ \large\left( \begin{array}{c.cccc}&1&2&\cdots&n\\ \hdash1&a_{11}&a_{12}&\cdots&a_{1n}\\ 2&a_{21}&a_{22}&\cdots&a_{2n}\\ \vdots&\vdots&\vdots&\ddots&\vdots\\ n&a_{n1}&a_{n2}&\cdots&a_{nn}\end{array}\right)$

 $\normalsize \left(\large\begin{array}{GC+23} \varepsilon_x\\\varepsilon_y\\\varepsilon_z\\\gamma_{xy}\\ \gamma_{xz}\\\gamma_{yz}\end{array}\right)\ {\Large=} \ \left[\begin{array}{CC} \begin{array}\frac1{E_{\fs{+1}x}} &-\frac{\nu_{xy}}{E_{\fs{+1}x}} &-\frac{\nu_{\fs{+1}xz}}{E_{\fs{+1}x}}\\ -\frac{\nu_{yx}}{E_y}&\frac1{E_{y}}&-\frac{\nu_{yz}}{E_y}\\ -\frac{\nu_{\fs{+1}zx}}{E_{\fs{+1}z}}& -\frac{\nu_{zy}}{E_{\fs{+1}z}} &\frac1{E_{\fs{+1}z}}\end{array} & {\LARGE 0} \\ {\LARGE 0} & \begin{array}\frac1{G_{xy}}&&\\ &\frac1{G_{\fs{+1}xz}}&\\&&\frac1{G_{yz}}\end{array} \end{array}\right] \ \left(\large\begin{array} \sigma_x\\\sigma_y\\\sigma_z\\\tau_{xy}\\\tau_{xz}\\\tau_{yz} \end{array}\right)$

$\Large\hspace{5}\unitlength{1} \picture(175,100){ (50,50){\circle(100)} (1,50){\overbrace{\line(46)}^{4\;\;a}} (52,50){\line(125)} (50,52;115;2){\mid} (52,55){\longleftar[60]} (130,56){\longrightar[35]} (116,58){r} (c85,50;80;2){\bullet} (c85,36){\large-q} (c165,36){\large q} (42,29){\underbrace{\line(32)}_{\small a^2/r\;\;\;}} }$

$\left(\frac1{1-x^2}\right)^2$

Syntax of these mathematical expressions is very similar to TeX (see more on wiki).