4. a) Determine the geometric place of the midpoints of the chords of a circle $C$, which lie on lines passing through a given point.

b) Perform a discussion.
Solution. a) Let the equation of the circle be

$$
x^{2}+y^{2}=r^{2}
$$

and the equation of the lines of the chords passing through point $A(a, b)$

$$
y-b=k(x-a)
$$

If we eliminate $y$ from (1) and (2), we obtain the quadratic equation

$$
\left(1+k^{2}\right) x^{2}+2 k(b-a k) x+(k a-b)^{2}-r^{2}=0
$$

whose solutions we will denote by $x_{1}$ and $x_{2}$. The coordinates of the desired geometric locus are: $x=\frac{1}{2}\left(x_{1}+x_{2}\right), y=\frac{1}{2}\left(y_{1}+y_{2}\right)$. From Vieta's formulas and equation (2), we get

$$
x=k \frac{k a-b}{1+k^{2}}, \quad y=\frac{b-k a}{1+k^{2}}
$$

Eliminating $k$ from equations (3), we obtain the equation of the desired geometric locus, which is

$$
\left(x-\frac{a}{2}\right)^{2}+\left(y-\frac{b}{2}\right)^{2}=\frac{a^{2}+b^{2}}{4}
$$

b) The desired geometric locus is the circle (4), if point $A$ is inside the circle (1); part of the circle (4), if $A$ is outside the circle defined by equation (1).