The mathtools package provides an \Aboxed macro that boxes an equation inside align environments (and family) across &.
The original code is:
\newcommand\Aboxed[1]{\let\bgroup{\romannumeral-`}\@Aboxed#1&&\ENDDNE}
\def\@Aboxed#1\ENDDNE{%
\ifnum0=`{}\fi \setbox \z@
\hbox{$\displaystyle#1{}\m@th$\kern\fboxsep \kern\fboxrule }%
\edef\@tempa {\kern \wd\z@ &\kern -\the\wd\z@ \fboxsep
\the\fboxsep \fboxrule \the\fboxrule }\@tempa \boxed {#1#2}%
}
I’m going to adapt this by measuring the whole width of the equation and re-sizing the whole line to \linewidth. This’ll work with twocolumn, too, but showframe doesn’t show the inner column separator.
In the examples one can see that it works best when the one long line has on both sides of & the longest part of all lines.
The equal sign don’t align perfectly because the left part deos’nt end at the left side of = (and neither in the middle) but to the left from the additional space that is inserted before the relation sign (i.e. \thickmuskip) which will be scaled as well.
Code
\documentclass[
% twocolumn,
]{article}
\usepackage{amsmath}
\usepackage{graphics}
\usepackage{pgf}
\makeatletter
\newdimen\width@one
\newdimen\width@two
\newdimen\width@onetwo
\newdimen\left@kern
\newcommand\Rboxed[1]{\let\bgroup{\romannumeral-`}\@Rboxed#1&&\ENDDNE}
\def\@Rboxed#1\ENDDNE{%
\ifnum0=`{}\fi%
\setbox0\hbox{$\displaystyle#1{}\m@th$}%
\setbox1\hbox{$\displaystyle{}#2\m@th$}%
\width@one=\wd0%
\width@two=\wd1%
\width@onetwo=\width@one%
\advance\width@onetwo by \width@two%
\pgfmathsetmacro{\width@factor}{\linewidth/\width@onetwo}%
%%% Solution A
% \pgfmathsetlength{\left@kern}{\width@factor*\width@one}%
% \edef\@tempa{\kern\left@kern&\kern-\the\left@kern}\@tempa%
% \scalebox{\width@factor}{$\displaystyle#1{}$}&\scalebox{\width@factor}{$\displaystyle{}#2$}%
% \resizebox\linewidth!{$#1#2$}%
%% Solution B
\edef\@tempb{\noexpand\scalebox{\width@factor}{$\displaystyle#1{}$}&\noexpand\scalebox{\width@factor}{$\displaystyle{}#2$}}%
\@tempb%
}
\makeatother
%\usepackage[showframe,pass]{geometry}
\usepackage{showframe}
\begin{document}
\begin{align*}
a^2 + b^2 & = c^2 \\
\Rboxed{long equation + very long equation + long equation + long equation + long equation & = a^2+b^2} \\
c^2 & = a^2 + b^2
\end{align*}
\begin{align*}
a^2 + b^2 & = c^2 \\
\Rboxed{long equation + very long equation + long equation + long equation & = a^2+b^2 + long equation} \\
c^2 & = a^2 + b^2
\end{align*}
\twocolumn
\begin{align*}
a^2 + b^2 & = c^2 \\
\Rboxed{long equation + long equation + long & = a^2+b^2} \\
c^2 & = a^2 + b^2
\end{align*}
\begin{align*}
a^2 + b^2 & = c^2 \\
\Rboxed{long equation + long equation + long & = a^2+b^2 + long equation} \\
c^2 & = a^2 + b^2
\end{align*}
\end{document}
Output

\text{...}in analignenvironment, separately for each segment (break points at start/end of line and any&), and within\textyou can specify a size (\small,\Small, etc.) and then explicitly specify math with\displaystyleif appropriate. it's a hack, but you say you want just some rows, not the whole thing. – barbara beeton Nov 29 '12 at 16:32