You do know that that X is not in fact an X but a Greek Chi right?
\LaTeX is (unfortunately) unbeatable for mathematical formulae; also see spamegg. Have used it extensively but have always found it to retain regex-like qualities, in the sense of you to an extent relearning the damn syntax anew every time you do anything even halfway involved.