# why are only part indents nicely but the rest don't

First, I know that the \\ command is bad. My question is why does number 43 indent nicely, but the following 44 - 46 do not.

  \documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}

\usepackage{paralist}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}
\begin{document}

43. Let $f\left(x\right) = \sqrt{x}, \; x = 100,\; \mathrm{d}x = -0.6.$
\
$\begin{array}{ccl} f\left(x + \Delta x\right) & \approx & f\left(x\right) + f^{\prime}\left(x\right)\, \mathrm{d}x \\ & = & \sqrt{x} + \frac{1}{2\sqrt{x}}\,\mathrm{d}x \\ f\left(x+\Delta x\right) & = & \sqrt{99.4} \\ & \approx & \sqrt{100} + \frac{-0.6}{2\sqrt{100}} = 9.97 \end{array}$
\
Using a calculator: $\sqrt{99.4} \approx 9.96995$
\vfill

44. Let $f(x)=\sqrt[3]{x},\; x = 27, \; \mathrm{d}x = -1$
\\
$f(x+ \Delta x) \approx f(x) + f^{\prime}(x)\,\mathrm{d}x = \sqrt[3]{x} + \frac{1}{3\sqrt[3]{x^2}}\,\mathrm{d}x$
$\sqrt[3]{26} \approx \sqrt[3]{27}+\frac{1}{3\sqrt[3]{27^2}}(-1) = 3-\frac{1}{27} \approx 2.9630$
\\
Using a calculator, $\sqrt[3]{26} \approx 2.9625$
\vfill

45. Let $f(x) = \sqrt[4]{x},\; x = 625,\; \mathrm{d}x =-1$
\
$\begin{array}{ccl} f(x +\Delta x) & \approx & f(x)+f^{\prime}(x)\,\mathrm{d}x = \sqrt[4]{x} + \frac{1}{4\sqrt[4]{x^3}} \\ f(x + \Delta x) & = & \sqrt[4]{624} \approx \sqrt[4]{625} + \frac{1(-1)} {4\left(\sqrt[4]{625}\right)^3} \\ & = & 5-\frac{1}{500} = 4.998 \end{array}$
\\
Using a calculator, $\sqrt[4]{624} \approx 4.9980$\
\vfill

46. Let $f(x) = x^3,\; x = 3, \; \mathrm{d}x = -0.01$
\\
$\begin{array}{ccl} f(x + \Delta x) & \approx & f(x) + f^{\prime}(x)\, \mathrm{d}x =x^3 + 3x^2\,\mathrm{d}x \\ f(x + \Delta x) & = & \left(2.99\right)^3 \approx 3^3 + 3\left(3\right)^2\left(-0.01\right) \\ & = & 27 - 0.27 = 26.73 \end{array}$
\\
Using a calculator: $\left(2.99\right)^3 \approx 26.7309$
\vfill
\end{document}


• You are missing \begin{document} so get an error right at the start, and after that any output is essentially accidental. If you add \begin{document} before 43. then all numbers indent the same way (but you should not number explicitly or use \\  ) – David Carlisle Oct 15 '13 at 0:25
• @DavidCarlisle, thanks for seeing my typo, but, in texmaker, I have the line but still only 43 indents correctly. – MaoYiyi Oct 15 '13 at 0:40
• No all the numbers indent the same amount, I'll add an image output from your MWE with a box added so you see that the numbers are all on the same line. – David Carlisle Oct 15 '13 at 1:28
• @DavidCarlisle Could it be that I used texsudio to type 43 and then used texmaker for the rest? I don't know howto show you a picture of the pdf I get when I quickbuild it. But, 43 is the only one that looks nice. I agree with you that there should not be any difference. I have tried reopening the file, rebooting, and still having this problem. – MaoYiyi Oct 15 '13 at 1:53
• no texstudio, texmaker etc do not typeset anything they are just editors that call latex to typeset the file created, it doesn't make any difference which editor you use. To upload a picture just take a screenshot and save it as a png file, then upload using the image button on this site. Note that the others after the first have unindented text after the first line (to the lefft of the box in my picture) as those lines are not the start of a paragraph. – David Carlisle Oct 15 '13 at 7:25

