# Discontinous vertical lines in table

I was drawing a table with extra spacing between the rows. Here is my code

\begin{tabular}{| c | c | c | c |}
\hline
$\alpha$ & $< -1$ & $=-1$ & $>-1$ \\
\hline
\\[-1em]
$\int_0^1 x^\alpha \dd{x}$ & D & D & C \\[0.5ex]
\hline
\\[-1em]
$\int_1^{+\infty} x^\alpha \dd{x}$ & C & D & D \\[0.5ex]
\hline
\end{tabular} As you can see there are discontinuous vertical lines. Why is that happening ?

You're not specifying all columns in the “empty” rows.

\documentclass{article}
\usepackage{amsmath}

\newcommand{\dd}{\mathop{}\!\mathrm{d}#1}

\begin{document}

\begin{tabular}{| c | c | c | c |}
\hline
$\alpha$ & $< -1$ & $=-1$ & $>-1$ \\
\hline
&&&\\[-1em]
$\int_0^1 x^\alpha \dd{x}$ & D & D & C \\[0.5ex]
\hline
&&&\\[-1em]
$\int_1^{+\infty} x^\alpha \dd{x}$ & C & D & D \\[0.5ex]
\hline
\end{tabular}
\end{document} A possible improvement, without the useless vertical rules:

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

\newcommand{\dd}{\mathop{}\!\mathrm{d}#1}

\begin{document}

\begin{tabular}{cccc}
\toprule
& $\alpha< -1$ & $\alpha=-1$ & $\alpha>-1$ \\
\midrule
$\displaystyle\int_0^1 x^\alpha \dd{x}$ & D & D & C \\
$\displaystyle\int_1^{+\infty} x^\alpha \dd{x}$ & C & D & D \\
\bottomrule
\end{tabular}

\end{document} \\[-1em] adds a blank line, breaking all the rules with \baselineskip of space and the backs up by 1em so will more or less randomly overprint the previous line or leave a gap, depending on the relative sizes of 1em and \baselineskip.

\\ should only ever be use before \hline not after.

To increase the spacing below the \hline you could increase \arraystretch or use

\setlength\extrarowheight{2pt}


which requires the array package.

Also tables usually look better without vertical lines, which would make the problem of the gaps go away as well.