I want to number specific lines of an equation in the align environment. I've seen how to use gather instead of align here, but putting \usepackage[fleqn]{amsmath} in the preamble messes with the other equations in the document.
\documentclass[11pt,a4paper,openright]{book}
\usepackage[latin1]{inputenc}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage[left=1.00in, right=1.00in, top=1.00in, bottom=1.20in]{geometry}
\usepackage[hidelinks]{hyperref}
\begin{document}
For any test function $\phi\in\mathcal{D}$,
\begin{align}
\langle f'(t),\phi(t) \rangle &= \int_{-\infty}^{\infty} f'(t)\phi(t) \mathrm{d}t \\
&= [f(t)\phi(t)]_{-\infty}^\infty - \int_{-\infty}^{\infty} f(t)\phi'(t) \mathrm{d}t \\ \nonumber
&= -\langle f(t),\phi'(t) \rangle
\end{align}
\end{document}
I want to number the first and third lines, not the first and second.

\nonumbershould be before the\\that ends the second line. – Werner Jul 15 '14 at 20:48