1

I've been trying to split equation as follow in align but it doesn't seem to be working. I'm getting "! Missing } inserted" error. Can someone please help here. Thanks

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
    P_{out} &=P\big[\mathcal{I} < R \big]\nonumber\\
    \begin{split}       
        P_{out} &=P\bigg[\frac{1}{2}\log_2{{\bigg[}1+ \\ 
        &\quad \gamma p_s g_{sd}+\max_r\frac{{\gamma}^2(p_s p_r g_{sr} g_{rd}) }{{\gamma}(p_s g_{sr} + p_r g_{rd})+1}{\bigg]}}<R\bigg] \nonumber \\
     \end{split}\\   
           &=P\bigg[ p_s g_{sd} +\max_r\frac{{\gamma}^2(p_s p_r g_{sr} g_{rd})}{{\gamma}(p_s g_{sr} + p_r g_{rd})+1} < \frac{2^{2R}-1}{\gamma} \bigg] \nonumber\\
        P_{out} &=P\bigg[ \max_r\frac{{\gamma}^2(p_s p_r g_{sr} g_{rd})}{{\gamma}(p_s g_{sr} + p_r g_{rd})+1} < \rho - p_s g_{sd} \bigg}
\end{align}
\end{document}
2
  • There is an abundance of braces {}, many of them are not necessary. Does your editor highlight matching braces? If yes, look up whether all braces are matched. Aug 8, 2016 at 9:33
  • You can't do \bigg}. It has to be \bigg\}. Aug 8, 2016 at 9:38

1 Answer 1

1

I have reformatted the source a little and replaced the incorrect \bigg} with \biggr].

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
  P_{\text{out}} &= P\bigr[\mathcal{I} < R \bigr]\nonumber\\
  P_{\text{out}} &= P \biggl[
                      \frac{1}{2} \log_2 \biggl( 1+ \gamma p_s g_{sd} + \max_r\frac{\gamma^2(p_s p_r g_{sr} g_{rd}) }{\gamma(p_s g_{sr} + p_r g_{rd})+1} \biggr)
                      < R
                    \biggr] \nonumber \\
                 &= P \biggl[
                      p_s g_{sd} + \max_r \frac{\gamma^2(p_s p_r g_{sr} g_{rd})}{\gamma(p_s g_{sr} + p_r g_{rd})+1}
                      < \frac{2^{2R}-1}{\gamma}
                    \biggr] \nonumber\\
  P_{\text{out}} &= P \biggl[
                      \max_r\frac{\gamma^2(p_s p_r g_{sr} g_{rd})}{\gamma(p_s g_{sr} + p_r g_{rd})+1}
                      < \rho - p_s g_{sd}
                    \biggr]
\end{align}
\end{document}

enter image description here


To split the second line use aligned (split won't work). To find out why there is \! before \begin{aligned} consults Why is there a \, space at the beginning of the “aligned” environment?.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
  P_{\text{out}} &= P\bigr[\mathcal{I} < R \bigr]\nonumber\\
  P_{\text{out}} &= \!\begin{aligned}[t]
                      P \biggl[
                        &\frac{1}{2} \log_2 \biggl( 1+ \gamma p_s g_{sd} \\
                          &\quad + \max_r\frac{\gamma^2(p_s p_r g_{sr} g_{rd}) }{\gamma(p_s g_{sr} + p_r g_{rd})+1} \biggr)
                        < R
                      \biggr]
                    \end{aligned} \nonumber \\
                 &= P \biggl[
                      p_s g_{sd} + \max_r \frac{\gamma^2(p_s p_r g_{sr} g_{rd})}{\gamma(p_s g_{sr} + p_r g_{rd})+1}
                      < \frac{2^{2R}-1}{\gamma}
                    \biggr] \nonumber\\
  P_{\text{out}} &= P \biggl[
                      \max_r\frac{\gamma^2(p_s p_r g_{sr} g_{rd})}{\gamma(p_s g_{sr} + p_r g_{rd})+1}
                      < \rho - p_s g_{sd}
                    \biggr]
\end{align}
\end{document}

enter image description here

5
  • Thank you. It's my first post on this forum so I'm sorry for this formatting inconvenience.
    – MA Jadoon
    Aug 8, 2016 at 9:45
  • Actually I'm trying to split the second equation before "max_r ... "
    – MA Jadoon
    Aug 8, 2016 at 9:46
  • @MAJadoon But why? It fits within the line width so there is no need for a line break. Aug 8, 2016 at 9:47
  • I'm using 2 column page and second equation is getting out of column here.
    – MA Jadoon
    Aug 8, 2016 at 9:51
  • @MAJadoon See my updated answer. Aug 8, 2016 at 9:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .