I have the following equation:
J_\pi(x_0)=\left(\underbrace{g_N(x_N)}_{\mathclap{\substack{\text{Terminal}
\\\text{cost}}}}+\underbrace{\sum_{k=0}^{N-1}g_k(x_k,u_k,w_k)}_
{\mathclap{\substack{\text{Accumulated}\\\text{cost}}}}\right)
Which outputs:
I want to get rid of the "extra height" on the parentheses (circled above in red) that's created due to the underbrace. How do I do this? Thank you!
Solution: I used biggl and biggr as per the suggestions, it works:
Thank you!


\leftand\rightoverreacts. IMHO just set the delimiter size manually, like\biggl(and\biggr). – campa Oct 23 '15 at 12:06\mathclaps are superfluous here. – campa Oct 23 '15 at 12:10\biggapproach, if you want your underbraces to vertically align, try:\documentclass{article} \usepackage{mathtools,stackengine} \begin{document} \[ J_\pi(x_0)=\biggl(\underbrace{\addstackgap[10.6pt]{$g_N(x_N)$}}_{\mathclap{\substack{\text{Terminal} \\\text{cost}}}}+\underbrace{\sum_{k=0}^{N-1}g_k(x_k,u_k,w_k)}_ {\mathclap{\substack{\text{Accumulated}\\\text{cost}}}}\biggr) \] \end{document}– Steven B. Segletes Oct 23 '15 at 12:22