3

I am trying to reduce the size of math equations so as to fit them within the margin of a page. I took the idea of this command from here. For this command to work for multiple equations in align environment we need to put resize box command before every equation written within $...$. Is it possible to apply this command directly on the whole set of equations? The code is as follow:

\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{amsmath}
\begin{document}
\begin{align}
&\resizebox{0.91\hsize}{!}{$u=\left(\,\frac{d_{{2}}{\lambda}^{2}}{4}-d_{{2}}\mu\right)\left({\frac { c_{{1}}\cosh \left( \frac{1}{2}\,\sqrt {{\lambda}^{2}-4\,\mu
}x \right) +c_{{2}}\sinh \left( \frac{1}{2}\,\sqrt {{\lambda}^{2}-4\,\mu}x
 \right)  }{  c_{{1}}\sinh \left( \frac{1}{2}\,\sqrt {{
\lambda}^{2}-4\,\mu}x \right) +c_{{2}}\cosh \left( \frac{1}{2}\,\sqrt {{
\lambda}^{2}-4\,\mu}x \right) }}\right)^{2}-\,\frac{d_{{2}}{\lambda}^{2
}}{6}+\,\frac{2d_{{2}}\mu}{3}$}\\
&\resizebox{0.91\hsize}{!}{$v= \left( \,\frac{e_{{2}}{\lambda}^{2}}{4}-e_{{2}}\mu \right)\left({\frac { c_{{1}}\cosh \left( \frac{1}{2}\,\sqrt {{\lambda}^{2}-4\,\mu
}x \right) +c_{{2}}\sinh \left( \frac{1}{2}\,\sqrt {{\lambda}^{2}-4\,\mu}x
 \right)  }{  c_{{1}}\sinh \left( \frac{1}{2}\,\sqrt {{
\lambda}^{2}-4\,\mu}x \right) +c_{{2}}\cosh \left( \frac{1}{2}\,\sqrt {{
\lambda}^{2}-4\,\mu}x \right) }}\right)^{2}-\,\frac{2e_{{2}}{
\lambda}^{2}}{3}+\,\frac{2e_{{2}}\mu}{3}$}
\end{align}
\begin{align}
&u=\left(\,\frac{d_{{2}}{\lambda}^{2}}{4}-d_{{2}}\mu\right)\left({\frac { c_{{1}}\cosh \left( \frac{1}{2}\,\sqrt {{\lambda}^{2}-4\,\mu
}x \right) +c_{{2}}\sinh \left( \frac{1}{2}\,\sqrt {{\lambda}^{2}-4\,\mu}x
 \right)  }{  c_{{1}}\sinh \left( \frac{1}{2}\,\sqrt {{
\lambda}^{2}-4\,\mu}x \right) +c_{{2}}\cosh \left( \frac{1}{2}\,\sqrt {{
\lambda}^{2}-4\,\mu}x \right) }}\right)^{2}-\,\frac{d_{{2}}{\lambda}^{2
}}{6}+\,\frac{2d_{{2}}\mu}{3}\\
&v= \left( \,\frac{e_{{2}}{\lambda}^{2}}{4}-e_{{2}}\mu \right)\left({\frac { c_{{1}}\cosh \left( \frac{1}{2}\,\sqrt {{\lambda}^{2}-4\,\mu
}x \right) +c_{{2}}\sinh \left( \frac{1}{2}\,\sqrt {{\lambda}^{2}-4\,\mu}x
 \right)  }{  c_{{1}}\sinh \left( \frac{1}{2}\,\sqrt {{
\lambda}^{2}-4\,\mu}x \right) +c_{{2}}\cosh \left( \frac{1}{2}\,\sqrt {{
\lambda}^{2}-4\,\mu}x \right) }}\right)^{2}-\,\frac{2e_{{2}}{
\lambda}^{2}}{3}+\,\frac{2e_{{2}}\mu}{3}
\end{align}
\end{document}
David Carlisle
  • 757,742
IgotiT
  • 453

3 Answers3

7

Here is an alternate presentation that you could consider for this specfic case:

enter image description here

Code:

