Temporarily Change Equation Margin

I'd avoid doing this as hard as I can. But…

\documentclass{article}
\usepackage{amsmath,environ}

\usepackage[nopar]{lipsum}

\makeatletter
\NewEnviron{widerequation}{%
  \begin{equation*}
  \sbox\z@{\let\label\@gobble$\displaystyle\BODY$}
  \makebox[\textwidth]{%
    \begin{minipage}{\dimexpr\wd\z@+3em}
    \vspace{-\baselineskip}
    \begin{equation}
    \BODY
    \end{equation}
    \end{minipage}%
  }
  \end{equation*}
}

\begin{document}
\lipsum[2]
\begin{equation}
y = mx + b
\end{equation}
\lipsum[2]
\begin{widerequation}\label{test}
      E = mc^2 + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + 
      x + x + x + x + x + x + x + x + x 
\end{widerequation}
\lipsum[2]
\begin{equation}
\nu = c / \lambda
\end{equation}
See \eqref{test}
\end{document}

enter image description here


Here is a solution with the eqparbox package, which allows measurement of tagged boxes. It requires two compilations:

\documentclass{article}
\usepackage[nopar]{lipsum}
\usepackage{mathtools}
\usepackage{eqparbox}

\begin{document}

\lipsum[1]
\noindent\makebox[\textwidth]{\begin{minipage}{\dimexpr\eqboxwidth{Eq}+1Acm\relax}
  \medskip
  \begin{equation}\eqmakebox[Eq]{\ensuremath{E = mc^2 + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x +
    x + x + x + x + x + x + x + x + x}}
  \end{equation}
  \end{minipage}}\vspace{\belowdisplayskip}
\lipsum[2]
\begin{equation}
  \nu = c / \lambda
\end{equation}

\end{document} 

enter image description here


It seems that you could also use the adjustwidth environment from the changepage package:

\newenvironment{widerequation}{%
    \begin{adjustwidth}{-2cm}{-2cm}\begin{equation}}
    {\end{equation}\end{adjustwidth}}

Here's a complete MWE:

% arara: pdflatex
\documentclass{article}
\usepackage{amsmath}
\usepackage{changepage}
\usepackage[nopar]{lipsum}

\newenvironment{widerequation}{%
    \begin{adjustwidth}{-2cm}{-2cm}\begin{equation}}
    {\end{equation}\end{adjustwidth}}

\begin{document}
\lipsum[2]
\begin{equation}
y = mx + b
\end{equation}
\lipsum[2]
\begin{widerequation}\label{test}
      E = mc^2 + x + x + x + x + x + x + x + x + x + x + x + x + x + x + x + 
      x + x + x + x + x + x + x + x + x 
\end{widerequation}
\lipsum[2]
\begin{equation}
\nu = c / \lambda
\end{equation}
See \eqref{test}
\end{document}