[Tex/LaTex] Multiline equation with specific indentation style

amsmathequationshorizontal alignmentmath-modespacing

I have a multiline equation of the following type:

\begin{equation}
\begin{split}
f(x,y) & =a\\
& =b\\
& +c\\
& +d.
\end{split}
\end{equation}

But the output I would like to have is as follows:

 f(x,y) = a
        = b
          + c
          + d

That is, the lines continuing the sum shall have additional indentation, that is, the +'s shall not be directly below the "=". Whatever I tried didn't work as intended. Do you have any suggestions as of how to accomplish this?

Best Answer

A simple solution with \phantom command:

\begin{equation}
\begin{split}
f(x,y) & =a\\
       & =b\\
       &\phantom{=}\, +c\\
       &\phantom{=}\, +d.
\end{split}
\end{equation}

gives:

enter image description here

This is the better looking alignment, in my opinion. Anyway, you can adjust it with spacing commands. For example, the following code

\begin{equation}
\begin{split}
f(x,y) & =a\\
       & =b\\
       &\phantom{=}\, +c\\
       &\quad +d\\
       &\phantom{=}\; +e.
\end{split}
\end{equation}

produces:

enter image description here

As you can see, a little spacing is added in consecutive lines.