Short of constructing the LaTeX for the equation by hand, the easiest method is to use a program called Maple, which can display your equation visually. Once you're satisfied with your equation, Maple can generate the LaTeX code for you.
To run Maple, type:
add maple ; maple &
That will bring up a window. Type your equation in, just like in a computer program, and end the line with a semicolon (;). See if the equation that appears is what you'd really like. If it is, then type
You can also type: