# Split this equation up

Is there a nice way to deal with the following problem?

I have an equation that is too long for a line, but I can't split it up that easily, as it contains a fraction.

 $$\mathbb{E}(\cos^2) = \frac{\pi ((2 \beta (8 (\alpha +1)^2 \beta +(2 \alpha +1)^2)+3) \, _0\tilde{F}_1(;2;\beta ^2)+(\beta (16 (\alpha +1)^2 \beta ^2 -2 (4 \alpha (\alpha +2)+5) \beta +12 \alpha +9)-6) \, _0\tilde{F}_1(;3;\beta ^2))}{16 \beta },$$


Does anybody here have a nice idea, how we can make this look nicely? (Actually, I don't like the splitfrac command, it looks very unnatural to me).

Unless your document's text block is very wide, I believe it's necessary to split the entire equation twice, i.e., to typeset it across three lines. Note that I would use curly braces and square brackets in addition to the round parentheses in order to help the reader with the parsing of the material.

\documentclass{article}
\usepackage{amsmath} % for 'split' environment and '\smash' macro
\usepackage{amssymb} % for '\mathbb' macro
\begin{document}
$$\begin{split} \mathbb{E}(\cos^2) &= \smash{\frac{\pi}{16 \beta}} \bigl\{ \bigl[2 \beta (8 (\alpha +1)^2 \beta +(2 \alpha +1)^2)+3\bigr] \, _0\tilde{F}_1(;2;\beta ^2)\\ &\qquad\quad+\bigl[\beta (16 (\alpha +1)^2 \beta ^2 -2 (4 \alpha (\alpha +2)+5) \beta\\ &\qquad\qquad+12 \alpha +9)-6\bigr] \, _0\tilde{F}_1(;3;\beta ^2)\bigr\}, \end{split}$$
\end{document}


Something like this?

\documentclass{article}
\usepackage{mathtools,amsfonts}
\begin{document}
\begin{align}
\mathbb{E}(\cos²) &=  \frac{π (A_{0}\tilde{F}₁(;2;\beta²)
+B_{0}\tilde{F}₁(;3;β²))}{16 β},\\
\shortintertext{Where}
A &= (2 β (8 (α+1)² β+(2 \alpha+1)²)+3)\notag\\
B &= (β (16 (α+1)² β²  -2 (4 α(α+2)+5) β+12 α+9)-6) \notag
\end{align}

\end{document}


The above code compiles fine with winedt and mathgreek macro installed. For other editors use the following code:

\documentclass{article}
\usepackage{mathtools,amsfonts}
\begin{document}
\begin{align}
\mathbb{E}(\cos^2) &=  \frac{\pi (A_{0}\tilde{F}{1}(;2;\beta^2)
+B_{0}\tilde{F}_1(;3\beta^2))}{16\beta},\\
\shortintertext{where}
A &= 2 \beta (8 (\alpha+1)^2\beta+(2 \alpha+1)^2)+3\notag\\
B &= \beta (16 (\alpha+1)^2 \beta^2  -2 (4 \alpha(\alpha+2)+5) \alpha+12 \alpha+9)-6 \notag
\end{align}

\end{document}

• Hopefully my cut & paste is correct. – user11232 Nov 16 '14 at 13:11
• Maybe π --> \pi, ² --> ^{2}, ₁ --> _{1}, β --> \beta, α --> \alpha. – Svend Tveskæg Nov 16 '14 at 13:36
• Same observation as on @Bernard's code: You may want to provide a pointer on how this piece of code should be compiled so that all the non-ASCII unicode characters actually show up. – Mico Nov 16 '14 at 14:12
• No \pi, \alpha, or \beta symbols and no subscript or superscript numerals show up if I compile your code on my system (MacOSX10.10, MacTeX2014) with TeXworks as the front-end. – Mico Nov 16 '14 at 14:23
• No need for the surrounding parentheses in A and B. Also, Where should be where. – Svend Tveskæg Nov 16 '14 at 15:51

It all can be displayed on two lines if you use the multlined environment, from mathtools. I also adjusted the size of some pairs of parentheses, and replaced \tilde with \widetilde , that fits better capital letters:

\documentclass{article}
\usepackage{mathtools} %
\usepackage{amssymb} %
\usepackage{showframe}

\begin{document}

$$\begin{multlined} \mathbb{E}(\cos^2) = \frac{\pi}{16 \beta} \Bigl\{ \bigl[2\beta \bigl(8(\alpha + 1)^2 \beta +(2\alpha + 1)^2\bigl) + 3\bigr] \, _0\widetilde{F}_1(;2;\beta ^2) \\%[1.ex] +\bigl[\beta \bigl(16(\alpha + 1)^2 \beta ^2 -2 (4 \alpha (\alpha + 2) + 5) \beta + 12 \alpha + 9\bigr) - 6\bigr] \, _0\tilde{F}_1(;3;\beta ^2)\Bigr\}, \end{multlined}$$

\end{document}


• @Mico: Sorry! Once more, I forgot my WinEdt is configured to display Greek letters and some symbols in formulae as… Greek letters and symbols. It's corrected now. Thank you for pointing this. – Bernard Nov 16 '14 at 14:25
• That's OK. I've upvoted your answer now. :-) – Mico Nov 16 '14 at 14:25

