# Align long equations

I want to type the following equations by aligning them through the equal sign, but it seems to be too long:

\begin{align*}\prod_{z^n=-1}(w_1(z)^n+1)
&=& \prod_{l=0}^{l_0}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n+1)\prod_{l=l_0+1}^{l_1}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n+1)\times\prod_{l=l_1+1}^{n-1}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n+1)\\
&=& \prod_{l=0}^{l_0}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n+1)\prod_{l=l_0+1}^{l_1}(w_1(e^{\frac{(2l+1)\pi i}{n}})^{-n}+1)\times\prod_{l=l_1+1}^{n-1}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n+1)\prod_{l=l_0+1}^{l_1}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n)
\end{align*}


Someone can help me? Thanks a lot!

-
Please always post a complete small document not just a fragment, it helps those trying to help and "too long" depends on the current page size, and fonts, which you haven't shown. align unlike eqnarray should just have &= not &=& – David Carlisle Aug 23 '13 at 16:04

Just another way:

\documentclass[preview,border=12pt]{standalone}
\usepackage{mathtools}
\begin{document}
\abovedisplayskip=0pt\relax
\begin{align*}
\prod_{z^n=-1}(w_1(z)^n+1)
&=\!
\begin{aligned}[t]
&\prod_{l=0}^{l_0}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n+1)
\prod_{l=l_0+1}^{l_1}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n+1) \\
&\rule{10cm}{0pt}\mathllap{\times\prod_{l=l_1+1}^{n-1}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n+1)}
\end{aligned} \\
&=\!
\begin{aligned}[t]
&\prod_{l=0}^{l_0}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n+1)
\prod_{l=l_0+1}^{l_1}(w_1(e^{\frac{(2l+1)\pi i}{n}})^{-n}+1) \\
&\rule{10cm}{0pt}\mathllap{\times\prod_{l=l_1+1}^{n-1}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n+1)
\prod_{l=l_0+1}^{l_1}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n)}
\end{aligned}
\end{align*}
\end{document}


Note: \! is needed before aligned because of the issue discussed in Why is there a \, space at the beginning of the “aligned” environment?.

-

You could use the multlined environment from the mathtools package.

\documentclass[11pt]{article}
\usepackage{mathtools}
\begin{document}
\begin{align*}\prod_{z^n=-1}(w_1(z)^n+1)&=
\begin{multlined}[t]
\prod_{l=0}^{l_0}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n+1)
\prod_{l=l_0+1}^{l_1}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n+1) \\
\times\prod_{l=l_1+1}^{n-1}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n+1)
\end{multlined} \\
&=
\begin{multlined}[t]
\prod_{l=0}^{l_0}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n+1)
\prod_{l=l_0+1}^{l_1}(w_1(e^{\frac{(2l+1)\pi i}{n}})^{-n}+1) \\
\times\prod_{l=l_1+1}^{n-1}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n+1)
\prod_{l=l_0+1}^{l_1}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n)
\end{multlined}
\end{align*}
\end{document}


You may want to change the location of the line breaks, depending on your font size, page width, etc.

-
Don't forget the \! before the multlined to cancel the mysterious extra space that you can see after the equals signs (there is a question about this somewhere, which I can't find). – Ryan Reich Aug 23 '13 at 17:55
For readability I don't think the \times items should be indented that excessively. – daleif Aug 23 '13 at 18:14
@RyanReich: The link you want to find has been added to my answer. – kiss my armpit Aug 24 '13 at 2:56

If it is too long you have to split the line in two pieces

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\prod_{z^n=-1}(w_1(z)^n+1) &= \prod_{l=0}^{l_0}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n+1)\prod_{l=l_0+1}^{l_1}(w_1(e^{\frac{(2l+1)\pi i}{n}})^n+1)\times\\

In western trasition the \times symbols are not duplicated, the one ending a line is not used. – daleif Aug 23 '13 at 18:13