# Cases inside table

So, I want to display cases inside a table. This is my Latex document, as minimized as I could to reproduce the problem. Apparently, it says:

(./redundant.aux)
! Missing $inserted. <inserted text>$
l.12 \begin{cases}



I don't get it. The cases environment works totally fine outside tables. What's wrong with my Latex code and how do I fix it?

\documentclass[11pt, fullpage, lefteqn]{article}
\usepackage{amsmath}

\begin{document}
\begin{table}[h!]
\centering
\begin{tabular}{|c|c|}
\hline
$a^2 - x^2$
&
$\begin{cases} a \sin x \\ a \cos x \end{cases}$ & \\
\end{tabular}
\end{table}
\end{document}


Edit: when I try to change the cs to ps, I get

! Missing number, treated as zero.
l.9   $a^2 - x^2$

• c columns are single line like \mbox and can not have display constructs, use a p column such as p{5cm} which is like \parbox and can have vertical display material like $ Jan 22, 2021 at 23:55 • @DavidCarlisle When I try to change the cs to ps, it says "Missing number, treated as zero." Jan 23, 2021 at 0:01 • you need a width eg p{5cm} as I showed Jan 23, 2021 at 0:08 ## 1 Answer Vertical display material like \[ needs to be in a par (vertical) mode column such as p or m \documentclass[11pt, %fullpage, % article does not have fullpage or lefteqnoptions %lefteqn leqno ]{article} \usepackage{amsmath} \usepackage{array}% for m \begin{document} \begin{table}[htp] % [h!] \centering \begin{tabular}{|c|m{5cm}|} \hline a^2 - x^2 & \[ \begin{cases} a \sin x \\ a \cos x \end{cases}$ \\