\documentclass[fleqn]{article}
\usepackage{tikz}
\newcommand{\tikznode}[3][]{\tikz[remember
picture,baseline=(#2.base)]{\node(#2)[inner sep=0pt,#1]{$\displaystyle #3$};}}
\usepackage{amsmath}
\begin{document}
\begin{align*}
+&~\tikznode{1}{2u(1-u)} && \sin(n\pi u)\\
-&~\tikznode{2}{(4-u)} && \tikznode{r1}{-\frac{1}{n\pi}}\cos(n\pi u)\\
+&~\tikznode{3}{-4} && \tikznode{r2}{-\frac{1}{(n\pi)^2}}\sin(n\pi u)\\
-&~\tikznode{4}{(4-u)} && \tikznode{r3}{-\frac{1}{(n\pi)^3}}\cos(n\pi u)
\end{align*}
\begin{tikzpicture}[overlay,remember picture]
\foreach \X in {1,2,3}
{\draw[shorten >=2pt,shorten <=2pt] (\X.east) -- (r\X.west);}
\end{tikzpicture}
\end{document}