2

How can I right align the x_0 in the image below and how can I right align the \vdots which is supposed to be just below the x_0 in the image?

how cab I right align the \vdots which is supposed to be just below the x_0 in the image

What I've tried so far is:

\documentclass[a4paper, openany, oneside, 11pt]{report} 
\begin{document} 
\begin{eqnarray*} 
x_\circ(t) &=& x_\circ \\ 
x_1(t)&=& x_\circ + \int_{t_\circ}^{t} f(s, x_\circ(s)) \, ds \\ 
x_2(t)&=& x_\circ + \int_{t_\circ}^{t} f(s, x_1(s)) \, ds \\ 
\vdots \hspace*{0.5cm} \hspace*{-.01cm} & \hspace*{.2cm} \hspace*{-0.001em} \vdots & \hspace*{2.0cm} \vdots \\ 
x_n(t) &=& x_\circ + \int_{t_\circ}^{t} f(s, x_{n-1}(s)) \, ds 
\end{eqnarray*} 
\end{document}
8
  • 2
    Please tell us what you've tried so far. Incidentally, should that be x_o or x_0? Why intuition says the latter, but the screenshot you posted says the former.
    – Mico
    Commented May 15, 2023 at 9:40
  • \documentclass[a4paper, openany, oneside, 11pt]{report} \begin{document} \begin{eqnarray*} x_\circ(t) &=& x_\circ \\ x_1(t)&=& x_\circ + \int_{t_\circ}^{t} f(s, x_\circ(s)) \, ds \\ x_2(t)&=& x_\circ + \int_{t_\circ}^{t} f(s, x_1(s)) \, ds \\ \vdots \hspace*{0.5cm} \hspace*{-.01cm} & \hspace*{.2cm} \hspace*{-0.001em} \vdots & \hspace*{2.0cm} \vdots \\ x_n(t) &=& x_\circ + \int_{t_\circ}^{t} f(s, x_{n-1}(s)) \, ds \end{eqnarray*} \end{document}
    – Memristor
    Commented May 15, 2023 at 9:52
  • 1
    I've taken the liberty of copying the material in your comment into the main body of the query.
    – Mico
    Commented May 15, 2023 at 9:56
  • 1
    surely it should be0 not \circ but what do you mean by "right align" here? do you want the x_0 on the first row over on the right above ds ?? Commented May 15, 2023 at 10:02
  • 1
    I would then delete the first part of this sentence, which is very confusing: How can I right align the x_0 in the image below and how can I right align the \vdots Commented May 15, 2023 at 10:13

3 Answers 3

6

Never ever use eqnarray.

Here I use alignat and \vdotswithin of mathtools.

I replaced all the \circ because I can't stand them, sorry.

\documentclass[a4paper, openany, oneside, 11pt]{report}
\usepackage{mathtools}

\begin{document}

\begin{alignat*}{2} 
x_0(t) &= x_0 \\
x_1(t) &= x_0 &&+ \int_{t_0}^{t} f(s, x_0(s)) \, ds \\
x_2(t) &= x_0 &&+ \int_{t_0}^{t} f(s, x_1(s)) \, ds \\
\vdotswithin{x_n(t)} & \mathrel{\phantom{=}}\vdotswithin{x_0}
&& \mathbin{\phantom{+}} \vdotswithin{\int_{t_0}^{t} f(s, x_1(s)) \, ds} \\
x_n(t) &= x_0 &&+ \int_{t_0}^{t} f(s, x_{n-1}(s)) \, ds
\end{alignat*}

\end{document}

enter image description here

1
  • Perfect. I appreciate.
    – Memristor
    Commented May 15, 2023 at 11:15
5
\documentclass[a4paper, openany, oneside, 11pt]{report}
\usepackage{amsmath}
\begin{document} 
\begin{align*} 
x_0(t) & =  x_0 \\ 
x_1(t)&= x_0 + \int_{t_0}^{t} f(s, x_0(s)) \, ds \\ 
x_2(t)&= x_0 + \int_{t_0}^{t} f(s, x_1(s)) \, ds \\ 
\vdots  &\mkern30mu \vdots \mkern60mu \vdots\\ 
x_n(t) & = x_0 + \int_{t_0}^{t} f(s, x_{n-1}(s)) \, ds 
\end{align*} 
\end{document}

enter image description here

5

The mathtools package, which is a superset of the amsmath package, provides a macro called \vdotswithin; it may be just what you need.

enter image description here

That said, I can't say I understand why you want to center the third set of \vdots on x_0. Why not center it on the + symbols? You could do so by replacing \vdotswithin{x_0} with \hphantom{x_0} \vdotswithin{+} in the code shown below.

\documentclass[a4paper, 11pt]{report}
\usepackage{mathtools}
\begin{document}

\begin{align*}
x_0(t) &= x_0 \\
x_1(t) &= x_0 + \int_{t_0}^{t} f(s, x_0(s)) \, ds \\
x_2(t) &= x_0 + \int_{t_0}^{t} f(s, x_1(s)) \, ds \\
\vdotswithin{x_2(t)} 
       &\vdotswithin{=} \vdotswithin{x_0} \\
x_n(t) &= x_0 + \int_{t_0}^{t} f(s, x_{n-1}(s)) \, ds
\end{align*}

\end{document}
1
  • It has to be on x_0 since we want to generalize for nth- term.
    – Memristor
    Commented May 15, 2023 at 10:57

You must log in to answer this question.

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