# equation crossed the margin (A very very long equation)

Here is my equation:

\documentclass{article}
\usepackage{amsmath} % for 'align*' environment

\begin{document}

$$\label{eq:Vo} V_o = \frac{ L_3 R_3 R_L + L_3 R_2 R_L s + R_2 R_3 R_L}{X}$$
where
\begin{align*}
X&=\bigl( C_2 C_1 L_2 L_3 R_1 R_3 R_L + C_2 C_1 L_2 L_3 R_1 R_2 R_L + C_2 C_1 L_1 L_3 R_1 R_3 R_L + C_2 C_1 L_1 L_3 R_1 R_2 R_L + C_2 C_1 L_1 L_2 R_1 R_3 R_L + C_2 C_1 L_1 L_2 R_1 R_2 R_L\bigr) s^4 \\
&\quad+ \bigl(C_2 C_1 L_2 R_1 R_2 R_3 R_L + C_2 C_1 L_1 R_1 R_2 R_3 R_L + C_1 L_2 L_3 R_1 R_3 + C_1 L_2 L_3 R_1 R_2 + C_1 L_1 L_3 R_1 R_3 + C_1 L_1 L_3 R_1 R_2 + C_1 L_1 L_2 R_1 R_3 + C_1 L_1 L_2 R_1 R_2 + C_2 L_2 L_3 R_3 R_L + C_2 L_2 L_3 R_2 R_L + C_2 L_1 L_3 R_3 R_L + C_2 L_1 L_3 R_2 R_L + C_2 L_1 L_2 R_3 R_L + C_2 L_1 L_2 R_2 R_L\bigr) s^3 \\
&\quad+ \bigl(C_1 L_3 R_1 R_3 R_L + C_1 L_3 R_1 R_2 R_L + C_1 L_2 R_1 R_2 R_3 + C_1 L_1 R_1 R_3 R_L + C_1 L_1 R_1 R_2 R_L + C_1 L_1 R_1 R_2 R_3 + C_2 L_3 R_1 R_3 R_L + C_2 L_3 R_1 R_2 R_L + C_2 L_2 R_2 R_3 R_L + C_2 L_2 R_1 R_3 R_L + C_2 L_2 R_1 R_2 R_L + C_2 L_1 R_2 R_3 R_L + L_2 L_3 R_3 + L_2 L_3 R_2 + L_1 L_3 R_3 + L_1 L_3 R_2 + L_1 L_2 R_3 + L_1 L_2 R_2\bigr) s^2 \\
&\quad+ \bigl(C_1 R_1 R_2 R_3 R_L + C_2 R_1 R_2 R_3 R_L + L_3 R_3 R_L + L_3 R_2 R_L + L_3 R_1 R_3 + L_3 R_1 R_2 + L_2 R_2 R_3 + L_2 R_1 R_3 + L_2 R_1 R_2 + L_1 R_3 R_L + L_1 R_2 R_L + L_1 R_2 R_3\bigr) s + \bigl(R_2 R_3 R_L + R_1 R_3 R_L + R_1 R_2 R_L + R_1 R_2 R_3\bigr)
\end{align*}

\end{document}


I tried few methods that were the answers to some other questions on this same forum, but not worked, the equation runs out of margin.

Why cant there be a method which allows the ex: /quad to continue on to the next line when the margin end is encountered ?

Does someone know a trick which does stop at margin and continue where it had left from a new line until it ends and a new /quad begins.

• please fix the example so it is a complete (small) document so people can reproduce the problem and test answers (in particular you would need very different answers for two column or one column, most likely) – David Carlisle Nov 1 '16 at 23:04

You could do this, but is it not possible to change the notation? No one is going to read this. With this layout if one of the R_2 should be a C_1 it would be very hard to ever spot the error...

\documentclass{amsart}
\begin{document}

$$\label{eq:serial_Vo} V_o = \frac{ L_3 R_3 R_L + L_3 R_2 R_L s + R_2 R_3 R_L}{X}$$
where
\begin{flushleft}
\hangindent=3em
$X=\bigl( C_2 C_1 L_2 L_3 R_1 R_3 R_L + C_2 C_1 L_2 L_3 R_1 R_2 R_L + C_2 C_1 L_1 L_3 R_1 R_3 R_L + C_2 C_1 L_1 L_3 R_1 R_2 R_L + C_2 C_1 L_1 L_2 R_1 R_3 R_L + C_2 C_1 L_1 L_2 R_1 R_2 R_L\bigr) s^4 + \bigl(C_2 C_1 L_2 R_1 R_2 R_3 R_L + C_2 C_1 L_1 R_1 R_2 R_3 R_L + C_1 L_2 L_3 R_1 R_3 + C_1 L_2 L_3 R_1 R_2 + C_1 L_1 L_3 R_1 R_3 + C_1 L_1 L_3 R_1 R_2 + C_1 L_1 L_2 R_1 R_3 + C_1 L_1 L_2 R_1 R_2 + C_2 L_2 L_3 R_3 R_L + C_2 L_2 L_3 R_2 R_L + C_2 L_1 L_3 R_3 R_L + C_2 L_1 L_3 R_2 R_L + C_2 L_1 L_2 R_3 R_L + C_2 L_1 L_2 R_2 R_L\bigr) s^3 + \bigl(C_1 L_3 R_1 R_3 R_L + C_1 L_3 R_1 R_2 R_L + C_1 L_2 R_1 R_2 R_3 + C_1 L_1 R_1 R_3 R_L + C_1 L_1 R_1 R_2 R_L + C_1 L_1 R_1 R_2 R_3 + C_2 L_3 R_1 R_3 R_L + C_2 L_3 R_1 R_2 R_L + C_2 L_2 R_2 R_3 R_L + C_2 L_2 R_1 R_3 R_L + C_2 L_2 R_1 R_2 R_L + C_2 L_1 R_2 R_3 R_L + L_2 L_3 R_3 + L_2 L_3 R_2 + L_1 L_3 R_3 + L_1 L_3 R_2 + L_1 L_2 R_3 + L_1 L_2 R_2\bigr) s^2 + \bigl(C_1 R_1 R_2 R_3 R_L + C_2 R_1 R_2 R_3 R_L + L_3 R_3 R_L + L_3 R_2 R_L + L_3 R_1 R_3 + L_3 R_1 R_2 + L_2 R_2 R_3 + L_2 R_1 R_3 + L_2 R_1 R_2 + L_1 R_3 R_L + L_1 R_2 R_L + L_1 R_2 R_3\bigr) s + \bigl(R_2 R_3 R_L + R_1 R_3 R_L + R_1 R_2 R_L + R_1 R_2 R_3\bigr)$
\end{flushleft}

\end{document}

• I know that spotting something in this equation is hard. But C represents capacitor value and R represent resistor value and they have to be kept as they are. It just represents the system, I dont know what the reader gets other than the complexity of the system, but further explanation is what clears the mysterious air around these kind of long equations. But still I have to represent the system in terms of equation so I am just obliged to put this. I hope I explained what you asked. Thanks a lot. – cppiscute Nov 2 '16 at 18:01