3. Given a line segment $AB$ of length 4, whose two endpoints lie on the parabola $y=x^{2}+x$. Then the shortest distance from the midpoint $P$ of the segment to the $x$-axis is ( ).
(A) 2
(B) $\frac{3}{2}$
(C) 1
(D) $\frac{1}{2}$
3. B.

From the problem, we know that the equation of the parabola can be rewritten as $y=x^{2}-\frac{1}{4}$, and the equation of the directrix is $y=-\frac{1}{2}$.

To make the distance from point $P$ to the $x$-axis the shortest, it means that the sum of the distances from points $A$ and $B$ to the directrix is the shortest. Therefore, when line $A B$ passes through the focus (otherwise, $F A+F B>A B=4$, where $F$ is the focus of the parabola), the sum of the distances from points $A$ and $B$ to the directrix is 4, and the distances from point $P$ to the directrix and the $x$-axis are $2, \frac{3}{2}$, respectively.