Math & Scienceusing \notag

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
abu aasiyah
Posts: 26
Joined: Wed Sep 30, 2009 7:04 pm

using \notag

Post by abu aasiyah »

Hello,

I have a series of equations and I am trying to remove the numbering from all equation execpt the last by usin the \notag command. It does work but for some reason it adds an addtional number below the last equation. The code is as follows:

Code: Select all


\documentclass[12pt,a4paper]{article} 
\usepackage[latin1]{inputenc} 
\usepackage[danish]{babel} % danske overskrifter
\usepackage[T1]{fontenc} 
\usepackage{lmodern} 
\usepackage{graphicx} 
\usepackage{mathtools}
\usepackage{amsmath}

\begin{document}

\begin{align*}
\left| \frac{a_{n+1}}{a_{n}} \right| &= \frac{   \frac{x^{n+1}}{(n+1)2^{2(n+1)}}    }  {    \frac{x^{n}}{n\cdot 2^{2n}}    } \\   
                                       &=   \frac{x^{n}x}{(n+1)2^{2n}2}  \cdot  \frac{n\cdot 2^{2n}}{x^{n}}     \\  
                                       &= \frac{xn}{2^{2}n+2^{2}}   \\ 
                                       &= \frac{   \frac{xn}{n} }{ \frac{2^{2}n}{n} + \frac{2^{2}}{n} } \\
\end{align*}

\end{document}

Any suggestions?

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

lalop
Posts: 63
Joined: Fri Sep 11, 2009 11:25 pm

Re: using \notag

Post by lalop »

That doesn't seem to be the right code.
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

using \notag

Post by frabjous »

Remove the bottom \\ -- you don't need that right before the end of the environment. As noted, you didn't use code that shows your problem, since you used the starred version, but removing the star, I'm sure that's what's causing your problem. Change it as follows: e.g.:

Code: Select all

\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[danish]{babel} % danske overskrifter
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{mathtools}
\usepackage{amsmath}

\begin{document}

\begin{align}
\left| \frac{a_{n+1}}{a_{n}} \right| &= \frac{   \frac{x^{n+1}}{(n+1)2^{2(n+1)}}    }  {    \frac{x^{n}}{n\cdot 2^{2n}}    } \notag \\   
                                       &=   \frac{x^{n}x}{(n+1)2^{2n}2}  \cdot  \frac{n\cdot 2^{2n}}{x^{n}}     \notag \\ 
                                       &= \frac{xn}{2^{2}n+2^{2}}   \notag \\
                                       &= \frac{   \frac{xn}{n} }{ \frac{2^{2}n}{n} + \frac{2^{2}}{n} } 
\end{align}

\end{document}
Depending on why you are doing this, you could also consider using the aligned environment inside an equation environment to treat the entire series of equations as a single numbered item. (This will put it in the middle, though, not the bottom.)

Code: Select all


\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[danish]{babel} % danske overskrifter
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{mathtools}
\usepackage{amsmath}

\begin{document}

\begin{equation}
\begin{aligned}
\left| \frac{a_{n+1}}{a_{n}} \right| &= \frac{   \frac{x^{n+1}}{(n+1)2^{2(n+1)}}    }  {    \frac{x^{n}}{n\cdot 2^{2n}}    }  \\   
                                       &=   \frac{x^{n}x}{(n+1)2^{2n}2}  \cdot  \frac{n\cdot 2^{2n}}{x^{n}}      \\ 
                                       &= \frac{xn}{2^{2}n+2^{2}}    \\
                                       &= \frac{   \frac{xn}{n} }{ \frac{2^{2}n}{n} + \frac{2^{2}}{n} } 
\end{aligned}
\end{equation}

\end{document}
Post Reply