# [Tex/LaTex] Large equation goes out of margin, want to centre it?

amsmathhorizontal alignmentmath-mode

I have a large equation

\begin{document}

\begin{gather}
W = \frac{1}{2\mu_0}(\frac{\Psi'^2 \pi^2}{b^2} \sum_{m,n} a_{mn}^2 n^2 (ab/4) + \frac{\Psi'^2 \pi^2}{a^2} \sum_{m,n} a_{mn}^2 m^2 (ab/4) + \Psi'^2ab(\mu^2 + \sum_{m,n} \frac{8a_{mn} \mu^2}{\pi^2 mn} + \frac{a_{mn}^2 \mu^2}{4})) \notag \\[1ex]
W = \frac{\Psi'^2 ab}{2\mu_0}(\mu^2 + \sum_{m,n} [ \frac{a_{mn}^2}{4}(\frac{m^2 \pi^2 }{a^2} + \frac{n^2 \pi^2}{b^2} + \mu^2) + \frac{8a_{mn}\mu^2}{\pi^2 mn}]). \label{eq:energycart}
\end{gather}

\end{document}


On my document settings the first equation JUST goes off the expected margin and as a result is not centred in the middle of the page (the left side stays on the margin, the right side goes off). Is there anyway to centre the equation, even if it goes out of the margins? I don't want to split the equation on to two lines.

Your instinct may be not to insert a line break in the first equation. However, the typographic consequences of not inserting a line break will be severe. For instance, the first equation will completely dominate the second one, for no discernable typographic reason. Moreover, there's only so much material the human eye can take in if it's all posted on a single line; providing a well-chosen line break will almost certainly help the reader's comprehension of what you're trying to state. I would also use large parentheses (using \bigg and \Big).

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
W &= \frac{1}{2\mu_0}\biggl[
\frac{\Psi'^2 \pi^2}{b^2} \sum_{m,n} a_{mn}^2 n^2 (ab/4) + \frac{\Psi'^2 \pi^2}{a^2} \sum_{m,n} a_{mn}^2 m^2 (ab/4) \notag\\
&\qquad+ \Psi'^2ab\biggl(\mu^2 + \sum_{m,n} \frac{8a_{mn} \mu^2}{\pi^2 mn} + \frac{a_{mn}^2 \mu^2}{4}\biggr)\biggr] \notag \\[1ex]
W &= \frac{\Psi'^2 ab}{2\mu_0}\biggl[\mu^2 + \sum_{m,n} \biggl( \frac{a_{mn}^2}{4}\Bigl(\frac{m^2 \pi^2 }{a^2} + \frac{n^2 \pi^2}{b^2} + \mu^2\Bigr) + \frac{8a_{mn}\mu^2}{\pi^2 mn}\biggr)\biggr]. \label{eq:energycart}
\end{align}
\end{document}