I seem to get an error with the following code and I do not know why. This is the first time I have used the \underset_
command whereas I used to use the \limits_
command. However when I tried to use the \limits_
command in the following code it came up with an error. Then I tried the \underset_
command and it says I am missing a } but I can't seem to find it. I think I may just be using the command wrong. If anyone can see what it is, that would be very helpful.
\documentclass[a4paper]{report}
\usepackage{amsmath}
\usepackage{mathtools}
\begin{document}
\begin{equation}
\underset_{p\neq 0}{\textbf{minimize}}\frac{p^T\nabla f(x_k)}{\| \ {p} \| \cdot \| \ {\nabla f(x_k)} \| }
\end{equation}
Best Answer
The
_
after\underset
is wrong. On the other hand, you can simplify your input:There should be no space between
\|
and the following term.Even better, you can define
\norm
with\DeclarePairedDelimiter
(see the manual ofmathtools
for further information).