# Big Equation into several lines in beamer

I have a very big equation and I tried to seperate that equation into different lines using the following code but the spacing is very big. Can anyone suggest what would be the best way to save space and reduce the bulkiness of the code ?

    $\rho \Delta x \Delta y \Delta z \Delta \tau \partial_tc_i(t,x,\tau)_ = \rho \Delta x \Delta y \Delta z \Delta \tau (p_i-d_i)-$

$\rho \Delta y, \Delta z \Delta \tau [q_{i,x}(t,x+\Delta x/2, y, z, \tau)-q_{i,x}(t,x - \Delta x/2, y, z, \tau)]$

$- \rho \Delta x, \Delta z \Delta \tau [q_{i,y}(t,x,y+\Delta y/2, y, z, \tau)-q_{i,y}(t,x,y - \Delta y/2, z, z, \tau)]$

$-\rho \Delta x \Delta y \Delta \tau[q_{i,z}(t,x,y,z+\Delta z/2, \tau) - q_{i,z}(t,x,y,z-\Delta z/2, \tau)]$


The output of this code is as follows:

I want to reduce the spacing between the lines.

Thank you.

-
In general, bo not leave a blank line before or after a display math environment. But, in this case put them in a single displaymath environment such as gather. –  Peter Grill Mar 20 '13 at 3:22
Don't use consecutive displayed math environments; you could use instead multline or other of the environments provided by amsmath for equations in several lines. –  Gonzalo Medina Mar 20 '13 at 3:22

You could use either the gather* or the align* environment. Both are provided by the amsmath package. In the MWE below, I use the align* method, taking the opportunity to break up the expression from 4 rather long lines to 7 less-long lines of math.

\documentclass{beamer}
\usepackage{amsmath}
\begin{document}
\begin{frame}
\begin{align*}
\rho \Delta x \Delta y \Delta z \Delta \tau \partial_t c_i(t,x,\tau)
&= \rho \Delta x \Delta y \Delta z \Delta \tau (p_i-d_i)  \\
&- \rho \Delta y, \Delta z \Delta \tau [q_{i,x}(t,x+\Delta x/2, y, z, \tau)\\
&\qquad - q_{i,x}(t,x - \Delta x/2, y, z, \tau)]\\
&- \rho \Delta x, \Delta z \Delta  \tau [q_{i,y}(t,x,y+\Delta y/2, y, z, \tau)\\
&\qquad - q_{i,y}(t,x,y - \Delta y/2, z, z, \tau)]\\
&- \rho \Delta x \Delta y \Delta \tau[q_{i,z}(t,x,y,z+\Delta z/2, \tau) \\