Using `split` inside array and vertical alignment
I'd suggest using an alignat*
environment in the place of array
as you can have full control on the spacing between columns. I replaced split
with aligned
, which can take an optional argument for the vertical placement: t, c
(the default) and b
.
Also, I loaded esdiff
to have a simplified typing of partial derivatives, and used the \widebar
command from mathabx
(without loading all the mathabx fonts), as I think it looks nicer than \overline
. Finally the mleftright
package gives a better spacing for large delimiters.
\documentclass{article}
\usepackage{mathtools, mleftright}
\usepackage{esdiff}
\DeclareFontFamily{U}{mathx}{\hyphenchar\font45}
\DeclareFontShape{U}{mathx}{m}{n}{
<-6> mathx5 <6-7> mathx6 <7-8> mathx7
<8-9> mathx8 <9-10> mathx9
<10-12> mathx10 <12-> mathx12
}{}
\DeclareSymbolFont{mathx}{U}{mathx}{m}{n}
\DeclareFontSubstitution{U}{mathx}{m}{n}
\DeclareMathAccent{\widebar}{0}{mathx}{"73}
\newcommand{\xm}{\widebar{\mathbf{x}}}
\begin{document}
\begin{alignat*}{2}
\diffp{ g}{{n_\mu^1}} & = \partial_1f(\xm)\cdot \frac{-\gamma_1}{\sigma_1 + n_\sigma^1}
&
\diffp{g}{{n^1_\sigma}} & = \partial_1f(\xm) \cdot \mleft( -\gamma_1 \frac{x_1 - \mu_1 - n_\mu^1}{(\sigma_1 + n_\sigma^1)^2} \mright)
\\[1ex]
\diffp[2]{g}{(n^1_\mu\smash{)}}
& = \partial^2_1f(\xm)\left( \frac{-\gamma_1}{\sigma_1 + n_\sigma^1} \right)^2
&
\diffp[2]{g}{(n_\sigma^1\smash{)}} & = \begin{aligned}[t] & \partial_1 f(\xm) \cdot 2 \mleft( -\gamma_1 \frac{x_1 - \mu_1 - n_\mu^1}{(\sigma_1 + n_\sigma^1)^3} \mright)
\\
\mathllap{{} +{}} & \partial_1^2 f(\xm)\mleft( -\gamma_1 \frac{x_1 - \mu_1 - n_\mu^1}{(\sigma_1 + n_\sigma^1)^2} \mright)^{\mkern-5mu 2}
\end{aligned}
\\[1ex]
\diffp{g}{{n_\mu^1}{n_\sigma^1}} & =
\begin{aligned}[t] & \partial_1f(\xm)\cdot \frac{-\gamma_1}{(\sigma_1 + n_\sigma^1)^2} \\
\mathllap{{} + {}}& \partial_1^2 f(\xm) \left( -\gamma_1 \frac{x_1 - \mu_1 - n_\mu^1}{(\sigma_1 + n_\sigma^1)^2} \right)
\\
\mathllap{{} \cdot} &\mleft( \frac{-\gamma_1}{\sigma_1 + n_\sigma^1} \mright)
\end{aligned}
\end{alignat*}
\end{document}
You're lucky enough that the last equation (unsplit) is as wide as the top line. So I suggest to gather
everything, with the first two pairs aligned
(with a nested aligned
for splitting the fourth equation).
\documentclass{article}
\usepackage{amsmath}
\newcommand{\xm}{\overline{\mathbf{x}}}
\begin{document}
\begin{gather*}
\begin{aligned}
\frac{\partial g}{\partial n_\mu^1}
&=\partial_1f(\xm)\cdot \frac{-\gamma_1}{\sigma_1 + n_\sigma^1}
&
\frac{\partial g}{\partial n^1_\sigma}
&=\partial_1f(\xm) \cdot \biggl( -\gamma_1 \frac{x_1
- \mu_1 - n_\mu^1}{(\sigma_1 + n_\sigma^1)^2} \biggr)
\\[2ex]
\frac{\partial^2 g}{(\partial n^1_\mu)^2}
&= \partial^2_1f(\xm)\biggl( \frac{-\gamma_1}{\sigma_1 + n_\sigma^1} \biggr)^{\!2}
&
\frac{\partial^2 g}{(\partial n_\sigma^1)^2}
&= \begin{aligned}[t]
&\partial_1 f(\xm) \cdot 2 \biggl( -\gamma_1 \frac{x_1 -
\mu_1 - n_\mu^1}{(\sigma_1 + n_\sigma^1)^3} \biggr)
\\
&\quad + \partial_1^2 f(\xm)\biggl( -\gamma_1 \frac{x_1 -
\mu_1 - n_\mu^1}{(\sigma_1 + n_\sigma^1)^2} \biggr)^{\!2}
\end{aligned}
\end{aligned}
\\[2ex]
\frac{\partial^2 g}{\partial n_\mu^1 \partial n_\sigma^1}
= \partial_1f(\xm)\cdot \frac{-\gamma_1}{(\sigma_1 + n_\sigma^1)^2}
+ \partial_1^2 f(\xm) \biggl( -\gamma_1 \frac{x_1 -
\mu_1 - n_\mu^1}{(\sigma_1 + n_\sigma^1)^2} \biggr)
\cdot \biggl( \frac{-\gamma_1}{\sigma_1 + n_\sigma^1} \biggr)
\end{gather*}
\end{document}
yet another way of looking at this. the second equaton on the second line will
fit within the text width, so why not keep it on one line by itself? then a
simple align*
can be used.
\documentclass{article}
\usepackage{amsmath}
\newcommand{\xm}{\overline{\mathbf{x}}}
\begin{document}
\begin{align*}
\frac{\partial g}{\partial n_\mu^1}
&= \partial_1f(\xm)\cdot \frac{-\gamma_1}{\sigma_1 + n_\sigma^1}
\qquad\qquad
\frac{\partial g}{\partial n^1_\sigma}
=\partial_1f(\xm) \cdot \biggl( -\gamma_1
\frac{x_1 - \mu_1 - n_\mu^1}{(\sigma_1 + n_\sigma^1)^2} \biggr)\\[2\jot]
\frac{\partial^2 g}{(\partial n^1_\mu)^2}
&= \partial^2_1f(\xm)\biggl( \frac{-\gamma_1}{\sigma_1 + n_\sigma^1} \biggr)^{\!2}\\[2\jot]
\frac{\partial^2 g}{(\partial n_\sigma^1)^2}
&= \partial_1 f(\xm) \cdot 2 \biggl( -\gamma_1
\frac{x_1 - \mu_1 - n_\mu^1}{(\sigma_1 + n_\sigma^1)^3} \biggr)
+ \partial_1^2 f(\xm)\biggl( -\gamma_1
\frac{x_1 - \mu_1 - n_\mu^1}{(\sigma_1 + n_\sigma^1)^2} \biggr)^{\!2}
\\[2\jot]
\frac{\partial^2 g}{\partial n_\mu^1 \partial n_\sigma^1}
&= \partial_1f(\xm)\cdot \frac{-\gamma_1}{(\sigma_1 + n_\sigma^1)^2}
+ \partial_1^2 f(\xm) \biggl( -\gamma_1
\frac{x_1 - \mu_1 - n_\mu^1}{(\sigma_1 + n_\sigma^1)^2} \biggr)
\cdot \biggl( \frac{-\gamma_1}{\sigma_1 + n_\sigma^1} \biggr)
\end{align*}
\end{document}
this applies fixed sizing to the parentheses (\bigg
is usually a good choice for fractions of this sort). it also uses a multiple of the dimension \jot
to specify the line separation; 1\jot
is the default separation for align
, and
actually, with the equations laid out like this, extra separation isn't really
needed.