# Missing } and { inserted when using split

I'm trying to split an equation but get errors stating:

! Missing } inserted.<inserted text>} \end{split}
! Missing { inserted.<inserted text>{ \end{split}

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$\begin{split} \mbox{G}_{diff,t} = \mbox{DHI}\cdot{((\mbox{A}_{i}\cdot{cos(\theta)}))&+((Y\cdot{cos(\beta)}) \\ +((1-\mbox{T}_{r} & -\mbox{Y})\cdot{cos^{2}(\beta{/2})})} \end{split}$$
\end{document}

• Why are you using \mbox{G}? If it's a math variable, it should be in italics. Dec 5 '16 at 13:15

Besides the wrong \cdot{...}, you are overusing parentheses, which make much harder to interpret the formula. There's also generally little need of \cdot, by the way.

Math variables are traditionally typeset in italics, in order to distinguish them better from text. To the contrary, a textual subscript should be upright. Likewise, functions like sine, cosine or logarithm should have their symbol upright: \sin, \cos and \log are predefined for those ones.

In you context, I assume “DHI” stands for a single variable and not for the product of three of them: in this case, \mathit{DHI} is the proper input.

The alignment point should be at the equals sign, with a double quad for the second line.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$\begin{split} G_{\mathrm{diff},t} &= \mathit{DHI}\cdot A_{i}\cos\theta + Y\cos\beta \\ &\qquad +(1-T_{r}-Y) \cos^{2}(\beta/2) \end{split}$$
\end{document}


Compare with your output after removing the wrong braces:

Two incidental curly brackets are located in your equation and should not be: the first one, {, is after the first \cdot, and the second, }, is at the end of your equation (just before \end{split}.
Indeed, \cdot does not need an argument, thus these brackets are unnecessary.

Following MWE (in which above mentioned brackets are removed) should work. It has been improved using Torbjørn T.'s advices, in order to make it more "correct":

• using \cos instead of cos, so that it cannot be interpreted as c*o*s (where c, o, and s would be constants)
• using \text{diff} instead of diff for same reason.

The result of this commands is that related text is printed using a math-roman typeface, and not the italic one.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$\begin{split} \mbox{G}_{\text{diff},t} = \mbox{DHI}\cdot ((\mbox{A}_{i}\cdot{\cos(\theta)}))&+((Y\cdot{\cos(\beta)}) \\ +((1-\mbox{T}_{r} & -\mbox{Y})\cdot{\cos^{2}(\beta{/2})}) \end{split}$$
\end{document}

• cos -> \cos, and probably \text{diff} for the first subscript. Dec 5 '16 at 12:31
• @TorbjørnT. thanks, answer edited accordingly. Dec 5 '16 at 12:35