2

Is there a better way to put points between a set of equations as follow:

\begin{equation}
\begin{split}
&y_1=y_0+hf_0\\
&y_2=y_0+2hf_1\\
.\\
.\\
.\\
&y_n=y_{n-1}+2hf_{n-1}
\end{split}
\label{eq: stoer method 2}
\end{equation}
Jesse
  • 29,686
Rebecca
  • 1,189
  • A quick comment, not related directly to your question but to the use of the & alignment points in a split environment: It's preferable to align the rows on a common element such as = instead of on the first character of each row. While the widths of y_1, y_2, and y_n happen to be fairly similar, the appearance of the system of equations risks becoming marred if you also have entries such as y_[m-1} to the left of the = symbol. – Mico Jun 24 '14 at 08:57

3 Answers3

7

The mathtools package offers the macros \vdotswithin and \shortvdotswithin for just this purpose.

enter image description here

\documentclass{article}
\usepackage{mathtools}
\usepackage{lmodern}
\setlength\textwidth{3in} % just for this example
\begin{document}
\begin{equation}
\begin{split}
y_1&=y_0+hf_0\\
y_2&=y_0+2hf_1\\
&\vdotswithin{=}\\  %% note the "\\" row terminator
y_m&=y_{m-1}+2hf_{m-1}\\
\shortvdotswithin{=}  %% note: no row terminator
y_n&=y_{n-1}+2hf_{n-1}
\end{split}
\label{eq: stoer method 2}
\end{equation}
\end{document}
Mico
  • 506,678
4

Try

\begin{equation}
\begin{split}
&y_1=y_0+hf_0\\
&y_2=y_0+2hf_1\\
\vdots\\    
&y_n=y_{n-1}+2hf_{n-1}
\end{split}
\label{eq: stoer method 2}
\end{equation}

Related question about the alignment of the vertical dots that you might want to look into: Centering \vdots in a system of many equations

1
\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
\begin{split}
&y_1=y_0+hf_0\\
&y_2=y_0+2hf_1\\
&\vdots\\
&y_n=y_{n-1}+2hf_{n-1}
\end{split}
\label{eq: stoer method 2}
\end{equation}

But rather

\begin{equation}
\begin{array}{l}
y_1=y_0+hf_0\\
y_2=y_0+2hf_1\\
\multicolumn{1}{c}{\vdots}\\
y_n=y_{n-1}+2hf_{n-1}
\end{array}
\end{equation}

\end{document}

enter image description here

Certainly, the position of vertical dots can be changed.