[Tex/LaTex] fractions in table

fractionsmath-modetables

I have a table with three columns, in the second and third sometimes appear fractions:

\documentclass{scrartcl}
\usepackage{array}
\newcolumntype{C}{>{$}c<{$}}
\begin{document}
\def\arraystretch{1.5}
\begin{tabular}{|c|C|C|C|c|}
\hline Ableitung des Vielfachen  & c f(x) & c f'(x) \\ 
\hline Quotientenregel & \frac{f(x) }{ g(x)} &  \frac{  f'(x) g(x)  -  f(x) g'(x) }{g(x)^2} \\ 
\hline
\end{tabular}
\end{document} 

How to make the parts of the fraction the same high as the parts above them without the fractions (doubling the rowheight when needed, also not shrinking the fontsize)?

Best Answer

Use \dfrac from amsmath for this:

% arara: pdflatex

\documentclass{scrartcl}
\usepackage{mathtools} % loads amsmath
\usepackage{booktabs}
\usepackage{array}
\newcolumntype{C}{>{$}c<{$}}

\begin{document}
    \begin{tabular}{lCC}\toprule
        Ableitung des Vielfachen  & c f(x) & c f'(x) \\\midrule
        Quotientenregel & \dfrac{f(x)}{g(x)} & \dfrac{  f'(x) g(x)  -  f(x) g'(x)}{g(x)^2} \\ % I corrected the math here...
        \bottomrule
    \end{tabular}
\end{document} 

enter image description here