Q:

Problem with align command

I faced a weird situation when using "Align" command. Here is what I write
Since $ l $ is fixed, $ \sum_{k=0}^{l-1} k^i \cos (2k \theta) $ and $ \sum_{k=0}^{l-1} k^i \sin (2k \theta) $ are bounded for $ i=0,1,2 $, using \textbf{Cor. 1.1.1} we have
\begin{align*}
    B_W^2 &:= \mathrm{Var}(W'_n ( \theta))\\
    &= \mathrm{Var} (- \sum_{j=0}^{m-1} \sum_{k=0}^{l-1} a_{2jl+k} ( (2j+1/2)l+k )  \sin ((2j+1/2)l+k) \theta ) \\
    &= \sum_j \sum_k \left( (4j^2 + 2j +1/4)l^2 + (4j+1)lk +k^2 \right) \frac{1 - \cos ((4j+1)l + 2k) \theta}{2} \\
    &= \frac{1}{2} \sum_j \left( l^3 (4j^2 + 2j +1/4) + \frac{l^3 -l^2 }{2}(4j+1) +  \frac{2l^3 - 3l^2 + l }{6} \right) \\
    &- \frac{1}{2} \sum_j \sum_k \left( (4j^2 + 2j +1/4)l^2 + (4j+1)lk +k^2 \right) \cos ((4j+1)l + 2k) \theta \\
    &= \frac{2l^3m^3}{3} + \mathcal{O}(m^2) - \frac{1}{2} \sum_j \sum_k \left( (4j^2 + 2j +1/4)l^2 + (4j+1)lk +k^2 \right) \cos ((4j+1)l + 2k) \theta \\
    &= \frac{2l^3m^3}{3} + \mathcal{O}(m^2) - \frac{1}{2} \sum_j \sum_k \left( (4j^2 + 2j +1/4)l^2 + (4j+1)lk +k^2 \right) \cos (4j+1)l \theta \cos (2k) \theta \\
    &+ \frac{1}{2} \sum_j \sum_k \left( (4j^2 + 2j +1/4)l^2 + (4j+1)lk +k^2 \right) \sin (4j+1)l \theta \sin (2k) \theta \\
    &= \frac{n^3}{12} + \mathcal{O}(n^2) - \frac{l^2}{2} (4P_2 (l \theta ) + 2P_1 (l \theta ) + 1/4) \sum_k \cos (2k) \theta \\
    &+ \frac{l^2}{2} (4Q_2 (l \theta ) + 2Q_1 (l \theta ) + 1/4) \sum_k \sin (2k) \theta - \frac{l}{2} (4P_1 (l \theta ) + 1) \sum_k k \cos (2k) \theta \\
    &+ \frac{l}{2} (4Q_1 (l \theta ) + 1) \sum_k k \sin (2k) \theta - \frac{1}{2} P_0 (l \theta ) \sum_k k^2 \cos (2k) \theta + \frac{1}{2} Q_0 (l \theta ) \sum_k k^2 \sin (2k) \theta \\
    &= \frac{n^3}{12} + \mathcal{O}(n^2)+ \mathcal{O}(\frac{m^2}{\epsilon}) = \frac{n^3}{12} + \mathcal{O}(n^2).
\end{align*}

but there is huge gap between the last sentence and the next line as you see in the picture. What shall I do? 
P.S. When I add \newpage, everything is back to normal. I thing the problem is with margins or something like that.

A:

This is because of the texts and floats around the equation, not the equation itself. What LaTeX is doing is fill the page by stretching the space between the text and the equation. Check this:

Now remove some text from the paragraph after the equation:

LaTeX has increased the white space. Why? Because it is trying to avoid line breaking so it tries to fill the column with whole paragraphs.
Now remove more text:

As you can see, removing more text caused the section of the next column to be written after the paragraph. Three lines aren't really that bad in terms of their appearance so latex accepts that. Otherwise, LaTeX will push the conclusions section to the next column and try to fill the first column by increasing the white space.
The solution here is to work on what is around the equation, including floats, not only the text itself. Also, try tuning these parameters in the preamble.
\predisplaypenalty=1000: penalty for breaking before an equation (default: 1000)
\postdisplaypenalty=0: penalty for breaking after an equation (default: 0)

