1\documentclass{article} 2\usepackage{a4wide} 3\usepackage{amsmath} 4\usepackage{ifthen} 5\usepackage{calc} 6 7\title{Test de primitives amstex} 8\date{} 9\numberwithin{equation}{section} 10\renewcommand{\theequation}{\thesection.\alph{equation}} 11 12\begin{document} 13\maketitle 14 15\part{Some tests} 16\section{Matrices} 17\section*{Toutes les r\'ef\'erences} 18Les num\'eros sont~: 19 20\begin{tabular}{*{5}{|c}|}\hline 21\ref{bigmat} & \ref{dessus} & \ref{dessous} & \ref{t_2_formula}\\ \hline 22\end{tabular} 23 24\subsection{Simple} 25\begin{gather} 26\begin{matrix} 1 & 0\\ 0 & 1\end{matrix} 27\quad 28\begin{pmatrix} 1 & 0\\ 0 & 1\end{pmatrix} 29\quad 30\begin{Vmatrix} 1 & 0\\ 0 & 1\\ 1 & 2\end{Vmatrix} 31\end{gather} 32 33\subsection{Compliqu\'e} 34\setcounter{MaxMatrixCols}{20} 35\newcounter{x} 36\newcommand{\row}[1]{% 37\hdotsfor{#1} & 38\setcounter{x}{#1}\addtocounter{x}{1}\thex 39\setcounter{x}{-\value{x}}\addtocounter{x}{20} & 40\hdotsfor{\value{x}}} 41\begin{equation} 42\begin{pmatrix} 431 & \hdotsfor{19}\\ 44\row{1}\\ 45\row{2}\\ 46\row{3}\\ 47\row{4}\\ 48\row{5}\\ 49\row{6}\\ 50\row{7}\\ 51\row{8}\\ 52\row{9}\\ 53\row{10}\\ 54\row{11}\\ 55\row{12}\\ 56\row{13}\\ 57\row{14}\\ 58\row{15}\\ 59\row{16}\\ 60\row{17}\\ 61\row{18}\\ 62\hdotsfor{19} & 20 63\end{pmatrix}\label{bigmat} 64\end{equation} 65 66\section{Environement \texttt{cases}} 67To summarize, we obtain the following exact representation for the 68inverse of~$x^2e^x+1$: 69\[\begin{cases} 70Y(x) = y(\log x),\quad&\text{$y_{\phantom{0}}$ inverse of~$2\log 71x+x+\log(1+e^{-x}/x^2)$},\\ 72y[x+\log(1+y_0^{-2}(x)e^{-y_0(x)})] = y_0(x),\quad&\text{$y_0$ 73inverse of~$x+2\log x$,}\\ 74y_0(x) = y_1(\log x),\quad&\text{$y_1$ inverse of~$\log x+\log(1+2\log x/x)$},\\ 75y_1(x) = \exp(y_2(x)),\quad&\text{$y_2$ inverse of~$x+\log(1+2xe^{-x})$},\\ 76y_2[x+\log(1+2y_3(x)e^{-y_3(x)})] = y_3(x),&\text{$y_3$ inverse 77of~$x$.} 78 \end{cases} 79\] 80 81\section{Test d'alignement} 82Now the $\phi_i$s are very easy to compute: 83\begin{align*} 84\phi_1& = y_0 = 1/t_2,\\ 85\phi_2& = \phi_1(y_0(x+g))-\phi_1 = {t_3t_2^2\over(1+2t_2)} 86-{1+4t_2+2t_2^2\over2(1+2t_2)^3}t_2^4t_3^2+O(t_3^3),\\ 87\phi_3& = \phi_2(y_0(x+g))-\phi_2 = -{1+4t_2+2t_2^2\over(1+2t_2)^3}t_2^4t_3^2+O(t_3^3), 88\end{align*} 89 90A similar treatment applies to~(\ref{bigmat}), and leads to 91\begin{alignat*}{5} 92x+\log(1+2xe^{-x})& = 1/t_1(y_3(x+g))&& = x+2xe^{-x}-2x^2e^{-2x}+O(x^3e^{-3x}),\\ 93\exp[-x+\log(1+2xe^{-x})]& = t_2(y_3(x+g))&& = e^{-x}-2xe^{-2x}+4x^2e^{-3x}+O(x^3e^{-4x}). 94\end{alignat*} 95 96\subsection{\texttt{gather}, \texttt{multline}} 97or one of the following (successive) refinements: 98\begin{gather}\label{dessus} 99\exp(e^U)\left[1-\frac{2e^{-U^{1/2}}}{U^{1/2}+4} 100+\frac{2e^{-2U^{1/2}}}{(U^{1/2}+4)^2} 101-\frac{4}{3}\frac{e^{-3U^{1/2}}}{(U^{1/2}+4)^3}+O(e^{-4U^{1/2}})\right],\\ 102\exp(e^U)\exp\left[-\frac{2e^{-U^{1/2}}}{U^{1/2}+4}\right]\left[1+ 103\frac{8-2U^{-1/2}-U^{-1}+U^{-3/2}}{(4+U^{-1/2})^3} 104e^{-U-2U^{1/2}}+O(e^{-2U})\right],\label{dessous} 105\end{gather} 106 107Cette \'equation a le num\'ero~\ref{t_2_formula}, celles d'au dessus les 108num\'ero~\ref{dessus} et~\ref{dessous}. 109\begin{multline} \label{t_2_formula} 1101/t_2(y_0(x+g)) = y_0(x+\log(1+y_0^{-2}e^{-y_0}))\\ 111 = y_0+{e^{-y_0}\over y_0^2(1+2/y_0)} 112-{1+4/y_0+2/y_0^2\over 2y_0^4(1+2/y_0)^3}e^{-2y_0}+O(e^{-3y_0}). 113\end{multline} 114 115\part{Other tests} 116 117\section{Z\'ero} 118 119\begin{equation} 120x^2+y^2 = z^2\label{un:un} 121\end{equation} 122\begin{equation*} 123x^2+y^2 = z^2 124\end{equation*} 125\begin{equation} 126x^2+y^2 = z^2\label{un:deux} 127\end{equation} 128\begin{equation} 129x^2+y^2 = z^2\notag 130\end{equation} 131\begin{equation*} 132\tag{oups}x^2+y^2 = z^2\label{oups} 133\end{equation*} 134Au desus \ref{un:un}, \ref{un:deux} et \ref{oups}. 135Apr\`es 136\theequation 137 138\section{Deux} 139\begin{gather} 140x^2+y^2 = z^2\\ 141x^3+y^3 = z^3\\ 142x^4+y^4 = z^4\\ 143x^5+y^5 = z^5\\ 144x^6+y^6 = z^6\\ 145x^7+y^7 = z^7 146\end{gather} 147 148\section{Un} 149\begin{gather} 150x^2+y^2 = z^2 \label{eq:r2}\\ 151x^3+y^3 = z^3 \notag\\ 152x^4+y^4 = z^4 \tag{$*$}\label{foo}\\ 153x^5+y^5 = z^5 \tag*{$*$}\\ 154x^6+y^6 = z^6 \tag*{\ref{eq:r2}$'$}\\ 155x^7+y^7 = z^7 156\end{gather} 157Ben mon vieux pour avoir l'\'equation~\ref{foo}. 158 159\section{Trois} 160\begin{gather*} 161x^2+y^2 = z^2\tag{$+$}\\ 162x^3+y^3 = z^3\\ 163x^4+y^4 = z^4\\ 164x^5+y^5 = z^5\\ 165x^6+y^6 = z^6\\ 166x^7+y^7 = z^7 167\end{gather*} 168 169\section{Quatre} 170\begin{gather} 171x^2+y^2 = z^2\\ 172x^3+y^3 = z^3\\ 173x^4+y^4 = z^4\\ 174x^5+y^5 = z^5\\ 175x^6+y^6 = z^6\\ 176x^7+y^7 = z^7 177\end{gather} 178Maintenant~: \theequation. 179 180\section{Cinq} 181\begin{align} 182\tag{a} x^2+y^2 &= z^2 & x^3+y^3 &= z^3\label{a}\\ 183\notag x^4+y^4 &= z^4 & x^5+y^5 &= z^5\label{b}\\ 184x^6+y^6 &= z^6 & x^7+y^7 &= z^7 185\end{align} 186Au dessus ya l'\'equation~\eqref{a}. 187 188\section{Multline} 189\begin{multline} 190x+1 =\\ 191y+2 192\end{multline} 193 194\end{document} 195