How to put a big equation in a single slide?
Much of the horizontal space is taken by the long square roots. Always presume that your audience is able to read, so you can use an abbreviation.
\documentclass{beamer}
\usepackage{mathtools}
\begin{document}
\begin{frame}
\begin{align}
& (\lambda_1-2n+l+4)(\lambda_1-n-l+2)\leq l(n-l) \notag
\\
\implies\quad
& \lambda_1^2+\lambda_1(6-3n)+(2n^2-2l-8n+8)\leq 0 \notag
\\
\implies\quad
& \Bigl \{ 2\lambda_1-\bigl(3n-6-\sqrt{D}\,\bigr)\Bigr\}
\Bigl \{ 2\lambda_1-\bigl(3n-6+\sqrt{D}\,\bigr)\Bigr \} \leq 0 \notag
\\
\implies\quad
& \frac{3n-6-\sqrt{D}}{2}\leq \lambda_1 \leq \frac{3n-6+\sqrt{D}}{2} \label{whatever}
\end{align}
where $D=8l+n^2-4n+4$.
\end{frame}
\end{document}
A vertically centered equation number would be very ambiguous, so I chose to set it at the bottom. I also reduced the size of the parentheses; note the \,
to separate the vinculum from the closing parenthesis.
In case of need, the middle long equation could be split using multlined
(this is why I loaded mathtools
.
\documentclass{beamer}
\usepackage{mathtools}
\begin{document}
\begin{frame}
\begin{align}
& (\lambda_1-2n+l+4)(\lambda_1-n-l+2)\leq l(n-l) \notag
\\
\implies\quad
& \lambda_1^2+\lambda_1(6-3n)+(2n^2-2l-8n+8)\leq 0 \notag
\\
\implies\quad
& \begin{multlined}[t]
\Bigl \{ 2\lambda_1-\bigl(3n-6-\sqrt{D}\,\bigr)\Bigr\} \\
\cdot \Bigl \{ 2\lambda_1-\bigl(3n-6+\sqrt{D}\,\bigr)\Bigr \} \leq 0
\end{multlined} \notag
\\
\implies\quad
& \frac{3n-6-\sqrt{D}}{2}\leq \lambda_1 \leq \frac{3n-6+\sqrt{D}}{2} \label{whatever}
\end{align}
where $D=8l+n^2-4n+4$.
\end{frame}
\end{document}
Finally, with the text typeset in sans serif, I'd avoid “l” as a variable.
Here's a solution suggestion that performs alignment on the inequality symbols.
Aside: The \bigg
sizing instructions are, in my opinion, excessive; \big
and \Big
suffice completely.
\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{equation}
\begin{aligned}
(\lambda_1-2n+l+4)(\lambda_1-n-l+2) &\leq l(n-l) \\
\implies \lambda_1^2+\lambda_1(6-3n)+(2n^2-2l-8n+8) &\leq 0\\
\implies \Bigl\{ 2\lambda_1-\bigl(3n-6-\sqrt{8l+n^2-4n+4}\,\bigr )\Bigr \} \quad&\\
\times\Bigl\{ 2\lambda_1-\bigl(3n-6+\sqrt{8l+n^2-4n+4}\,\bigr)\Bigr\} &\leq 0 \\
\implies \frac{3n-6-\sqrt{8l+n^2-4n+4}}{2}&\leq \lambda_1\\
\text{and}\quad
\frac{3n-6+\sqrt{8l+n^2-4n+4}}{2} &\geq \lambda_1\\
\end{aligned}
\end{equation}
\end{frame}
\end{document}
Addendum: Here's a second solution, inspired by @egreg's observation that a lot of space is taken up by the repeated term \sqrt{8l+n^2-4n+4}
. Replacing it with the symbol D
, rewriting the final row to use interval notation instead of a pair of inequalities, and aligning the rows on the \implies
symbols instead of on the inequality symbols yields the following result:
\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{equation}
\begin{aligned}[b]
&(\lambda_1-2n+l+4)(\lambda_1-n-l+2) \leq l(n-l)\\
\implies&\lambda_1^2-\lambda_1(3n-6)+(2n^2-2l-8n+8)\leq 0\\
\implies&\bigl( 2\lambda_1-(3n-6-D) \bigr)
\bigl( 2\lambda_1-(3n-6+D) \bigr) \leq 0 \\
\implies&\lambda_1\in\bigl[
(\tfrac{3}{2}n-3)-\tfrac{1}{2}D,
(\tfrac{3}{2}n-3)+\tfrac{1}{2}D \bigr]
\end{aligned}
\end{equation}
where $D=\sqrt{(n-2)^2+8l}$\,.
\end{frame}
\end{document}
Inside a split
you can specify an alignment point for each row using &
, this greatly enhances the legibility of multi-line equations. Also, you'd have to split the very long lines into two lines as well. In the following I did so and move those continuing lines further to the right using \qquad
.
\documentclass[]{beamer}
\usepackage[]{amsmath}
\begin{document}
\begin{frame}
\begin{equation}
\begin{split}
&(\lambda_1-2n+l+4)(\lambda_1-n-l+2)\leq l(n-l)
\\
\implies &\lambda_1^2+\lambda_1(6-3n)+(2n^2-2l-8n+8)\leq 0
\\
\implies &\bigg \{ 2\lambda_1-\bigg(3n-6-\sqrt{8l+n^2-4n+4}\bigg )\bigg \}
\\
&\qquad\cdot\bigg \{ 2\lambda_1-\bigg(3n-6+\sqrt{8l+n^2-4n+4}\bigg)\bigg \} \leq 0
\\
\implies &\frac{3n-6-\sqrt{8l+n^2-4n+4}}{2}
\\
&\qquad\leq \lambda_1 \leq \frac{3n-6+\sqrt{8l+n^2-4n+4}}{2}
\end{split}
\end{equation}
\end{frame}
\end{document}