# How do I make polynom compatible with the align environment?

\documentclass{report}

\usepackage{polynom, amsmath}

\begin{document}

\polylongdiv{x}{x+1} % OK

$$\polylongdiv{x}{x+1} % OK$$

\begin{align}
\polylongdiv{x}{x+1} & % compilation error
\end{align}

\end{document}

The package polynom is incompatible with the align environment of amsmath. How do I work around this?

Oh, I think I just stumbled upon a workaround.

\documentclass{report}

\usepackage{polynom, amsmath}

\begin{document}

\begin{align}
\text{$\polylongdiv{x}{x+1}$} & \\ % works
\mbox{\polylongdiv(x)(x+1)} & % mangled formatting
\end{align}

\end{document}