0

This question already has an answer here:

I want to recreate the following:

enter image description here

What I have is this:

\begin{equation} \label{eq1}
\begin{split}
\nabla f(x_i) = \nabla f(x_i, y_j, z_k) & \approx ( \dfrac{1}{2} \left( f(x_{i+1}, y_j, z_k) - f(x_{i-1}, y_j, z_k) \right), \\
 & \phantom{abc} \dfrac{1}{2} \left( f(x_{i}, y_{j+1}, z_k) - f(x_{i}, y_{j-1}, z_k) \right), \\
  & \phantom{abc} \dfrac{1}{2} \left( f(x_{i}, y_j, z_{k+1}) - f(x_{i}, y_j, z_{k-1}) \right) )
\end{split}
\end{equation}

Which produces this:

enter image description here

When I try to change the size of the first and last bracket with \left and \right I get an error. How else could I adjust the sizes of the first and last bracket?

marked as duplicate by egreg equations Dec 6 '17 at 15:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    \left( ... \right) doesn't work over ampersands and multi lines equations. instead it you need to use \bigl( or \biggl( etc braces, or closed each line with \right. however, this not guaranty that the left and right parenthesis will have the same size. – Zarko Dec 6 '17 at 15:39
1

Use \right. and \left.. LaTeX only processes the \lefts and \rights in a given equation line. That is, you need to have as many \lefts as \rights per line. In this sense, LaTeX is very different from the parliaments of this planet.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation} \label{eq1}
\begin{split}
\nabla f(x_i) = \nabla f(x_i, y_j, z_k) & \approx \left( \dfrac{1}{2} \left( f(x_{i+1}, y_j, z_k) - f(x_{i-1}, y_j, z_k) \right)
\right., \\
 & \phantom{abc} \dfrac{1}{2} \left( f(x_{i}, y_{j+1}, z_k) - f(x_{i}, y_{j-1}, z_k) \right), \\
  & \phantom{abc}\left. \dfrac{1}{2} \left( f(x_{i}, y_j, z_{k+1}) - f(x_{i},
  y_j, z_{k-1}) \right) \right)
\end{split}
\end{equation}
\end{document}

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