# How to split long expression inside left brace?

Please find below the equation I want to write on my Latex document but unfortunately i can't split the 2 expressions inside the left brace because they are too long

$$\begin{split} &F\left(\lambda,\alpha,\beta,c\right) \triangleq \int_0^{\infty}\int_{-\infty}^{\frac{\lambda}{2\gamma_{rd}}} p\left(\gamma_{rd}\right)p\left(y_{rd}\mid \gamma_{rd},c\right)dy_{rd}d\gamma_{rd}= \\ &\left\lbrace \begin{array}{ll} 1 + \displaystyle{\frac{1}{2}.\{\frac{\mu\left[c\right]\left(\exp\left(-\alpha\beta\right)-1\right) - \sqrt{B_{rd}}}{\sqrt{B_{rd}}} + \sqrt{\frac{\pi}{2}}.\exp\left(-\alpha\beta\right).\left(\frac{\lambda}{2\sqrt{\alpha}} - \mu\left[c\right].\sqrt{\alpha}\right).\exp\left(\iota_{\alpha,\beta}\left(\lambda\right)^{2}\right)erfc\left(\iota_{\alpha,\beta}^{+}\left(\lambda\right)\right)\}.\exp\left(\beta_{rd}^{+}\left(c\right)\lambda\right)} & \mbox{if }\lambda\geq0\\ \displaystyle{\frac{1}{2}.\{\frac{\mu\left[c\right]\left(\exp\left(-\alpha\beta\right)-1\right) + \sqrt{B_{rd}}}{\sqrt{B_{rd}}} + \sqrt{\frac{\pi}{2}}.\exp\left(-\alpha\beta\right).\left(\frac{\lambda}{2\sqrt{\alpha}} - \mu\left[c\right].\sqrt{\alpha}\right).\exp\left(\iota_{\alpha,\beta}\left(\lambda\right)^{2}\right)erfc\left(\iota_{\alpha,\beta}^{+}\left(\lambda\right)\right)\}.\exp\left(\beta_{rd}^{-}\left(c\right)\lambda\right)} & \mbox{if } \lambda<0 \end{array}\right. \end{split} \label{F function}$$


• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – user31729 Sep 11 '14 at 22:54
• This question has also been posted to LaTeX-Community. – Johannes_B Sep 11 '14 at 22:58

Here's my proposal. First of all, remove almost all \left and \right, keeping only a couple of them.

Then use an inner aligned with bottom reference point for the two big functions, so they can be split in pieces.

Some notes: the low dot is never used for denoting multiplication; either nothing or \cdot (somebody uses \times when it is at the end of a line, I don't agree). Also “erfc” should be a function name, which is solved with a suitable \DeclareMathOperator.

\documentclass{article}
\usepackage{amsmath,mathtools,amssymb}

\DeclareMathOperator{\erfc}{erfc}

\begin{document}
\begin{split} &F(\lambda,\alpha,\beta,c) \triangleq \int_0^{\infty}\int_{-\infty}^{\frac{\lambda}{2\gamma_{rd}}} p(\gamma_{rd})p(y_{rd}\mid \gamma_{rd},c)\,dy_{rd}\,d\gamma_{rd}= \\ &\qquad \begin{dcases*} \begin{aligned}[b] 1 + \frac{1}{2} \biggl\{ &\frac{\mu[c](\exp(-\alpha\beta)-1) - \sqrt{B_{rd}}}{\sqrt{B_{rd}}} +{}\\ &\sqrt{\frac{\pi}{2}}\exp(-\alpha\beta) \left(\frac{\lambda}{2\sqrt{\alpha}} - \mu[c]\sqrt{\alpha}\right)\cdot{}\\ &\exp\bigl(\iota_{\alpha,\beta}(\lambda)^{2}\bigr) \erfc\bigl(\iota_{\alpha,\beta}^{+}(\lambda)\bigr)\biggl\} \exp\bigl(\beta_{rd}^{+}(c)\lambda\bigr) \end{aligned} & if \lambda\geq0 \\[4ex] \begin{aligned}[b] \frac{1}{2}\biggl\{ &\frac{\mu[c](\exp(-\alpha\beta)-1) + \sqrt{B_{rd}}}{\sqrt{B_{rd}}} +{}\\ &\sqrt{\frac{\pi}{2}}\exp(-\alpha\beta) \left(\frac{\lambda}{2\sqrt{\alpha}} - \mu[c]\sqrt{\alpha}\right)\cdot{}\\ &\exp\bigl(\iota_{\alpha,\beta}(\lambda)^{2}\bigr) \erfc\bigl(\iota_{\alpha,\beta}^{+}(\lambda)\bigr)\biggl\} \exp\bigl(\beta_{rd}^{-}(c)\lambda\bigr) \end{aligned} & if \lambda<0 \end{dcases*} \end{split} \label{F function}
\end{document}


egreg already fixed the actual problem. However, in my humble opinion, if it is going to be ugly at least you should make it worth it.

So I would propose to type it in the following format such that the reader at the very least would have the chance to realize what hit them;

\documentclass{article}
\usepackage{mathtools,amssymb,lipsum}
\DeclareMathOperator{\erfc}{erfc}

\begin{document}
\lipsum[1]
$$F(\lambda,\alpha,\beta,c) \triangleq \int_0^{\infty}\int_{-\infty}^{\frac{\lambda}{2\gamma_{rd}}} p(\gamma_{rd})p(y_{rd}\mid \gamma_{rd},c)\,dy_{rd}\,d\gamma_{rd}$$
For nonnegative $\lambda$, this amounts to;
\begin{gather}
\frac{e^{(\beta_{rd}^{+}(c)\lambda)}}{2}\biggl\{
-1+\frac{\mu[c]e^{-\alpha\beta-1}}{\sqrt{B_{rd}}} +
\sqrt{\frac{\pi}{2}}e^{(\iota_{\alpha,\beta}(\lambda)^{2}-\alpha\beta)}
\left(\frac{\lambda}{2\sqrt{\alpha}} - \mu[c]\sqrt{\alpha}\right)
\erfc\bigl(\iota_{\alpha,\beta}^{+}(\lambda)\bigr)\biggl\}
\shortintertext{or for negative $\lambda$}
\frac{e^{(\beta_{rd}^{-}(c)\lambda)}}{2}\biggl\{
1+\frac{\mu[c]e^{-\alpha\beta-1}}{\sqrt{B_{rd}}} +
\sqrt{\frac{\pi}{2}}e^{(\iota_{\alpha,\beta}(\lambda)^{2}-\alpha\beta)}
\left(\frac{\lambda}{2\sqrt{\alpha}} - \mu[c]\sqrt{\alpha}\right)
\erfc\bigl(\iota_{\alpha,\beta}^{+}(\lambda)\bigr)\biggl\}
\end{gather}
\end{document}


• The position of equation numbers does not look elegant, IMHO. :-) – kiss my armpit Sep 12 '14 at 18:49
• @Ohmyghost Elegance is the least concern with these equations. – percusse Sep 14 '14 at 12:54