## 2 Answers

The reason for this odd indentation stems from your use of \\. While \\ breaks a line, it doesn't break a paragraph. As such, content that immediately follows \\ without an empty line in between is still part of the same paragraph. And, with a non-zero \parindent, the first line is indented while the remainder is left flush with the margin. Here's a alternative view on your input (geometry's showframe option highlights the text block boundary):

\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage[margin=2cm,showframe]{geometry}% http://ctan.org/pkg/geometry
\newcommand{\dx}{\mathrm{d}x}
\setlength{\parindent}{0pt}% No paragraph indent
\begin{document}

43. Let $f(x) = \sqrt{x}$, $x = 100$, $\dx = -0.6$.

\bigskip
$\begin{array}{@{}r@{}l@{}} f(x + \Delta x) & {}\approx f(x) + f^{\prime}(x)\, \dx \\ & {}= \sqrt{x} + \frac{1}{2\sqrt{x}}\, \dx \\ f(x + \Delta x) & {}= \sqrt{99.4} \\ & {}\approx \sqrt{100} + \frac{-0.6}{2\sqrt{100}} = 9.97 \end{array}$

\bigskip
Using a calculator: $\sqrt{99.4} \approx 9.96995$

\vfill

44. Let $f(x) = \sqrt[3]{x}$, $x = 27$, $\dx = -1$

$f(x + \Delta x) \approx f(x) + f^{\prime}(x)\, \dx = \sqrt[3]{x} + \frac{1}{3\sqrt[3]{x^2}}\, \dx$ \quad
$\sqrt[3]{26} \approx \sqrt[3]{27} + \frac{1}{3\sqrt[3]{27^2}}(-1) = 3 - \frac{1}{27} \approx 2.9630$

Using a calculator, $\sqrt[3]{26} \approx 2.9625$

\vfill

45. Let $f(x) = \sqrt[4]{x}$, $x = 625$, $\dx =-1$

$\begin{array}{@{}r@{}l@{}} f(x + \Delta x) & {}\approx f(x) + f^{\prime}(x)\, \dx = \sqrt[4]{x} + \frac{1}{4\sqrt[4]{x^3}} \\ f(x + \Delta x) & {}= \sqrt[4]{624} \approx \sqrt[4]{625} + \frac{1(-1)}{4(\sqrt[4]{625})^3} \\ & {}= 5-\frac{1}{500} = 4.998 \end{array}$

Using a calculator, $\sqrt[4]{624} \approx 4.9980$

\vfill

46. Let $f(x) = x^3$, $x = 3$, $\dx = -0.01$

$\begin{array}{@{}r@{}l@{}} f(x + \Delta x) & {}\approx f(x) + f^{\prime}(x)\, \dx =x^3 + 3x^2\, \dx \\ f(x + \Delta x) & {}= (2.99)^3 \approx 3^3 + 3(3)^2(-0.01) \\ & {}= 27 - 0.27 = 26.73 \end{array}$

Using a calculator: $(2.99)^3 \approx 26.7309$

\vfill
\end{document}


I removed the paragraph indentation (\setlength{\parindent}{0pt}). This way everything is flush with the left margin. Spacing between elements is set as a separate paragraph (by means of an empty line) or by adding something like \bigskip (see #43).

• great explaining. – MaoYiyi Oct 15 '13 at 12:12

Some suggestions:

• it is preferable to use enumerate in this situation. If you want more indentation space, you can try something like \setlength{\itemindent}{15pt} (15 pt is the normal \parindent).
• To display math equations, try align* environment. To align equations with the left margin, use fleqn option and add \setlength{\mathindent}{0pt} to the preamble.
• For commands that are used repeatedly, such as \,\mathrm{d}x, we can define new command in the preamble and use it instead. For example, we can add \DeclareMathOperator{\dx}{\mathrm{d}\mathnormal{x}} to the preamble and thus use \dx instead of \,\mathrm{d}x.
• ... and else

Example:

\documentclass[10pt,a4paper,fleqn]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{paralist}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}

\DeclareMathOperator{\dx}{\mathrm{d}\mathnormal{x}}

\setlength{\mathindent}{0pt}

\begin{document}

\begin{enumerate}\setlength{\itemindent}{15pt}
\setcounter{enumi}{42}
\item Let $f\left(x\right) = \sqrt{x}, \; x = 100, \;\dx = -0.6.$
\begin{align*}
f\left(x + \Delta x\right) &\approx f\left(x\right) +   f^{\prime}\left(x\right)\dx\\
&= \sqrt{x} + \frac{1}{2\sqrt{x}}\dx\\
f\left(x+\Delta x\right) & = \sqrt{99.4} \\
&\approx \sqrt{100} + \frac{-0.6}{2\sqrt{100}} = 9.97
\end{align*}
Using a calculator: $\sqrt{99.4} \approx 9.96995$
\vfill

\item Let $f(x)=\sqrt[3]{x},\; x = 27, \; \mathrm{d}x = -1$
\begin{align*}
f(x+ \Delta x) &\approx f(x) + f^{\prime}(x)\dx = \sqrt[3]{x} +    \frac{1}{3\sqrt[3]{x^2}}\,\mathrm{d}x\\
f(x+ \Delta x) &=\sqrt[3]{26}\\
&\approx \sqrt[3]{27}+\frac{1}{3\sqrt[3]{27^2}}(-1) =    3-\frac{1}{27} \approx 2.9630
\end{align*}
Using a calculator, $\sqrt[3]{26} \approx 2.9625$
\vfill

\item Let $f(x) = \sqrt[4]{x},\; x = 625,\; \mathrm{d}x =-1$
\begin{align*}
f(x +\Delta x) & \approx f(x)+f^{\prime}(x)\,\mathrm{d}x = \sqrt[4]{x} + \frac{1}{4\sqrt[4]{x^3}} \\
f(x + \Delta x) & = \sqrt[4]{624} \approx \sqrt[4]{625} + \frac{1(-1)}       {4\left(\sqrt[4]{625}\right)^3} \\
& = 5-\frac{1}{500} = 4.998
\end{align*}
Using a calculator, $\sqrt[4]{624} \approx 4.9980$\\
\vfill

\item Let $f(x) = x^3,\; x = 3, \; \mathrm{d}x = -0.01$
\begin{align*}
f(x + \Delta x) & \approx f(x) + f^{\prime}(x)\, \mathrm{d}x =x^3 + 3x^2\,\mathrm{d}x \\
f(x + \Delta x) & = \left(2.99\right)^3 \approx 3^3 + 3\left(3\right)^2\left(-0.01\right) \\
& = 27 - 0.27 = 26.73
\end{align*}
Using a calculator: $\left(2.99\right)^3 \approx 26.7309$
\vfill

\end{enumerate}
\end{document}


Result:

• how to I change the numbers of the enumeration? That is the only draw back for me for your method, which is great. – MaoYiyi Oct 15 '13 at 12:11
• @MaoYiyi: Use \setcounter{enumi}{n-1} in the beginning to change the counter of the first level of enumeration. n be the number you want your list to start with. Remember \item will step the counter so put n-1 in the \setcounter. – Francis Oct 15 '13 at 12:15
• that can be used inside of \begin{document} and \end{document}? – MaoYiyi Oct 15 '13 at 12:52
• @MaoYiyi: I meant the beginning of enumerate environment. – Francis Oct 15 '13 at 12:54