2

I need to display a few equations as below enter image description here

The code I have written is :-

\documentclass{report}
\usepackage{amsmath}

\begin{document}
\begin{equation} \label{Equ. 3.9}
x_{i+1}=\cos(a_i) \cdot [x_i-y_i \cdot 2^{-i} \cdot d_i]
\tag{3.9}
\end{equation}


\begin{equation} \label{Equ. 3.10}
y_{i+1}=\cos(a_i) \cdot [y_i+x_i \cdot 2^{-i} \cdot d_i]
\tag{3.10}
\end{equation}

\begin{equation} \label{Equ. 3.11}
\cos(\alpha)=\dfrac{1}{\sqrt [2]{1+{\tan(\alpha)}^2}}
\tag{3.11}
\end{equation}

\begin{equation} \label{Equ. 3.12}
K_i=\cos(arctan(2^{-i}))= \dfrac{1}{\sqrt [2]{1+\tan(arctan(2^{-   i}))}}=\dfrac{1}{\sqrt[2]{1+2^{-2i}}}
\tag{3.12}
\end{equation}

 The product of $K_i$  represents the so-called K factor (Equ. \ref{equ: 3.13})

\begin{equation} \label{equ: 3.13}
K=\prod K_i=\prod_{i=0}^{n-1} \dfrac{1}{\sqrt{1+2^{-2i}}}
\tag{3.13}
\end{equation}


\end{document}

The result I am getting with the above code is as below enter image description here

I need to reduce the space between the equations so the result looks like the 1st screenshot. Please guide how I can achieve this?

The equation that caused the numbering problem is:

\begin{equation}
\label{equ:matrix}
V=
\begin{bmatrix}
x'\\
y'\\
\end{bmatrix}
\begin{bmatrix}
x \cdot \cos(a) - y \cdot \sin(a)\\
y \cdot \cos(a) + x \cdot \sin(a)\\
\end{bmatrix}
\tag{3.6}
\end{equation}

When i remove the tag command from this it throws an error

  • The equations displayed are also aligned by =, so the align environment would be best. You can still label and tag each equation individually, – John Kormylo Sep 2 '15 at 19:05
  • Please don't post a substantially new query as an addendum to an existing posting. For one, relatively few people may realize that you've modified an existing query to ask a follow-up question. Instead, please post a new query. – Mico Sep 4 '15 at 16:20
  • @Mico Sure... Sorry about that.. I am on it – Shray Sharan Sep 4 '15 at 16:22
3

Use the gather environment and the \intertext command. Btw, you don't have to put the equation numbers by yourself. Also, I propose to load the cleveref package: in cross references, you won't even have to type ‘equ.’, since cleveref knows (most) counters, and adds the counter name before its value.

\documentclass{report}
\usepackage{mathtools}

\begin{document}

\setcounter{chapter}{3}\setcounter{equation}{8}
\begin{gather}
  \label{Equ. 3.9}
  x_{i+1}=\cos(a_i) \cdot [x_i-y_i \cdot 2^{-i} \cdot d_i] \\
  \label{Equ. 3.10}
  y_{i+1}=\cos(a_i) \cdot [y_i+x_i \cdot 2^{-i} \cdot d_i] \\
  \label{Equ. 3.11}
  \cos(\alpha)=\dfrac{1}{\sqrt [2]{1+{\tan(\alpha)}^2}}\\
  \label{Equ. 3.12}
  K_i=\cos(\arctan(2^{-i}))= \dfrac{1}{\sqrt [2]{1+\tan(\arctan(2^{- i}))}}=\dfrac{1}{\sqrt[2]{1+2^{-2i}}}\\
  \intertext{The product of $K_i$ represents the so-called K factor (equ. \eqref{equ: 3.13})}
  \label{equ: 3.13}
  K=\prod K_i=\prod_{i=0}^{n-1} \dfrac{1}{\sqrt{1+2^{-2i}}}
\end{gather}

\end{document} 

enter image description here

  • I used the tag command in one of the equations in between and from their it has stopped taking care of the numbering... Can i post the code for that equation in this post for you check it? – Shray Sharan Sep 4 '15 at 15:27
  • Please do, since it is linked to this question. – Bernard Sep 4 '15 at 15:29
  • I added the code for that equation.. – Shray Sharan Sep 4 '15 at 15:32
  • I've inserted your equation code amidst the other equations and the result is normal, except number 3.6 between 3.12 and 3.13 looks weird. Could you post a complete code showing the problem (perhaps you should initiate a new thread)? – Bernard Sep 4 '15 at 16:07
1

Especially since you're already loading the amsmath package, you should look into using that package's gather environment to typeset a collection of displayed, numbered equations. Use \intertext{...} to intersperse text between some of the equations.

Some side remarks: For the sake of good (math) typography, consider getting rid of all \cdot directives and getting rid of the 2 radicands for the square root ops.

enter image description here

\documentclass{report}
\usepackage{amsmath}
\allowdisplaybreaks
\begin{document}
\begin{gather} 
x_{i+1}=\cos(a_i) \cdot [x_i-y_i \cdot 2^{-i} \cdot d_i]
\tag{3.9} \label{Equ. 3.9}\\
y_{i+1}=\cos(a_i) \cdot [y_i+x_i \cdot 2^{-i} \cdot d_i]
\tag{3.10} \label{Equ. 3.10}\\
\cos(\alpha)=\dfrac{1}{\sqrt [2]{1+{\tan(\alpha)}^2}}
\tag{3.11} \label{Equ. 3.11} \\
K_i=\cos(\arctan(2^{-i}))= \dfrac{1}{\sqrt [2]{1+\tan(\arctan(2^{-   i}))}}=\dfrac{1}{\sqrt[2]{1+2^{-2i}}}
\tag{3.12} \label{Equ. 3.12}\\
\intertext{The product of $K_i$  represents the so-called $K$ factor (Equ. \ref{equ: 3.13})}
K=\prod K_i=\prod_{i=0}^{n-1} \dfrac{1}{\sqrt{1+2^{-2i}}}
\tag{3.13} \label{equ: 3.13}
\end{gather}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.