TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following (quite horrible) equation in my thesis:

\frac{\partial^2}{\partial t_1^2} f(t_0,t_1) = 
( \delta+2t_0+2t_1)^{\alpha( w-t_0+t_1 )-1} \cdot \bigl(  
\frac{\partial^2}{\partial t_1^2}\alpha(w-t_0+t_1) \cdot ( \delta+2t_0+2t_1) \cdot  \log ( \delta+2t_0+2t_1) +\\
\alpha'(w-t_0+t_1) \cdot 2 \cdot  \log ( \delta+2t_0+2t_1)+
\alpha'(w-t_0+t_1) \cdot ( \delta+2t_0+2t_1) \cdot  \frac{2}{\delta+2t_0+2t_1} +\\
2 \frac{\partial}{\partial t_1} \alpha( w-t_0+t_1 ) \bigr) +
( \delta+2t_0+2t_1)^{\alpha( w-t_0+t_1 )-2}\cdot\\
 \bigl( \frac{\partial}{\partial t_1} \alpha(w-t_0+t_1) \cdot ( \delta+2t_0+2t_1) \cdot \log ( \delta+2t_0+2t_1) + (\alpha (w-t_0+t_1) -2) \bigr) \cdot \\
\bigl( \alpha'(w -t_0+t_1) \cdot ( \delta+2t_0+2t_1) \cdot  \log ( \delta+2t_0+2t_1) +
2\alpha( w-t_0+t_1)\bigr) = \\
( \delta+2t_0+2t_1)^{\alpha( w-t_0+t_1 )-1} \cdot \Bigl( 
 \frac{\partial^2}{\partial t_1^2}\alpha(w -t_0+t_1) \cdot ( \delta+2t_0+2t_1) \cdot  \log ( \delta+2t_0+2t_1) +\\
2 \cdot \alpha'(w-t_0+t_1)  \cdot  \bigl( 2 + \log ( \delta+2t_0+2t_1) \bigr) \Bigr) +
( \delta+2t_0+2t_1)^{\alpha( w-t_0+t_1)-2} \cdot \Bigl( \\
\alpha '(w-t_0+t_1) \cdot 
(\delta + 2t_0+2t_1) \cdot \log (\delta + 2t_0+2t_1) +  
\bigl(\alpha (w-t_0+t_1) -2) \bigr) \cdot
 \bigl(   \\
\alpha'(w-t_0+t_1) \cdot ( \delta+2t_0+2t_1) \cdot  \log ( \delta+2t_0+2t_1) +2\alpha( w-t_0+t_1)\bigr) \Bigr)  < 0

Using this exact piece of code, without any special formatting commands such as & or \[2mm] the resulting mathematical text is quite unreadable: The equation

How would you format such equations in LaTeX and what would you say is good practice when typesetting such large equations?

share|improve this question
Either keep your align* or use a split inside a display-math environment, but add breaks in places unlikely to throw your reader off. Break lines before plus signs, but after multiplication signs. For the latter, I think \times is easier to parse than \cdot, here. Also, use \left(, \right) for an automatic hierarchy in delimiter size; that will help your reader parse your equation. – Jubobs Apr 14 '13 at 11:30
You want to prove that this second derivative is negative, right? I guess there's no good typesetting answer to your question, but my mathematical answer is: try and give the proof more structure. – Hendrik Vogt Apr 15 '13 at 12:12
up vote 12 down vote accepted

I'd try to make the equation smaller by grouping parts:

  • Don't use \cdot where it's not necessary. I use it only for scalar products of vectors and for numbers, but not for symbolic factors or before parentheses.
  • Derivatives are often written as \partial_{t_1} instead of \frac{\partial}{\partial t_1}. This can save some space.
  • Introducing substitutions can be helpful. In your code (\delta+2t_0+2t_1) appears quite often and it could be replaced by a new symbol which will be defined before or after the equation
  • Align the equation at least on all equal signs: &=
  • Other line breaks may be before + signs to "group" summands (this shows that the equation consists of similar parts that are added together)
share|improve this answer

enter image description here

breaking before not after operators and defining names for the subterms



\frac{\partial^2}{\partial t_1^2} f(t_0,t_1)
b^{a-1} \cdot \bigl(  
\frac{\partial^2}{\partial t_1^2}a \cdot b \cdot  \log ( b) +
a' \cdot 2 \cdot  \log ( b)+
a' \cdot b \cdot  \frac{2}{b} +
2 \frac{\partial}{\partial t_1} a \bigr) \\
 \bigl( \frac{\partial}{\partial t_1}a \cdot b \cdot \log ( b) + (a -2) \bigr) \cdot 
\bigl( a' \cdot b \cdot  \log ( b) + 2a\bigr)\\
  & = 
b^{a-1} \cdot \Bigl( 
 \frac{\partial^2}{\partial t_1^2}a \cdot  b \cdot  \log ( b) +
2 \cdot a'  \cdot  \bigl( 2 + \log ( b) \bigr) \Bigr)\\
&\quad +
b^{a-2} \cdot \bigl(a' \cdot 
c \cdot \log (c) +  
\bigl(a -2) \bigr) \cdot
 \bigl(a' \cdot  b \cdot  \log ( b) +2a)\bigr)\bigr)\\
  &< 0
$a=\alpha( w-t_0+t_1 )$\\
$c=\delta + 2t_0+2t_1$
share|improve this answer
I think adding a \qquad after the first and third line breaks would help the parsing. – Jubobs Apr 14 '13 at 11:35
@FooBar yes (unless you define it not to be) – David Carlisle Apr 14 '13 at 11:38
Still I would combine more terms together such that the main equation can be set in one or maximal two lines. Then it is much easier to grasp what is going on. – jjdb Apr 14 '13 at 11:40
Is it good here to use \left and \right as well so that the derivatives don'T go over the ( and )? I think I'd prefere it when nothing goes over the paranthesis. – Foo Bar Apr 14 '13 at 11:44
I might even put is negative on the following line, so the reader can't miss the < 0. If you keep it in the display, then be sure to repeat the assertion in the text. – Ethan Bolker Apr 14 '13 at 12:42

Actually, I would like to start answering with a question: Is it very informative to display an equation that long?

I would try to identify parts in your equation, and write something like

\[a (A + B + C) < 0\]
\[a = ... \]
A &= ... \\
B &= ... \\
C &= ...

this makes it much easier to read it, and you can maybe give also an exlanation to every term.

share|improve this answer

Try using the breqn package. Begin with usepackage{breqn}, then replace the align* environment with dmath*. Then remove all the manual linebreaks \\, because breqn does the line-breaking and aligning automatically. Also you can replace \bigl and \bigr with \left and \right, because breqn allows line breaks within a \left-\right pair.

\usepackage{breqn}  % from the "mh" bundle


\frac{\partial^2}{\partial t_1^2} f(t_0,t_1) = 
( \delta+2t_0+2t_1)^{\alpha( w-t_0+t_1 )-1} \cdot \left(  
\frac{\partial^2}{\partial t_1^2}\alpha(w-t_0+t_1) \cdot ( \delta+2t_0+2t_1) \cdot  
\log ( \delta+2t_0+2t_1) +
\alpha'(w-t_0+t_1) \cdot 2 \cdot  \log ( \delta+2t_0+2t_1)+
\alpha'(w-t_0+t_1) \cdot ( \delta+2t_0+2t_1) \cdot  \frac{2}{\delta+2t_0+2t_1} +
2 \frac{\partial}{\partial t_1} \alpha( w-t_0+t_1 ) \right) +
( \delta+2t_0+2t_1)^{\alpha( w-t_0+t_1 )-2}\cdot
 \left( \frac{\partial}{\partial t_1} \alpha(w-t_0+t_1) \cdot ( \delta+2t_0+2t_1) 
\cdot \log ( \delta+2t_0+2t_1) + (\alpha (w-t_0+t_1) -2) \right) \cdot 
\left( \alpha'(w -t_0+t_1) \cdot ( \delta+2t_0+2t_1) \cdot  \log ( \delta+2t_0+2t_1) +
2\alpha( w-t_0+t_1)\right) = 
( \delta+2t_0+2t_1)^{\alpha( w-t_0+t_1 )-1} \cdot \left( 
\frac{\partial^2}{\partial t_1^2}\alpha(w -t_0+t_1) \cdot ( \delta+2t_0+2t_1) \cdot  
\log ( \delta+2t_0+2t_1) +
2 \cdot \alpha'(w-t_0+t_1)  \cdot  \left( 2 + \log ( \delta+2t_0+2t_1) \right) \right)
+ ( \delta+2t_0+2t_1)^{\alpha( w-t_0+t_1)-2} \cdot \Bigl( 
\alpha '(w-t_0+t_1) \cdot 
(\delta + 2t_0+2t_1) \cdot \log (\delta + 2t_0+2t_1) +  
\left(\alpha (w-t_0+t_1) -2 \right) \cdot
\alpha'(w-t_0+t_1) \cdot ( \delta+2t_0+2t_1) \cdot  \log ( \delta+2t_0+2t_1) +2\alpha(
 w-t_0+t_1)\right) \Bigr)  < 0
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.