Calculus with Applications (10th Edition)

$x=5$ is a vertical line. The slope of a line is defined as the change in y divided by the change in x: $$m=\frac{\Delta y}{\Delta x}$$ Since $\Delta x=0$ for all vertical lines, the slope $m$ is undefined.