How to solve this alignment?

I wrote \[a^2+...\] but I couldn't align it in my document. What's the best way to center a long equation like this one?
I use LaTeX
You should try something like this:
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage[left=3cm,right=2cm,top=3cm,bottom=2cm]{geometry}
\begin{document}
\begin{equation}
\begin{split}
a^2 + b^2 + c^2 +d^2\\
e ^2 + f^2 + g^2
\end{split}
\end{equation}
\end{document}
split is not a standard LaTeX environment, after all. Your answer could be improved if it provided a compilable example.
– cfr
Jul 02 '15 at 03:41
There are a few options that you can choose from. You can either use \multiline or \split depending on how you would like to align. I would suggest to use \split in your case. And it will be like the following with the alignment point at $+$.
$\begin{split}
a^2 & +b^2 + \ldots \\
& +l^2 + \ldots
\end{split}$
\split in another math environment like \equation or \align because it is a subsidiary math environment which can not exist independently.
– Zhang Ze
Jul 02 '15 at 05:03
a^2+b^2+...? If not, please provide a more realistic example, i.e., the actual equation you're looking to typeset. – Mico Jul 02 '15 at 05:37