Math & ScienceHow to split long expression inside left brace?

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
fanascom
Posts: 1
Joined: Thu Sep 11, 2014 6:25 pm

How to split long expression inside left brace?

Post by fanascom »

Hi dears,

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

Code: Select all

\begin{equation}
\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}
\end{equation}
Could you please help, I tried to put another split inside the array but without success?

Thanks in advance

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

How to split long expression inside left brace?

Post by Johannes_B »

This Question has also been posted to TeX.SX.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

How to split long expression inside left brace?

Post by Stefan Kottwitz »

Hi fanascom,

welcome to the forum!

To also have a solution here, I cite what Enrico suggested at the above linked crosspost:
  • remove almost all \left and \right (see below what's left),
  • use an inner aligned environment with bottom alignment option (reference point) for the two big functions, so they can be split,
  • in addition, erfc should be an operator with upshape font (use \DeclareMathOperator).

Code: Select all

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

\DeclareMathOperator{\erfc}{erfc}

\begin{document}
\begin{equation}
\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{equation}
\end{document}
The output (click on the image to expand the preview):
split-expression.png
split-expression.png (65.52 KiB) Viewed 4398 times
If you would have further questions, let us know.

Stefan
LaTeX.org admin
Post Reply