[Tex/LaTex] how to insert multi line equation in the tabular environment

alignarrayscasesequationstables

How can insert multi line equation in the tabular environment?

For example see the following code that can show my request.

\begin{tabular}{rrr}
    &a &b\\
    &u=\begin{cases}  0;& i=0\\ 1;& i \neq 0  \end{cases} $e\\
    &c &d
\end{tabular}

Should I use another environment instead of the tabular?

@Grundlingh:

In fact, I'm trying to use the following code:

\begin{tabular}{lll}
&(A) $\ds u=\sqrt{x^2+y^2}$~~~~~~~~~~~~~~~~&(B) $\ds u=\sqrt{x^4+y^4}$\\
&(C) $\ds u=\sqrt[3]{xy}$ &(D) $\ds u=\sqrt[3]{x^2+y^2}$\\
&(E) $\ds u=\sqrt[3]{x^4+y^4}$ &(F) u=\begin{cases}e^{\frac{-1}{x^2+y^2}}; &x^2+y^2\neq 0\\ 0; &x^2+y^2=0\end{cases}\\
&(G) $\ds u=\sqrt[3]{x}\sin y$ &(H) $\ds u=\sqrt[3]{y}\tan x$\\
\end{tabular}

Best Answer

\documentclass{article}
\usepackage{amsmath,varwidth,array,ragged2e}
\newcolumntype{L}{>{\varwidth[c]{\linewidth}}l<{\endvarwidth}}
\newcolumntype{M}{>{$}l<{$}}
\def\ds{\mathrm{d}s}%  don't know what your \ds should be ....
\begin{document}

\def\arraystretch{1.7}
\begin{tabular}{rMrL}
(A) & \ds u=\sqrt{x^2+y^2} &(B) & $\ds u=\sqrt{x^4+y^4}$\tabularnewline
(C) & \ds u=\sqrt[3]{xy}   &(D) & $\ds u=\sqrt[3]{x^2+y^2}$\tabularnewline
(E) & \ds u=\sqrt[3]{x^4+y^4} & (F) & 
  \[ u=\begin{cases}e^{\frac{-1}{x^2+y^2}}; &x^2+y^2\neq 0\\ 0; &x^2+y^2=0\end{cases} \] \tabularnewline
(G) & \ds u=\sqrt[3]{x}\sin y & (H) & $\ds u=\sqrt[3]{y}\tan x$
\end{tabular}

\end{document}

enter image description here