## The Wonderful MathJax!

Some time ago I discovered the JavaScript engine MathJax for diplaying mathematics in a web browser, either through $$\mathrm{\LaTeX}$$ or MathML syntax. It looks very promising, so I wanted to give it a try. Now was the opportunity to try it out.

I always searched for a good way to display mathematics on the web. The hack rendering the formulae as png images to include in the page has worked, but the result was not always pretty. MathJax seems to provide a way to render pretty formulae. In the first post on this new blog of mine I will experiment a little, to see what MathJax is capable of.

Let’s first try one of my favourite examples, which I use when I don’t know what else to write.

The solution of the quadratic equation $$ax^2+bx+c=0$$ is given by $x = \frac{-b\pm\sqrt{b^2-4ac}}{2a}.$

Another example is one involving the solution to a differential equation, $$\mathrm dy/\mathrm dx = xy$$. The complete set of solutions to this equation is given by $y = C\,\mathrm e^{\frac12x^2},$

where $$C$$ is an arbitrary constant. The solution was derived using separation of variables: $\int\frac{1}{y}\,\mathrm dy = \int x\,\mathrm dx \iff \ln|y| = \frac12x^2+k \iff y = C\,\mathrm e^{\frac12x^2}.$

Here are two examples where MathJax was used to render mathematical formulae. There will be many more examples in future posts.