I'm trying to write the following equation using amsmath package in equation envoronment:
and break it into multiple lines using the following code
\begin{equation}
\label{eq:eqn1}
\begin{aligned}
\vec{f}{}' &=\vec{\nabla}{f} \\
&=\vec{\nabla}{f\left ( x, y, z \right )} \\
&\approx \left ( \frac{1}{2} \left ( f\left ( x-1, y, z \right ) + f\left ( x+1, y, z \right ) \right ), \\
&\qquad \frac{1}{2} \left ( f\left ( x, y-1, z \right ) + f\left ( x, y+1, z \right ) \right ), \\
&\qquad \frac{1}{2} \left ( f\left ( x, y, z-1 \right ) + f\left ( x, y, z-1 \right ) \right ) \right )
\end{aligned}
\end{equation}
This is giving me the following output:
I want the alignment and the line breaking the same but the final closing brace is missing here and for which I am getting error message also.
How can I get rid of this error and have the closing brace back in the equation?
\left( ...\right)
doesn't work over ampersants. replace it with& \bigg(
and\bigg)
orleft( <first line > \right.
and& \left. <last line>\right)
.\left
/\right
across multiline equation