1

Two of the inequalities written below(the ones right after \vdots) are going beyond the margins. Below is the MWE:

\documentclass[12pt,a4paper]{report}
\makeatletter
% these two slashes-commands for continuous chapter numbering in parts of the document
\makeatother
\usepackage{titlesec}
\titleformat{\chapter}{\normalfont\huge}{\thechapter.}{20pt}{\huge\bf} %for chapter headings
\RequirePackage{etoolbox}
\usepackage{tikz-cd} % and in the above line to use commutative diagrams
\usepackage{amsfonts}
\usepackage[utf8]{inputenc}
\usepackage{amsthm}
% below four lines to just one or two cyrillic letter
\DeclareFontFamily{U}{wncy}{}
\DeclareFontShape{U}{wncy}{m}{n}{<->wncyr10}{}
\DeclareSymbolFont{mcy}{U}{wncy}{m}{n}
\DeclareMathSymbol{\Sh}{\mathord}{mcy}{"58} 
 %Cyrillic letter command over
\usepackage{sagetex}
\usepackage[toc]{appendix} % to make appendi appear in the table of contents
 \usepackage{amssymb}  %to use direct sum symbol
 \usepackage{graphicx} %toinsert images
 \usepackage{amsmath} %to use matrices
 \usepackage{hyperref}
 \usepackage{bm} % to use bold font in math mode use \bm{ insert math mode text}
 \usepackage{mathrsfs} %for scripted english characters
 \usepackage{mathtools}
 \usepackage{tikz-cd} % to draw commutative diagrams
 \usepackage{enumitem}

\begin{align*}
\begin{split}
h(P_n)  \leq \frac{1}{m^2}(2h(P_{n-1})+C'_1+C_2) & = \frac{2}{m^2}h(P_{n-1}) + \frac{C'_1+C_2}{m^2} \\
& \leq  \frac{2}{m^2} \Big(\frac{1}{m^2}(2h(P_{n-2})\frac{C'_1+C_2}{m^2} \Big) + \frac{C'_1+C_2}{m^2} \\
& = (\frac{2}{m^2})^2 h(P_{n-2}) + \Big( \frac{1}{m^2}+\frac{2}{(m^2)^2} \Big)(C'_1+C_2) \\
\vdots \\
& \leq (\frac{2}{m^2})^n h(P) + \frac{1}{m^2} \Big( 1+ \frac{2}{m^2}+ \ldots + \frac{2^{n-1}}{(m^2)^{n-1}} \Big)(C'_1+C_2) \\
& \leq (\frac{2}{m^2})^n h(P) + \frac{1}{m^2} \Big( 1+ \frac{2}{m^2} + \frac{2^2}{(m^2)^2} + \ldots  \Big)(C'_1+C_2) \\
& = (\frac{2}{m^2})^n h(P) + \frac{(C'_1+C_2)}{m^2-2} \\
& \leq \frac{1}{2^n}h(P)+ \frac{1}{2}(C'_1+C_2) \text{       $m \geq 2$}\\
\end{split}
\end{align*}
If $n$ is sufficiently large so that $2^n$ exceeds $h(P)$ and $\frac{h(P)}{2^n} < 1$ then 
\[
h(P_n) \leq 1+ \frac{1}{2}(C'_1+C_2)
\]
\end{document}

enter image description here

(the vertical lines in the preceding screenshot indicate the edges of the text block)

How do I write them nicely so that they don't go beyond the text-width?

0

3 Answers 3

2

In order to achieve the formatting objective stated in your posting, you should introduce (a) an additional alignment point at the first instance of \leq and (b) a line break before the first instance of &=.

In addition, you may want to work on the expressions and provide more information as to what's going on at various steps. That way, your readers will find it much easier to follow your arguments. For instance, your readers might appreciate if you replace \vdots with actual words, say, Applying $n-2$ additional backward subtitution steps, we further find. See the following code and screenshot for additional suggestions.

Incidentally, I believe it's good form to state explicitly to require m^2>2 for the infinite sum to converge and hence for the stated limit to obtain. (Naturally, the condition m^2>2 is satisfied by your subsequent condition m\ge 2.) That would mean that the associated weak inequality is actually a strict inequality.

The following screenshot highlights the main changes I've applied in red. For simplicity, the code shown below omits all \color and \textcolor commands.

enter image description here

\documentclass[12pt,a4paper]{report}
\usepackage{mathtools}
\allowdisplaybreaks
\begin{document}
Setting $\widetilde{C}=C'_1+C_2>0$, we find
\begin{align*}
h(P_n)  
&\leq \frac{1}{m^2}\bigl(2h(P_{n-1})+\widetilde{C}\,\bigr)\\
&=    \frac{2}{m^2}h(P_{n-1}) + \frac{1}{m^2}\widetilde{C}\\
&\leq \frac{2}{m^2} {\underbrace{\Bigl(\frac{2}{m^2}h(P_{n-2})
      +\frac{1}{m^2}\widetilde{C} \Bigr)}_{\ge h(P_{n-1})}} 
      +\frac{1}{m^2}\widetilde{C} \\
&=    \Bigl(\frac{2}{m^2}\Bigr)^{\!2} h(P_{n-2}) 
      +\frac{1}{m^2}\Bigl[1 +\frac{2}{m^2} \Bigr]\widetilde{C}\,. \\
\intertext{Applying $n-2$ additional backward subtitution steps, we further find}
h(P_n)
&\leq \Bigl(\frac{2}{m^2}\Bigr)^{\!n} h(P) 
      +\frac{1}{m^2} \Bigl[\,\sum_{j=0}^{n-1}\Bigl(\frac{2}{m^2}\Bigr)^{\!j} 
      \,\Bigr]\widetilde{C} \\
&<   \Bigl(\frac{2}{m^2}\Bigr)^{\!n} h(P) 
      +\frac{1}{m^2} {\underbrace{\Bigl[\,\sum_{j=0}^{\infty}
      \Bigl(\frac{2}{m^2}\Bigr)^{\!j} \,\Bigr]}_{=m^2/(m^2-2)}}\widetilde{C} 
      \quad\text{for $m^2>2$}\\
&=    \Bigl(\frac{2}{m^2}\Bigr)^{\!n} h(P) 
      + \frac{1}{m^2-2}\,\widetilde{C} \\
&\leq \frac{1}{2^n}h(P)+ \frac{1}{2}\widetilde{C} 
      \quad\text{for $m\ge2$ and hence $2/m^2\le 1/2$.}
\intertext{If $n$ is sufficiently large so that $h(P)<2^n$ and hence $h(P)/2^n<1$,}
h(P_n) &< 1 + \frac{1}{2}\widetilde{C}= 1+\frac{1}{2}(C'_1+C_2)\,.
\end{align*}
\end{document}

enter image description here

\documentclass[12pt,a4paper]{report}
\usepackage{mathtools}
\allowdisplaybreaks
\begin{document}
\begin{align*}
h(P_n)  
&\leq \frac{1}{m^2}\bigl(2h(P_{n-1})+\widetilde{C}\,\bigr) 
      \quad\text{where $\widetilde{C}\equiv C'_1+C_2>0$}\\
&=    \frac{2}{m^2}h(P_{n-1}) + \frac{1}{m^2}\widetilde{C}\\
&\leq \frac{2}{m^2} {\underbrace{\Bigl(\frac{2}{m^2}h(P_{n-2})
      +\frac{1}{m^2}\widetilde{C} \Bigr)}_{\ge h(P_{n-1})}} 
      +\frac{1}{m^2}\widetilde{C} \\
&=    \Bigl(\frac{2}{m^2}\Bigr)^{\!2} h(P_{n-2}) 
      +\frac{1}{m^2}\Bigl[1 +\frac{2}{m^2} \Bigr]\widetilde{C} \\
&\vdotswithin{=} \text{\footnotesize[$n-2$ further backward substitution steps]}\\
&\leq \Bigl(\frac{2}{m^2}\Bigr)^{\!n} h(P) 
      +\frac{1}{m^2} \Bigl[\,\sum_{j=0}^{n-1}\Bigl(\frac{2}{m^2}\Bigr)^{\!j} 
      \,\Bigr]\widetilde{C} \\
&<    \Bigl(\frac{2}{m^2}\Bigr)^{\!n} h(P) 
      +\frac{1}{m^2} {\underbrace{\Bigl[\,\sum_{j=0}^{\infty}
      \Bigl(\frac{2}{m^2}\Bigr)^{\!j} \,\Bigr]}_{=m^2/(m^2-2)}}\widetilde{C} 
      \quad\text{for $m^2>2$}\\
&=    \Bigl(\frac{2}{m^2}\Bigr)^{\!n} h(P) 
      + \frac{1}{m^2-2}\,\widetilde{C} \\
&\leq \frac{1}{2^n}h(P)+ \frac{1}{2}\widetilde{C} 
      \quad\text{for $m\ge2$ and hence $2/m^2\le 1/2$.}
\end{align*}
If $n$ is sufficiently large so that $2^n\ge h(P)$ and hence $h(P)/2^n \le 1$,
\[
h(P_n) < 1 + \frac{1}{2}\widetilde{C}\equiv 1+\frac{1}{2}(C'_1+C_2)\,.
\]
\end{document}
1
  • Thank you so much for your answer. Now it looks all pretty.
    – Shreya
    Apr 18, 2020 at 18:36
2

Just move the alignment point. Also use \vdotswithin{=}. EDIT: Following a suggestion I made all the parentheses consistent. There are two versions, one which \Bigl( and \Bigr) and one with \left( and \right). It is a matter of taste which one looks better.

\documentclass[12pt,a4paper]{report}
\usepackage{mathtools}
\begin{document}
\begin{align*}
h(P_n)  &\leq \frac{1}{m^2}(2h(P_{n-1})+C'_1+C_2)  = \frac{2}{m^2}h(P_{n-1}) + \frac{C'_1+C_2}{m^2} \\
& \leq  \frac{2}{m^2} \Bigl(\frac{1}{m^2}(2h(P_{n-2})\frac{C'_1+C_2}{m^2} \Bigr) + \frac{C'_1+C_2}{m^2} \\
& = \Bigl(\frac{2}{m^2}\Bigr)^2 h(P_{n-2}) + \Big( \frac{1}{m^2}+\frac{2}{(m^2)^2} \Big)(C'_1+C_2) \\
&\vdotswithin{=} \\
& \leq \Bigl(\frac{2}{m^2}\Bigr)^n h(P) + \frac{1}{m^2} \Bigl( 1+ \frac{2}{m^2}+
\ldots + \frac{2^{n-1}}{(m^2)^{n-1}} \Bigr)(C'_1+C_2) \\
& \leq \Bigl(\frac{2}{m^2}\Bigr)^n h(P) + \frac{1}{m^2} \Bigl( 1+ \frac{2}{m^2}
+ \frac{2^2}{(m^2)^2} + \ldots  \Bigr)(C'_1+C_2) \\
& = \Bigl(\frac{2}{m^2}\Bigr)^n h(P) + \frac{(C'_1+C_2)}{m^2-2} \\
& \leq \frac{1}{2^n}h(P)+ \frac{1}{2}(C'_1+C_2) \quad\text{if } m \geq 2\\
\end{align*}

\begin{align*}
h(P_n)  &\leq \frac{1}{m^2}(2h(P_{n-1})+C'_1+C_2)  = \frac{2}{m^2}h(P_{n-1}) + \frac{C'_1+C_2}{m^2} \\
& \leq  \frac{2}{m^2} \left(\frac{1}{m^2}(2h(P_{n-2})\frac{C'_1+C_2}{m^2} \right) + \frac{C'_1+C_2}{m^2} \\
& = \left(\frac{2}{m^2}\right)^2 h(P_{n-2}) + \Big( \frac{1}{m^2}+\frac{2}{(m^2)^2} \Big)(C'_1+C_2) \\
&\vdotswithin{=} \\
& \leq \left(\frac{2}{m^2}\right)^n h(P) + \frac{1}{m^2} \left( 1+ \frac{2}{m^2}+
\ldots + \frac{2^{n-1}}{(m^2)^{n-1}} \right)(C'_1+C_2) \\
& \leq \left(\frac{2}{m^2}\right)^n h(P) + \frac{1}{m^2} \left( 1+ \frac{2}{m^2}
+ \frac{2^2}{(m^2)^2} + \ldots  \right)(C'_1+C_2) \\
& = \left(\frac{2}{m^2}\right)^n h(P) + \frac{(C'_1+C_2)}{m^2-2} \\
& \leq \frac{1}{2^n}h(P)+ \frac{1}{2}(C'_1+C_2) \quad\text{if } m \geq 2\\
\end{align*}

\end{document}

enter image description here

enter image description here

2
  • +1. Do please change all instances of \left(\frac{2}{m^2}\right)^n to \Bigl(\frac{2}{m^2}\Bigr)^n, though.
    – Mico
    Apr 18, 2020 at 6:11
  • 1
    @Mico Thanks! Indeed there were a few inconsistent ones. Probably one can have a long debate whether \Bigl( and \Bigr) or \left( and \right) look better, so I added both versions.
    – user194703
    Apr 18, 2020 at 6:21
2

See, if the following result is acceptable for you:

enter image description here

\documentclass[12pt,a4paper]{report}
\usepackage{amssymb}  %to use direct sum symbol
\usepackage{mathtools}

%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
\begin{align*}
    \MoveEqLeft
h(P_n)  \leq \frac{1}{m^2}\bigl(2h(P_{n-1})+C'_1+C_2\bigr)        \\ 
    & = \frac{2}{m^2}h(P_{n-1}) + \frac{C'_1+C_2}{m^2} q\\
    & \leq  \frac{2}{m^2} \Bigl(\frac{1}{m^2}(2h(P_{n-2})\frac{C'_1+C_2}{m^2}\Bigr) + \frac{C'_1+C_2}{m^2} \\
    & = \Bigl(\frac{2}{m^2}\bigr)^2 h(P_{n-2}) + \Bigl( \frac{1}{m^2}+\frac{2}{(m^2)^2}\Bigr)(C'_1+C_2) \\
    &   \hspace{0.25\linewidth}\vdots \\
    & \leq \Bigl(\frac{2}{m^2}\Bigr)^n h(P) + \frac{1}{m^2} \Bigl(1+ \frac{2}{m^2}+ \ldots + \frac{2^{n-1}}{(m^2)^{n-1}}\Bigr)(C'_1+C_2) \\
    & \leq \Bigl(\frac{2}{m^2}\Bigr)^n h(P) + \frac{1}{m^2} \Bigl(1+ \frac{2}{m^2} + \frac{2^2}{(m^2)^2} + \ldots  \Bigr)(C'_1+C_2) \\
    & = \Bigl(\frac{2}{m^2}\Bigr)^n h(P) + \frac{(C'_1+C_2)}{m^2-2} \\
    & \leq \frac{1}{2^n}h(P)+ \frac{1}{2}(C'_1+C_2), \quad m\geq 2\\
\end{align*}
If $n$ is sufficiently large so that $2^n$ exceeds $h(P)$ and $\frac{h(P)}{2^n} < 1$ then
\[
h(P_n) \leq 1+ \frac{1}{2}(C'_1+C_2)
\]
\end{document}

Edit: Considered is @Mico comment about parenthesis.

2
  • +1. I would, however, change all instances of \Big( and \Big) to \Big( and \Big), respectively, and I would change all instances of (\frac{2}{m^2}) to \Bigl(\frac{2}{m^2}\Bigr). (It makes a difference in at least one line.)
    – Mico
    Apr 18, 2020 at 6:10
  • @Mico, thank you very much. Corrected.
    – Zarko
    Apr 18, 2020 at 9:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .