# How to break this long radical into multiple lines?

I've got a very long radical in a display-math environment, so long that the equation spills in the right margin. How can I break that equation over multiple lines, so that it doesn't go into the right margin?

\documentclass[12pt,a4paper]{article}

\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{fourier}
\usepackage[left=3cm,right=3cm,top=2.5cm,bottom=2cm]{geometry}

\begin{document}
$V_{DABC}=\dfrac{1}{6}\cdot DA \cdot DB \cdot DC \cdot \sqrt{1+2\cdot \cos \widehat{ADB}\cdot \cos \widehat{BDC}\cdot \cos \widehat{ADC} -\cos^2 \widehat{ADB} -\cos^2 \widehat{ADC} -\cos^2 \widehat{BDC}} =\dfrac{2\sqrt{2}}{3}.$
\end{document}

-
The first suggestion is to use \alpha, \beta and so on instead of naming angles by points. – egreg Mar 1 '14 at 16:27
How about using )^{1/2} instead of a root? would be easier to split up. – Ingo Mar 3 '14 at 16:50

I'd much prefer Jubobs's approach, but just to show another method, you can split into two lines the radicand:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{fourier}
\usepackage[left=3cm,right=3cm,top=2.5cm,bottom=2cm]{geometry}
\begin{document}
V_{DABC}=\dfrac{1}{6}\cdot DA \cdot DB \cdot DC \cdot \sqrt{ \begin{aligned} 1+&2\cos\widehat{ADB}\cos\widehat{BDC}\cos\widehat{ADC} \\ & -\cos^2 \widehat{ADB} -\cos^2 \widehat{ADC} -\cos^2 \widehat{BDC} \end{aligned} } =\dfrac{2\sqrt{2}}{3}.
\end{document}


I removed the unnecessary centered dots.

-
To avoid the (minimal) manual adjustment, one could use multlined environment from mathtools. – Manuel Mar 1 '14 at 17:18
@Manuel Yes, that's a possibility. – egreg Mar 1 '14 at 17:20
Inasmuch as I like the other answers that provide simpler equations for clarity's sake, +1 for actually answering the question. – Sean Allred Mar 1 '14 at 18:15

As suggested by egreg in his comment, the angles take up a lot of horizontal space, which you can claim back by defining shorter variables for them (alpha, beta, gamma, in my code).

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb} % <---- for \triangleq
\usepackage{fourier}
\usepackage[left=3cm,right=3cm,top=2.5cm,bottom=2cm,showframe]{geometry}
\begin{document}
\begin{align*}
V_{DABC} &=\dfrac{1}{6}\cdot DA \cdot DB \cdot DC \cdot
\sqrt{
1 + 2 \cos\alpha \cos\beta \cos\gamma
-\cos^2 \alpha -\cos^2 \beta -\cos^2 \gamma
} \\
&= \dfrac{2\sqrt{2}}{3}\,,
\end{align*}
%
where $$\alpha \triangleq \widehat{BDC}$$,
$$\beta \triangleq \widehat{ADC}$$,
and $$\gamma \triangleq \widehat{ADB}$$.
\end{document}

-
I find \triangleq ugly and unnecessary. – egreg Mar 1 '14 at 16:37
@egreg Personally, I find \triangleq useful to distinguish between an equality between two quantities that have already been introduced, and a definition, i.e. "we introduce the LHS and define it as equal to the RHS". I guess it's a matter of personal opinion. I'm curious... Do you use another symbol? Or do you not make that distinction? – Jubobs Mar 1 '14 at 16:40
I find that = is sufficient. Mathematicians have gone through without := or similar symbols for centuries. Saying “where A=B” is usually clear; one can say “where we set A=B” if greater clarity seems needed. – egreg Mar 1 '14 at 16:43
Even more, you could omit \cdot between cosines. In my opinion 2 \cos \gamma \cos \alpha \cos \beta is absolutely readable. – Manuel Mar 1 '14 at 17:35
@Manuel You're right. See my edit. – Jubobs Mar 1 '14 at 18:08

I think this is one of those cases where a local definition may help; in the code below, I have introduced f(A,B,C,D) under your radical, and then defined it immediately below.

% arara: pdflatex
% !arara: indent: {overwrite: yes}
\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\usepackage[left=3cm,right=3cm,top=2.5cm,bottom=2cm]{geometry}
\begin{document}
\begin{align}
V_{DABC} & =\dfrac{1}{6}\cdot DA \cdot DB \cdot DC \cdot \sqrt{f(A,B,C,D)} \\
& =\dfrac{2\sqrt{2}}{3}.
\end{align}
where
\begin{align*}
f(A,B,C,D)  = 1 & +2\cdot \cos \widehat{ADB}\cdot \cos \widehat{BDC}\cdot \cos \widehat{ADC} \\
\end{align*}
\end{document}

-

An approach that produces a result that's very similar to the one in @egreg's answer relies on the \splitfrac macro of the mathtools package.

In the example below, I also utilize a macro called \V that typesets its argument in text italics instead of math italics. The macro is applied to the strings "DABC", "ADB", "DA", etc to keep TeX from typesetting them as if they were separate variables named "A", "B", "C", etc.

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{mathtools} % for \splitfrac macro
\usepackage{fourier}
\usepackage[hmargin=3cm,top=2.5cm,bottom=2cm,showframe]{geometry}
\newcommand{\V}[1]{\textit{#1}} % shorthand macro, typesets its argument in text italics
\begin{document}
$V_{\V{DABC}} =\frac{1}{6}\, \V{DA} \cdot \V{DB} \cdot \V{DC} \cdot \sqrt{\splitfrac{ 1+2\cos \widehat{\V{ADB}} \cdot \cos \widehat{\V{BDC}} \cdot \cos \widehat{\V{ADC}}}{ -\cos^2 \widehat{\V{ADB}} -\cos^2 \widehat{\V{ADC}} -\cos^2 \widehat{\V{BDC}}}\,} =\frac{2\sqrt{2}}{3}\,.$
\end{document}

-