[Tex/LaTex] Change the equation number in alignat

amsmathformattingmath-mode

I have the following equations with-in alignat environment

$\begin{alignat}{4}
&p^0\colon\od{u_0(x)}{x} = 0 \quad &\text{with} \quad u_0(0) = 1, \\
&p^1\colon \od{u_1(x)}{x} -u_{{0}} \left( x \right) =0 \quad &\text{with} \quad u_1(0) = 0, \\
&p^2\colon \od{u_2(x)}{x} -u_{{1}} \left( x \right) =0 \quad &\text{with} \quad u_2(0) = 0, \\
&p^3\colon \od{u_3(x)}{x} -u_{{2}} \left( x \right) =0 \quad &\text{with} \quad u_3(0) = 0. \\
\end{alignat}$

In my document these equations are numbered as (1), (2), (3) and so-on.

How can I number these equations as (1.1), (1.2), (1.3) without affecting other equations that will come after these equaitons?

Thank you for helping me.

Best Answer

You want to use the subequationsenvironment, as follows:

\documentclass{minimal}
\usepackage{amsmath}
\begin{document}
    \begin{alignat}{2}
        x& = y_1-y_2+y_3-y_5+y_8-\dots &\quad& \text{by C}\\
        & = y’\circ y^* && \text{by D}\\
        & = y(0) y’ && \text {by Axiom 1.}
    \end{alignat}

    \begin{subequations}
        \renewcommand{\theequation}{\theparentequation.\arabic{equation}} 
        \begin{alignat}{4}
            & p^0\colon \od{u_0(x)}{x} = 0 \quad &\text{with} \quad u_0(0) = 1, \\
            & p^1\colon \od{u_1(x)}{x} -u_{{0}} \left( x \right) =0 \quad &\text{with} \quad u_1(0) = 0, \\
            & p^2\colon \od{u_2(x)}{x} -u_{{1}} \left( x \right) =0 \quad &\text{with} \quad u_2(0) = 0, \\
            & p^3\colon \od{u_3(x)}{x} -u_{{2}} \left( x \right) =0 \quad &\text{with} \quad u_3(0) = 0.
    \end{alignat}
    \end{subequations}

    \begin{alignat}{2}
        x& = y_1-y_2+y_3-y_5+y_8-\dots &\quad& \text{by C}\\
        & = y’\circ y^* && \text{by D}\\
        & = y(0) y’ && \text {by Axiom 1.}
    \end{alignat}
\end{document}

which produces the following output: enter image description here