Example 2. Find the equation of the circle passing through the intersection points of the line $2 x+y+4=0$ and the circle $x^{2}+y^{2}+2 x-4 y+1=0$, and satisfying one of the following conditions: (1) passing through the origin; (2) having the minimum area.
The equation of a circle passing through the intersection points of a line and a circle can be written as
$$
\lambda(2 x+y+4)+\left(x^{2}+y^{2}+2 x-4 y+1\right)=0 \text {, }
$$

Rearranging, we get
$$
\begin{array}{l}
x^{2}+y^{2}+2(1+\lambda) x+(\lambda-4) y+(1+4 \lambda) \\
=0 .
\end{array}
$$
(1) Since this circle passes through the origin, substituting $x=0, y=0$ into (1), we get $1+4 \lambda=0, \lambda=-\frac{1}{4}$.
Therefore, the equation of the required circle is
$$
x^{2}+y^{2}+\frac{3}{2} x-\frac{17}{4} y=0 \text {. }
$$
(2) When the radius of the circle is the smallest, its area is also the smallest. Completing the square for (1), we get the standard equation of the circle as
$$
\begin{array}{l}
{[x+(1+\lambda)]^{2}+\left(y+\frac{\lambda-4}{2}\right)^{2}} \\
:=(1+\lambda)^{2}+\frac{(\lambda-4)^{2}}{4}-4 \lambda-1,
\end{array}
$$
$[x+(1+\lambda)]^{2}+\left(y+\frac{\lambda-4}{2}\right)^{2}$
$$
=\frac{5}{4}\left(\lambda-\frac{8}{5}\right)^{2}+\frac{4}{5} .
$$

Hence, when $\lambda=\frac{8}{5}$, the area of the circle is the smallest. Therefore, the equation of the required circle is $\left(x+\frac{13}{5}\right)^{2}+\left(y-\frac{6}{5}\right)^{2}=\frac{4}{5}$.