I often want to write formulas in one column and text in another column. This helps me create nice cheat sheets where everything is aligned and clean, but I'm having trouble getting consistent results. Wether I use tabular, tabularx, minipages or arrays, there is always some problem (ugly table outputs, some cells won't have aligned content or the generated table is good but can't easily be moved where I want it to, etc.).
Right now, I am trying to use the array environment:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
\begin{array}{|l|l|}
\hline
\displaystyle\int x\;dx & \text{\textbf{This} is correctly left justified}\\
\displaystyle\int \dfrac{1}{x}\;dx & \text{\textbf{This} is also correctly left justified}\\
\displaystyle\int \dfrac{\text{degree $m$ polynomial}}{\text{degree $n$ polynomial}}\; dx &
\begin{array}{l}
\text{If $m\geq n$: use this technique}\\
\text{If $m<n$: use that other technique}
\end{array}\\
\displaystyle\int f(x)\;dx & \text{The above two If's are not left justified with the two \textbf{This}'s}\\
\hline
\end{array}
\end{equation*}
\end{document}
Which outputs this:
The Problem
As you can see, on third row/2nd column of the array, I used anoter array statement to write two lines within the same row, but they are a bit offset to the right. I'm thinking there's an invisible blank vertical line (where an actual line would be if I had written {|l|} in the nest array's columns instead of just {l}). Is there any way to get rid of that 'indent' (if we can call it that)?
Additional info
In case someone asks, here is a similar attempt I did using tabularx (where I use \newline instead of a nested array):
\documentclass{article}
\usepackage{amsmath}
\usepackage{tabularx}
\begin{document}
\begin{table}[h]
\begin{tabularx}{\textwidth}{|lX|}
\hline
$\displaystyle\int x\;dx$ & \textbf{This} is correctly left justified\\
$\displaystyle\int \dfrac{1}{x}\;dx$ & \textbf{This} is also correctly left justified\\
$\displaystyle\int \dfrac{\text{degree $m$ polynomial}}{\text{degree $n$ polynomial}}\;dx$ &
\text{If $m\geq n$: use this technique}\newline
\text{If $m<n$: use that other technique}\\
$\displaystyle\int f(x)\;dx$ & \text{The above two If's are not aligned to the top of the row}\\
\hline
\end{tabularx}
\end{table}
\end{document}
Which outputs this:
As you can see, now the If's are justified but not aligned with the top of the integral on the left. (Don't worry about the line overflowing out of the table for this example).
I've been playing this game of whack-a-mole of trying to find the right environment for the job for a while now and would appreciate some help!
Thanks in advance.
\begin{array}{@{}l@{}}
. The@{}
suppresses the extra space.