[Tex/LaTex] Large formula in align


I have a large formula in align:

log \mathcal{L}(\alpha,\beta,\mu,\delta|  l_1,...,l_n)&=\\\sum_{i=1}^n  \left( log \left(\frac{\sqrt{\alpha^2-\beta^2}}{2\alpha \delta K_1 (\delta\sqrt{\alpha^2-\beta^2})} exp\left(-\alpha\sqrt{\delta^2+(l-\mu)^2}+\beta(l-\mu)\right)\right) \right) 

Currently, this looks like


But I want to have the first equation, the logL a bit pushed to the left. Now it is on the right side, what I don't like. I tried to insert a & before the exp to align it on that point, but this does not work.

    log \mathcal{L}(\alpha,\beta,\mu,\delta|  l_1,...,l_n)&=\\\sum_{i=1}^n  \left( log \left(\frac{\sqrt{\alpha^2-\beta^2}}{2\alpha \delta K_1 (\delta\sqrt{\alpha^2-\beta^2})} &exp\left(-\alpha\sqrt{\delta^2+(l-\mu)^2}+\beta(l-\mu)\right)\right) \right) 

How can I get the first part of the equation aligned in the center?

Best Answer

To obtain a centred "first part" and only have two parts, I assume you just want the whole things centred. For this you just have to gather* the contents:

enter image description here

\usepackage{amsmath}% http://ctan.org/pkg/amsmath
  \log \mathcal{L}(\alpha,\beta,\mu,\delta|  l_1,...,l_n) = \\
  \sum_{i=1}^n  \left( \log \left(\frac{\sqrt{\alpha^2-\beta^2}}{2\alpha \delta K_1 (\delta\sqrt{\alpha^2-\beta^2})} \exp\left(-\alpha\sqrt{\delta^2+(l-\mu)^2}+\beta(l-\mu)\right)\right) \right)

Note the use of \log as an operator for logarithm.