How can I center an equation inside an align environment?
A single equation in align
is centered, so with gather
you get both equations centered; otherwise, nest align
inside gather
.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
A single equation in \texttt{align} is centered, so with \texttt{gather}
you get both equations centered:
\begin{gather}
a = b + c
a = b + c \quad a = b + c
\end{gather}
If you have \emph{two} equations to align with each other and
one to be centered, nest \texttt{align} in \texttt{gather}
\begin{gather}
\begin{align}
a &= b + c\\
x &= b + c + d + e
\end{align}\\
a = b + c \quad a = b + c \quad a = b + c
\end{gather}
\end{document}
I suspect you actually want to use a gather
environment.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather}
a = b + c\\
d = e + f \qquad g = h + i
\end{gather}
\end{document}
Your MWE is not clear about the variables you want to align with each other. Please, make the variables unique and say which ones you want to align with each other, so you can get a helpful answer.
For centering, I think align
always centers the equations, but if you wish to control the spacing, you may consider alignat
.
If you you don't care about aligning the second equation, then you need to go with gather
not align
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{alignat}{2}
a &= b + c \quad &\\
x &= y + z & a &= b + c
\end{alignat}
\begin{gather}
a = b + c\\
a = b + c \quad a = b + c
\end{gather}
\end{document}