\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{mathtools}

\begin{document} \begin{align} u&=\biggl(\frac{d_{{2}}{\lambda}^{2}}{4}-d_{{2}}\mu\biggr) C - \frac{d_{{2}}{\lambda}^{2}}{6}+ \frac{2d_{{2}}\mu}{3} \ v&= \biggl( \frac{e_{{2}}{\lambda}^{2}}{4}-e_{{2}}\mu \biggr) C - \frac{2e_{{2}}{\lambda}^{2}}{3}+\frac{2e_{{2}}\mu}{3} \ u&=\biggl(\frac{d_{{2}}{\lambda}^{2}}{4}-d_{{2}}\mu\biggr) C -\frac{d_{{2}}{\lambda}^{2}}{6}+\frac{2d_{{2}}\mu}{3} \ v&= \biggl( \frac{e_{{2}}{\lambda}^{2}}{4}-e_{{2}}\mu \biggr) C -\frac{2e_{{2}}{\lambda}^{2}}{3}+\frac{2e_{{2}}\mu}{3} \ \shortintertext{where} C &= \biggl({\frac { c_{{1}}\cosh ( \frac{1}{2}\sqrt {{\lambda}^{2}-4\mu }x ) +c_{{2}}\sinh ( \frac{1}{2}\sqrt {{\lambda}^{2}-4\mu}x) } { c_{{1}}\sinh ( \frac{1}{2}\sqrt {{ \lambda}^{2}-4\mu}x ) +c_{{2}}\cosh ( \frac{1}{2}\sqrt {{ \lambda}^{2}-4\mu}x ) }}\biggr)^{!2} \end{align} \end{document}

Peter Grill
  • 223,288
6

there is no need to apply scaling here, just linebreak to stay within bounds

enter image description here

