# Polynomial long division with fractions

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
&&&&&&&&&&&&&&x&&+&&\frac{x^3}{3}&&+&&\frac{2x^5}{15}&&+&&\cdots\\
\cline{14-28}
1&&-&&\frac{x^2}{2}&&+&&\frac{x^4}{24}&&-&&\cdots \quad \Bigg| &&x&&-&&\frac{x^3}{6}&&+&&\frac{x^5}{120}&&-&&\cdots\\
&&&&&&&&&&&&&&x&&-&&\frac{x^2}{2}&&+&&\frac{x^5}{24}&&-&&\cdots\\
\cline{15-28}
&&&&&&&&&&&&&&&&&&\frac{x^3}{3}&&-&&\frac{x^5}{30}&&+&&\cdots\\
&&&&&&&&&&&&&&&&&&\frac{x^3}{3}&&-&&\frac{x^5}{6}&&+&&\cdots\\
\cline{19-28}
&&&&&&&&&&&&&&&&&&&&&&\frac{2x^5}{15}&&-&&\cdots\\
&&&&&&&&&&&&&&&&&&&&&&\frac{2x^5}{15}&&-&&\cdots
\end{align*}
\end{document}


Above is my code for trying to find the Taylor series for Tangent through division. I'm just wondering if there's a better way to make that division symbol? (btw, the reason for all those &'s are because I want evenly spaced terms as well as operations.

This is the goal:

The attached code does this:

I show the changes on the line between the two % comment lines. It involves raising the | by a point, \smashing the result, and kerning left with a \! afterwards.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
&&&&&&&&&&&&&&x&&+&&\frac{x^3}{3}&&+&&\frac{2x^5}{15}&&+&&\cdots\\
\cline{14-28}
%
\smash{\raisebox{1pt}{$\Bigg|$}}\!
%
&&x&&-&&\frac{x^3}{6}&&+&&\frac{x^5}{120}&&-&&\cdots\\
&&&&&&&&&&&&&&x&&-&&\frac{x^2}{2}&&+&&\frac{x^5}{24}&&-&&\cdots\\
\cline{15-28}
&&&&&&&&&&&&&&&&&&\frac{x^3}{3}&&-&&\frac{x^5}{30}&&+&&\cdots\\
&&&&&&&&&&&&&&&&&&\frac{x^3}{3}&&-&&\frac{x^5}{6}&&+&&\cdots\\
\cline{19-28}
&&&&&&&&&&&&&&&&&&&&&&\frac{2x^5}{15}&&-&&\cdots\\
&&&&&&&&&&&&&&&&&&&&&&\frac{2x^5}{15}&&-&&\cdots
\end{align*}
\end{document}


p.s. Of course, one can also add a \\\cline{23-28} to the end of the environment to add the bottom line below the final operation.