I have a long equation in Latex and I need to break it into lines. The multiline environment works fine except the first line is indented in an annoying way.
My equation has a long left-hand side which is a sum of nine terms.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{multline}a^2 X_1 X_2 + ab (X_1Y_2+X_2Y_1) + b^2 Y_1 Y_2 +\\
a^2 X_5 X_6 + ab (X_5Y_6+X_6Y_5) + b^2 Y_5 Y_6 +\\
a^2 X_9 X_{10} + ab (X_9Y_{10}+X_{10}Y_9) + b^2 Y_9 Y_{10} = 0
\end{multline}
\end{document}
It would be nice to break it up into three lines of three terms each, aligned so that terms 1, 4, 7 are placed above each other, and so are 2, 5, 8 and 3, 6, 9. The RHS is only 0, so it can be left (um, right I mean...) on the last line. What I get instead is the first line indented - shifted towards the right - the way it is often done in paragraphs of text. The other two lines are aligned as I wanted.
I have tried a number of align commands, but to no avail.