Here is how I would do it:

\documentclass{article}

\usepackage{mathtools,amssymb}

\begin{document}

\begin{align*}
\mathbb{E}(\cos^{2})
&= \frac{\pi}{16\beta} \Bigl\{\bigl[2\beta(8(\alpha + 1)^{2}\beta + (2\alpha + 1)^{2}) + 3\bigr]
\mathstrut_{0}\tilde{F}_{1}(;2;\beta^{2})\\
&\hphantom{{}=\frac{1}{16\beta}\Bigl\{} + \bigl[\beta\bigl(16(\alpha + 1)^{2}\beta^{2} - 2(4\alpha(\alpha + 2) + 5)\beta + 12\alpha + 9\bigr) - 6\bigr]\\
&\hphantom{{}=\frac{1}{16\beta}\Bigl\{\ +}
\times \mathstrut_{0}\tilde{F}_{1}(;3;\beta^{2})\Bigr\}
\end{align*}

\end{document}


In case you have narrower margins, do the following:

\documentclass{article}

\usepackage[margin = 4cm]{geometry}
\usepackage{mathtools,amssymb}

\begin{document}

\begin{align*}
\mathbb{E}(\cos^{2})
&= \frac{\pi}{16\beta} \Bigl\{\bigl[2\beta(8(\alpha + 1)^{2}\beta + (2\alpha + 1)^{2}) + 3\bigr]
\mathstrut_{0}\tilde{F}_{1}(;2;\beta^{2})\\
&\hphantom{{}=\frac{1}{16\beta}\Bigl\{} + \bigl[\beta\bigl(16(\alpha + 1)^{2}\beta^{2} - 2(4\alpha(\alpha + 2) + 5)\beta + 12\alpha + 9\bigr) - 6\bigr]
\mathstrut_{0}\tilde{F}_{1}(;3;\beta^{2})\Bigr\}
\end{align*}

\end{document}


Notice the use of \hphantom and \mathstrut.

Update

In case you want to use Harish Kumar's answer (which I probably like more than my own), you should do as follows:

\documentclass{article}

\usepackage{mathtools,amsfonts}

\begin{document}

\begin{align*}
\mathbb{E}(\cos^{2})
&= \frac{\pi}{16\beta}
\bigl(A\,\mathstrut_{0}\widetilde{F}_{1}(;2;\beta^{2}) +
B\,\mathstrut_{0}\widetilde{F}_{1}(;3;\beta^{2})\bigr)\\
\shortintertext{where}
A &= 2\beta\bigl(8(\alpha + 1)^{2}\beta + (2\alpha + 1)^{2}\bigr) + 3,\\
B &= \beta\bigl(16(\alpha + 1)^{2}\beta^{2} - 2(4\alpha(\alpha + 2) + 5)\beta
+ 12\alpha + 9\bigr) - 6.
\end{align*}

\end{document}


• +1 for the last version, with π / 16 β moved to the front and the coefficients A and B pulled out of the main formula. – Ilmari Karonen Nov 17 '14 at 15:23