\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{amsmath}
\begin{document}
\begin{align}
\begin{split}
u&=\biggl(\,\frac{d_{{2}}{\lambda}^{2}}{4}-d_{{2}}\mu\biggr)
   \biggl({\frac { c_{{1}}\cosh ( \frac{1}{2}\,\sqrt {{\lambda}^{2}-4\,\mu
}x ) +c_{{2}}\sinh ( \frac{1}{2}\,\sqrt {{\lambda}^{2}-4\,\mu}x)  }
{  c_{{1}}\sinh ( \frac{1}{2}\,\sqrt {{
\lambda}^{2}-4\,\mu}x ) +c_{{2}}\cosh ( \frac{1}{2}\,\sqrt {{
\lambda}^{2}-4\,\mu}x ) }}\biggr)^{2}\\
&\qquad-\,\frac{d_{{2}}{\lambda}^{2
}}{6}+\,\frac{2d_{{2}}\mu}{3}
\end{split}\\
\begin{split}
v&= \biggl( \,\frac{e_{{2}}{\lambda}^{2}}{4}-e_{{2}}\mu \biggr)
\biggl({\frac { c_{{1}}\cosh ( \frac{1}{2}\,\sqrt {{\lambda}^{2}-4\,\mu
}x ) +c_{{2}}\sinh ( \frac{1}{2}\,\sqrt {{\lambda}^{2}-4\,\mu}x
 )  }{  c_{{1}}\sinh ( \frac{1}{2}\,\sqrt {{
\lambda}^{2}-4\,\mu}x ) +c_{{2}}\cosh ( \frac{1}{2}\,\sqrt {{
\lambda}^{2}-4\,\mu}x ) }}\biggr)^{2}\\
&\qquad-\,\frac{2e_{{2}}{
\lambda}^{2}}{3}+\,\frac{2e_{{2}}\mu}{3}
\end{split}
\\
\begin{split}
u&=\biggl((\,\frac{d_{{2}}{\lambda}^{2}}{4}-d_{{2}}\mu\biggr)
\biggl({\frac { c_{{1}}\cosh ( \frac{1}{2}\,\sqrt {{\lambda}^{2}-4\,\mu
}x ) +c_{{2}}\sinh ( \frac{1}{2}\,\sqrt {{\lambda}^{2}-4\,\mu}x
 )  }{  c_{{1}}\sinh ( \frac{1}{2}\,\sqrt {{
\lambda}^{2}-4\,\mu}x ) +c_{{2}}\cosh ( \frac{1}{2}\,\sqrt {{
\lambda}^{2}-4\,\mu}x ) }}\biggr)^{2}\\
&\qquad-\,\frac{d_{{2}}{\lambda}^{2
}}{6}+\,\frac{2d_{{2}}\mu}{3}
\end{split}\\
\begin{split}
v&= \biggl(( \,\frac{e_{{2}}{\lambda}^{2}}{4}-e_{{2}}\mu \biggr)
\biggl({\frac { c_{{1}}\cosh ( \frac{1}{2}\,\sqrt {{\lambda}^{2}-4\,\mu
}x ) +c_{{2}}\sinh ( \frac{1}{2}\,\sqrt {{\lambda}^{2}-4\,\mu}x
 )  }{  c_{{1}}\sinh ( \frac{1}{2}\,\sqrt {{
\lambda}^{2}-4\,\mu}x ) +c_{{2}}\cosh ( \frac{1}{2}\,\sqrt {{
\lambda}^{2}-4\,\mu}x ) }}\biggr)^{2}\\
&\qquad-\,\frac{2e_{{2}}{
\lambda}^{2}}{3}+\,\frac{2e_{{2}}\mu}{3}
\end{split}
\end{align}
\end{document}
David Carlisle
  • 757,742
5

Looking in nice David Carlisle solution I observe, that the most space consuming part in all four equations are the same:

\frac{c_{1}\cosh(\frac{1}{2} \sqrt{\lambda^{2}-4\,\mu}x) +
                    c_{2}\sinh(\frac{1}{2} \sqrt{\lambda^{2}-4\,\mu}x)}
           {c_{1}\sinh(\frac{1}{2} \sqrt{\lambda^{2}-4\,\mu}x ) +
                    c_{2}\cosh (\frac{1}{2} \sqrt{\lambda^{2}-4\,\mu}x)}

If this part you replace with some variable, for example D, than you can write your equation system for example like this:

\documentclass[12pt]{article}
\usepackage{amsmath}

\begin{document}
Let
\begin{equation}
D = \left(\frac{c_{1}\cosh(\frac{1}{2} \sqrt{\lambda^{2}-4\,\mu}x) +
                        c_{2}\sinh(\frac{1}{2} \sqrt{\lambda^{2}-4\,\mu}x)}
               {c_{1}\sinh(\frac{1}{2} \sqrt{\lambda^{2}-4\,\mu}x ) +
                        c_{2}\cosh (\frac{1}{2} \sqrt{\lambda^{2}-4\,\mu}x)}
    \right)\, ,
\end{equation} 
than:
    \begin{align}
u & = \left(\frac{d_{2}{\lambda}^{2}}{4}-d_{2}\mu\right)
        D^{2} - \frac{d_{2}{\lambda}^{2}}{6} + \frac{2d_{2}\mu}{3}  \\
v & = \left(\frac{e_{2}\lambda^{2}}{4}-e_{2}\mu \right)
        D^{2} - \frac{2e_{2}\lambda^{2}}{3} + \frac{2e_{2}\mu}{3}   \\
u & = \left(\frac{d_{2}{\lambda}^{2}}{4} - d_{2}\mu\right)
        D^{2} - \frac{d_{2}\lambda^{2}}{6} + \frac{2d_{2}\mu}{3}   \\
v & = \left(\frac{e_{2}\lambda^{2}}{4} - e_{2}\mu \right)
        D^{2} - \frac{2e_{2}\lambda^{2}}{3} + \frac{2e_{2}\mu}{3}
    \end{align}
\end{document}

which gives:

enter image description here

By the way, in above code I clean-up all surplus braces and spaces and wrong parenthesis ...

Edit: When I upload my answer I for unknown reason didn't see almost the same answer of Peter Grill. In doubt what to do now, I first delete my answer but later I observe (very) small differences in code and form (probably form of Peter is more correct) and on the end decided to left answer ...

Zarko
  • 296,517