It took me some time to dissect the code. (As Stefan says, it is very messy.)
I finally found the problem;
\frac{dB_{R,n}{dz}}
should be
\frac{dB_{R,n}}{dz}
.
Here is an attempt to make it more readable:
Code: Select all
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{gather}
\begin{split}
\vec{R}_{k,n,i}
&= \mu_0 \sum_j\frac{I_{B,j}}{u_{\parallel,j,n,i}}
\left[
G_{e,k,j,n,i}e^{-jm\varphi_{e,i}} \cdot e^{j(\omega_k-\Omega_f)t}
\right]_n\\
&\hphantom{{}=\mu_0 \sum_j}
\cdot
\left(
j\Omega_0 \cdot \frac{\vec p_{j,n,i}}{\gamma_{j,n,i}}+
\underbrace{
\left(
\frac{\gamma^2_{j,n,i}-1}{u^2_{\parallel,j,n,i}}
\right)
\overbrace{
\left(
\frac{1}{2B_{R,n}}
\frac{dB_{R,n}}{dz}
\right)
}^{Mag_n}
\cdot \frac{{\vec p}_{j,n,i}}{\gamma_{j,n,i}}
}_{D_n}
\right)
\end{split}
\end{gather}
\end{document}

- Output.
- output.jpg (44.9 KiB) Viewed 6319 times
Note the use of
\hphantom
(and especially
{}
before
=
) to get the correct vertical alignment when the equation is split over two (in general, more than one) lines. Furthermore, the
{gather}
and
{split}
environments inside one another are used to vertically center the equation number.
P.S. If you use
Emacs, putting the following code in your
.emacs
file will let you detect matching brackets easier: