# Large equation goes out of margin

## Equation is going out of margin (page)

\documentclass{article}
\usepackage[intlimits]{amsmath}
\usepackage{mathrsfs,amssymb}
\usepackage{icomma}
\usepackage{mathtools}
\usepackage{theorem}
\numberwithin{equation}{section}
\usepackage{commath}
\usepackage{bm}

\begin{document}
$$\label{Equation 1} Y\left ( \delta_0,A,\delta_1,\delta_3,T_{min} \right )= (A_1*(\delta_0*sin(\delta_0) + \delta_0 *sin(\delta_1) + w*cos(\delta_3)*1i)) + (A*exp(-T_{min}*\delta_0)*(sin(T_{min}*w) + cos(T_{min}*w)*1i)* (\delta_0*cos(\phi - T_{min}*\delta_0) + w*cos(\phi - T_{min}*\delta_0)*1i + \omega_0*sin(\phi - T_{min}*\omega_0))*1i))/ (\delta_0^2 + \delta_1*w*2i - w_1^2 + \delta_0^2)$$
\end{document}

• Then you'll need to change this from an equation to an align construction. LaTeX does not auto break displayed formulas as that is very subjective and thus better left to a human. Nov 13, 2019 at 16:33
• I tried with aligning but it dont give with break Nov 13, 2019 at 16:47
• i have seen some question regarding this issue. People used \bigg1 but i dont know how to use it Nov 13, 2019 at 16:50
• problem solved. \multline* is used to write a big equation. Nov 13, 2019 at 17:02
• You might also be interested in \split Nov 13, 2019 at 20:24

Not sure I interpreted correctly your formula, but in addition of the multline environment, I nested it in the fleqn environment, from nccmath, which uses locally the fleqn option from amsmath, to ensure the multline starts at the left margin. Next, I used \splitfrac from mathtools (in medsize), and removed the * symbols, which are not used in maths for multiplication, to save space – I just left the *1i, because I have idea what they correspond to.

\documentclass{article}

\usepackage[intlimits]{amsmath}
\usepackage{mathrsfs,amssymb}
\usepackage{icomma}
\usepackage{mathtools, nccmath}
\usepackage{theorem}
\numberwithin{equation}{section}
\usepackage{commath}
\usepackage{bm}

\begin{document}

\begin{fleqn}
\begin{multline}\label{Equation 2}
Y( \delta_0,A,\delta_1,\delta_3,T_{\min} )= \Bigl(A_1\bigl(\delta_0\sin(\delta_0) + \delta_0\sin(\delta_1) + w\cos(\delta_3)*1i\bigr)\Bigr) + \\
+ \frac{\medmath{\splitfrac{%
\Bigl (A\exp(-T_{\min} \delta_0) \bigl(\sin(T_{\min} w) + \cos(T_{\min} w)*1i\bigr)
\bigl(\delta_0\cos(\phi - T_{\min}\delta_0)}{{} + w\cos(\phi - T_{\min} \delta_0)*1i +
\omega_0\sin(\phi - T_{\min}\omega_0)\bigr)*1i \Bigr)}}}
{(\delta_0^2 + \delta_1 w2i - w_1^{2} + \delta_0^2)\rule{0pt}{2.5ex}}
\end{multline}
\end{fleqn}

\end{document}


• Nit-picking: the plus sign at the end of the first line should instead be at the beginning of the second line. Nov 13, 2019 at 20:53
• @barbarabeeton: I know – it is actually in both lines. I thought it would be clearer, due to the use of \splitfrac. The reader knows something comes afterwards. Nov 13, 2019 at 21:26