I got some fatal error from my code:
\begin{align}
a_{n+1}-a_{n} &= \frac{1}{n+2}\left(1+\frac{1}{2} + \cdots + \frac{1}{n+1} \right) - \frac{1}{n+1} \left(1+\frac{1}{2} + \cdots + \frac{1}{n} \right) \
& = \left(\frac{1}{n+2} - \frac{1}{n+1} \right) \left( 1+\frac{1}{2} +\cdots+ \frac{1}{n}\right) + \left(\frac{1}{n+1} - \frac{1}{n+2} \right)
\end{align}
I looked through every possible reasons that make error, but still couldn't figure them out. I have tried to find out the function available in math mode but there were none. The first error message I am confronted with is
Runaway argument?
! Paragraph ended before \align was complete.
<to be read again>
\par
followed by further error messages if I tell LaTeX to keep stepping through the compilation process. Could you help me to figure those errors out? Appreciate with this.
\begin{align}
a_{n+1}-a_{n} &= \frac{1}{n+2}\left(1+\frac{1}{2} + \cdots + \frac{1}{n+1} \right) - \frac{1}{n+1} \left(1+\frac{1}{2} + \cdots + \frac{1}{n} \right) \\
& = \left(\frac{1}{n+2} - \frac{1}{n+1} \right) \left( 1+\frac{1}{2} +\cdots+ \frac{1}{n}\right) + \left(\frac{1}{n+1} - \frac{1}{n+2} \right)
\end{align}
