2

I am trying to add underbrace to $\left(\frac{dB}{dA}\right)^2\right$. I have \underbrace{\left(\frac{dB}{dA}\right)^2\right}_\text{(-)}.

However, LaTeX is giving me an error. Do I have to install a package for this?

EDIT: I have the following packages:

\usepackage{graphicx}

\usepackage{amssymb,amsthm}

\usepackage{natbib}

\bibpunct{(}{)}{;}{;}{,}{,}

\usepackage{xr-hyper}

\usepackage[
  colorlinks=true,
  citecolor=blue,
  urlcolor=blue,
  linkcolor=blue
]{hyperref}

\usepackage{bm}

\usepackage{fullpage}

\usepackage{ amssymb }

    \pagestyle{plain}

\setlength{\parskip}{\baselineskip}
\setlength{\parindent}{0pt}

\setcounter{secnumdepth}{2}

\allowdisplaybreaks[4]

% Commenting/debugging
\let\IG\iffalse
\let\ENDIG\fi

%% Shortcuts
\newcommand{\td}[2]{\dfrac{d #1}{d #2}}
\newcommand{\std}[2]{\dfrac{d^2 #1}{d {#2}^2}}
\newcommand{\ctd}[3]{\dfrac{d^2 #1}{d #2 d #3}}

\newcommand{\pd}[2]{\dfrac{\partial #1}{\partial #2}}
\newcommand{\spd}[2]{\dfrac{\partial^2 #1}{\partial {#2}^2}}
\newcommand{\cpd}[3]{\dfrac{\partial^2 #1}{\partial #2 \partial #3}}

\newcommand{\pdi}[2]{\partial #1/\partial #2}

\newcommand{\LR}{\Leftrightarrow}
\newcommand{\Lg}{\mathcal{L}}
\newcommand{\half}{\tfrac{1}{2}}
\newcommand{\eqp}{\phantom{=}}
\newcommand{\eqs}{\buildrel s \over =}

\begin{document}
\end{document}

\thispagestyle{empty}
    \frac{d^2B}{dA^2}=-\frac{1}{\underbrace{(1-p)U'(B)}_\text{(+)}}\left[\underbrace{p U''(A)}_\text{(-)} + \underbrace{(1-p)U''(B)}_\text{(-)}\left(\frac{dB}{dA}\right)^2\right]>0.

enter image description here

I want to add braces to \left(\frac{dB}{dA}\right).

  • See if $\underbrace{\left\{\left(\frac{dB}{dA}\right)^2\right\}_\text{(-)}}$ does what you want. Please always post a fully compilable MWE including \documentclass and the appropriate packages. – Peter Grill Sep 29 '14 at 3:51
  • @PeterGrill I'm not getting a negative sign below with this. – OGC Sep 29 '14 at 3:53
3

How about a vertical alignment of the \underbraces using a strut:

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}
\[
  \newcommand{\tempstrut}{\rule[-1.2\baselineskip]{0pt}{1.5\baselineskip}}
  \frac{\mathrm{d}^2B}{\mathrm{d}A^2} =
    - \underbrace{\tempstrut\frac{1}{(1-p)U'(B)}}_{(+)}
    \Bigg[\underbrace{\tempstrut p U''(A)}_{(-)} 
      + \underbrace{\tempstrut (1-p)U''(B)}_{(-)}
      \underbrace{\tempstrut\Bigg(\frac{\mathrm{d}B}{\mathrm{d}A}\Bigg)^2}_{(+)}\Bigg] > 0.
\]
\end{document}
1
\documentclass{article}
\usepackage{graphicx}

\usepackage{amsmath,amssymb}


\begin{document}
\[
\frac{d^2B}{dA^2}=-\frac{1}{\underbrace{(1-p)U'(B)}_{\text{(+)}}}\Biggl[\underbrace{p U''(A)}_{\text{(-)}} + \underbrace{(1-p)U''(B)}_{\text{(-)}}
\underbrace{\left(\frac{dB}{dA}\right)^2}_{\text{(+)}}\Biggr]>0.
\]
\end{document}

enter image description here

  • The last term is positive though, and do not want a double square on it. – OGC Sep 29 '14 at 4:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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