2

I am a new Latex user who's having problems when writing fractions in the \array environment. The text becomes compressed to where reading what I wrote becomes a challenge, and I have so far spent hours finding a solution to my problem with no luck. I want to the \array environment to look similar to the equations not in the \array environment.

\begin{proof}
    We proceed by induction.
    \begin{enumerate}
        \item Let $n = 1$. Then \[ \frac{1}{1(1+1)} = \frac{1}{2} = \frac{1}{1+1} = \frac{1}{2} \]
    Therefore, the base case holds.
        \item Assume now by Induction that \[ \frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3}+\frac{1}{3 \cdot 4} + \dotsb + \frac{1}{n(n+1)}=\frac{n}{n+1} \] holds for some $n \in{\mathbb{N}}$. We now show that \[ \frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3}+\frac{1}{3 \cdot 4} + \dotsb + \frac{1}{(n+1)(n+2)}=\frac{n+1}{n+2} \] We write \[ \begin{array}{lll}
            \frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3} + \dotsb + \frac{1}{(n+1)(n+2)} & = & \frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3} + \dotsb + \frac{1}{n(n+1)} + \frac{1}{(n+1)(n+2)}  \\ 
             & = & \frac{n}{n+1} + \frac{1}{(n+1)(n+2)} \\
             & = & \frac{(n+1)^{2}}{(n+1)(n+2)} \\
             & = & \frac{n + 1}{n + 2}.
        \end{array} \]
        \end{enumerate}
By Induction, \[ \frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3}+\frac{1}{3 \cdot 4} + \dotsb + \frac{1}{(n+1)(n+2)}=\frac{n+1}{n+2} \] for every $n \in{\mathbb{N}}$.  
5
  • 1
    You could use \dfrac (short hand for \displaystyle\frac) – user94293 Jul 24 '18 at 6:27
  • Related to tex.stackexchange.com/questions/32824/… It's because the math style changes from display to text mode. – nox Jul 24 '18 at 6:27
  • 2
    Replace \[\begin{array}{lll} with \begin{align*}, \end{array}\] with \end{align*}; moreover & = & should become &=. – egreg Jul 24 '18 at 7:25
  • your main error is using \begin{array} which is designed for matrices/arrays of values not for setting a displayed equation. – David Carlisle Jul 24 '18 at 7:48
  • @user94293 actually if you find yourself needing \dfrac that is usually a sign of an error elsewhere (in this case using array instead of align*) – David Carlisle Jul 24 '18 at 7:49
1

You should use align* instead of array:

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}

\begin{document}

\begin{proof}
We proceed by induction.
\begin{enumerate}
\item Let $n = 1$. Then 
\[
\frac{1}{1(1+1)} = \frac{1}{2} = \frac{1}{1+1} = \frac{1}{2}
\]
Therefore, the base case holds.

\item Assume now by induction that 
\[
\frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3}+\frac{1}{3 \cdot 4} 
+ \dots + \frac{1}{n(n+1)}=\frac{n}{n+1}
\]
holds for some $n \in \mathbb{N}$. We now show that
\[
\frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3}+\frac{1}{3 \cdot 4}
+ \dots + \frac{1}{(n+1)(n+2)}=\frac{n+1}{n+2}
\]
We write
\begin{align*}
\frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3}
  + \dots + \frac{1}{(n+1)(n+2)}
& = \frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3}
    + \dots + \frac{1}{n(n+1)} + \frac{1}{(n+1)(n+2)} \\ 
& = \frac{n}{n+1} + \frac{1}{(n+1)(n+2)} \\
& = \frac{(n+1)^{2}}{(n+1)(n+2)} \\
& = \frac{n + 1}{n + 2}.
\end{align*}
\end{enumerate}
By induction,
\[
\frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3}+\frac{1}{3 \cdot 4}
+ \dots + \frac{1}{(n+1)(n+2)}=\frac{n+1}{n+2}
\]
for every $n \in \mathbb{N}$.  
\end{proof}

\clearpage

\begin{proof}
We proceed by induction. Set
\[
S(n)=\frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3}+\frac{1}{3 \cdot 4} 
     + \dots + \frac{1}{n(n+1)}
\]
for simplicity.

\begin{enumerate}
\item Let $n = 1$. Then 
\[
S(1) = \frac{1}{1(1+1)} = \frac{1}{2} = \frac{1}{1+1}
\]
Therefore, the base case holds.

\item Assume now by induction that 
\[
S(n) = \frac{n}{n+1}
\]
holds for some $n \in \mathbb{N}$. We now show that
\[
S(n+1) = \frac{n+1}{n+2}
\]
We write
\begin{align*}
S(n+1)
& = S(n) + \frac{1}{(n+1)(n+2)} \\
& = \frac{n}{n+1} + \frac{1}{(n+1)(n+2)} \\
& = \frac{(n+1)^{2}}{(n+1)(n+2)} \\
& = \frac{n+1}{n+2}.
\end{align*}
\end{enumerate}
By induction,
\[
S(n) = \frac{1}{1 \cdot 2}+ \frac{1}{2 \cdot 3}+\frac{1}{3 \cdot 4}
+ \dots + \frac{1}{(n+1)(n+2)}=\frac{n+1}{n+2}
\]
for every $n \in \mathbb{N}$.  
\end{proof}


\end{document}

Of course, the long lines are a big problem, so I suggest an alternative version.

enter image description here

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