November 25, 2011

Just Testing Mathematics Setting with MathJax

I decided it would be a good idea to test out the instructions from my last post, where I explain how to put mathematics in your blog. This is fast becoming addictive, so I am going to have to sit on my hands for a while after this post.

A Cross Product Formula

\[\mathbf{V}_1 \times \mathbf{V}_2 =  \begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\frac{\partial X}{\partial u} &  \frac{\partial Y}{\partial u} & 0 \\
\frac{\partial X}{\partial v} &  \frac{\partial Y}{\partial v} & 0
\end{vmatrix}  \]
That seemed to work, but I did notice a couple of glitches. So here are a few hints.
  1. After you paste in the HTML, consider typing a couple of characters ("xx" or similar) as a placemarker so that you can be sure where your blog text is being inserted in relation to the script calls (the scripts should be right at the start). It's usually a good idea to lay down a marker like this when switching between “compose” and “HTML” editing modes.
  2. If you want to put a formula in-line just write it with a dollar sign before and after. So
    and therefore $x^2$ cannot be zero
    will come out as:
    and therefore $x^2$ cannot be zero
  3. When TeX inputs are copied from the web, to avoid formatting confusion it is often better to either paste into the HTML edit mode, or paste into a text window and re-copy to lose the formatting before pasting into the compose edit mode.
  4. If at first you don't succeed, look for help among the TeX community. It is large, and many of its members are professional educators.
Just to test the application a little more throughly here are a few random examples lifted from the web. Did I mention I love the web?

Simple equations
\sum_{i=0}^{i=10} \phi_i(3)

\int_{0}^{10} \phi_i(x)dx = 3

z \left( 1 \ +\ \sqrt{\omega_{i+1} + \zeta -\frac{x+1}{\Theta +1} y + 1}
\ \right)
\ \ \ =\ \ \ 1

Multi-line equation

(a+b)^3 &= (a+b)^2(a+b)\\
&=(a^3+2a^2b+ab^2) + (a^2b+2ab^2+b^3)\\

The derivative is defined as

\frac{dy}{dx} = \lim_{\Delta x \to 0} \frac{\Delta y}
{\Delta x}
f(x) \to y \quad \mbox{as} \quad x \to
f(x) \mathop {\longrightarrow}
\limits_{x \to x_0} y

Math with font-size set to 250%
g\frac{d^2u}{dx^2} + L\sin u = 0

While my testing can hardly be called exhaustive, I think I have provided as good a start as anyone could expect in the world of mathematical blogging. Good luck with yours!

No comments: