1

I have a function with multi-definition And I want to take it into a table. But i don't know how do that. Please help me, the image below is the result I want to have.

enter image description here

1

I used booktabs to have a better looking table; in particular, no use of vertical rules; the definitions by cases were built using the cases environment from amsmath:

\documentclass{article} 
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{array}

\begin{document}

\noindent\begin{tabular}{c>{$}c<{$}>{$}c<{$}}
\toprule
Function & \multicolumn{1}{c}{Definition} & \multicolumn{1}{c}{Range} \\
\midrule
Linear & f(x)=x & (-\infty,\infty) \\[2ex]
Symmetric Saturating Linear & f(x)=\begin{cases}-1, &\quad x<1. \\ x, &\quad -1\leq x\leq 1 \\ 1, &\quad x>1.\end{cases} & [-1,1] \\[5ex]
Log-Sygmoid & f(x) = \dfrac{1}{1+e^{-x}} & (0,1) \\[3ex]
Hyperbolic Tangent Sygmoid & f(x) = \dfrac{e^{x}-e^{-x}}{e^{x}+e^{-x}} & (-1,1) \\[3ex]
Hard Limit & f(x)=\begin{cases}0, &\quad x<0. \\ 1, &\quad x\geq 1. \end{cases} & \{0,1 \} \\
\bottomrule
\end{tabular}

\end{document}

enter image description here

Another option, with a different alignment in the first cases:

\documentclass{article} 
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{array}

\begin{document}

\noindent\begin{tabular}{c>{$}c<{$}>{$}c<{$}}
\toprule
Function & \multicolumn{1}{c}{Definition} & \multicolumn{1}{c}{Range} \\
\midrule
Linear & f(x)=x & (-\infty,\infty) \\[2ex]
Symmetric Saturating Linear & f(x)=\begin{cases}-1, &\quad\hfill x<1. \\ \phantom{-}x, &\quad -1\leq x\leq 1. \\ \phantom{-}1, &\quad\hfill x>1.\end{cases} & [-1,1] \\[5ex]
Log-Sygmoid & f(x) = \dfrac{1}{1+e^{-x}} & (0,1) \\[3ex]
Hyperbolic Tangent Sygmoid & f(x) = \dfrac{e^{x}-e^{-x}}{e^{x}+e^{-x}} & (-1,1) \\[3ex]
Hard Limit & f(x)=\begin{cases}0, &\quad x<0. \\ 1, &\quad x\geq 1. \end{cases} & \{0,1 \} \\
\bottomrule
\end{tabular}

\end{document}

enter image description here

In case the original vertical rules are required, you're table would look like:

\documentclass{article} 
\usepackage{amsmath}
\usepackage{array}

\begin{document}

\noindent\begin{tabular}{|| l | >{$}c<{$} | >{$}c<{$} ||}
\hline
Function & \multicolumn{1}{c|}{Definition} & \multicolumn{1}{c||}{Range} \\
\hline
Linear & f(x)=x & (-\infty,\infty) \\[1ex]
Symmetric Saturating Linear & f(x)=\begin{cases}-1, &\quad x<1. \\ x, &\quad -1\leq x\leq 1 \\ 1, &\quad x>1.\end{cases} & [-1,1] \\
\hline
\end{tabular}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.