3

I have one align environment, within which I want to have multiple multi-line equations so that their equal signs align. I'm using split to make my equations multi-line. MWE:

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}

\newcommand{\iu}{\mathrm{i}} %imaginary unit
\newcommand{\eu}{\mathrm{e}} %euler number
\newcommand{\dd}[1]{{\mathrm{d}#1}} %derivative

\begin{document}

\begin{align}
\begin{split}
\int_{I_2}p(z)\dd{z}&=\int_0^1 p(R+y\iu)\iu\dd{y}\\
&=\int_0^1\frac{\eu^{2(R+y\iu)}\iu}{\cosh(\pi (R+y\iu))}\dd{y}\\
&=\cdots\\
\end{split}\\
\begin{split}
\therefore\lim_{R\rightarrow\infty}\int_{I_2}p(z)\dd{z}&=\lim_{R\rightarrow\infty}\cdots\\
&=0
\end{split}\label{eqn:q4_i2}
\end{align}

\end{document}

This results in the following output, which is obviously misaligned:

Misaligned equations

It looks like the second split is entirely on the left of all equal signs of the split above it.

1 Answer 1

4

don't use \\ in the last row of split

enter image description here

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}

\newcommand{\iu}{\mathrm{i}} %imaginary unit
\newcommand{\eu}{\mathrm{e}} %euler number
\newcommand{\dd}[1]{{\mathrm{d}#1}} %derivative

\begin{document}

\begin{align}
\begin{split}
\int_{I_2}p(z)\dd{z}&=\int_0^1 p(R+y\iu)\iu\dd{y}\\
&=\int_0^1\frac{\eu^{2(R+y\iu)}\iu}{\cosh(\pi (R+y\iu))}\dd{y}\\
&=\cdots
\end{split}\\
\begin{split}
\therefore\lim_{R\rightarrow\infty}\int_{I_2}p(z)\dd{z}&=\lim_{R\rightarrow\infty}\cdots\\
&=0
\end{split}\label{eqn:q4_i2}
\end{align}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .