Write a latex template for synthetic division.
Here's a basic LaTeX template for synthetic division:

\documentclass{article}
\usepackage{amsmath}

\begin{document}
\begin{tabular}{c|ccccc}
\multicolumn{2}{r}{$a_{n-1}$} & $a_{n-2}$ & $\cdots$ & $a_2$ & $a_1$ \\
\cline{2-6}
$b_n$ & $a_n$ & $a_{n-1}$ & $\cdots$ & $a_3$ & $a_2$ \\
\multicolumn{2}{r}{$b_{n-1}$} & $b_{n-2}$ & $\cdots$ & $b_2$ & $b_1$ \\
\cline{2-3}
& & $\vdots$ & & & \\
\cline{3-4}
& & & $\vdots$ & & \\
\cline{4-5}
& & & & $\vdots$ & \\
\cline{5-6}
\end{tabular}

\end{document}

In this template, $a_n$, $a_{n-1}$, etc. represent the coefficients of the polynomial being divided, and $b_n$, $b_{n-1}$, etc. represent the coefficients of the divisor. You can fill in the values for the coefficients and complete the division using the appropriate mathematical symbols and operations.