I am doing a math assignment, and want to place a box next to my calculations for side calculations. I tried to use the tabular environment, but then there is a huge space besides the box, and the rest of the calculations comes before and after the box, like this:
\documentclass[a4paper, norsk, 11pt]{article}
\begin{document
\begin{itemize}
\item[a)]
$$\int\frac{\cot^3{x}}{\sin^2{x}}dx$$
\end{itemize}
\begin{flushright}
\begin{tabular}{| c |}
\hline
u $=\cot x$\\
du $= -\frac{1}{\sin^2x}$dx\\
\\
\hline
\end{tabular}
\end{flushright}
$$\int -u^3$$
$$=-\frac{u^4}{4}$$
$$=\underline{\underline{-\frac{\cot^4x}{4}}}$$
\end{document}
Can anybody help me, how to get the box beside the calculations and not instead of?