### Theory [Equation of a chord bisected at a point in a circle]

Consider that the equation of the circle is: $$x^2+y^2+2gx+2fy+c=0$$ The circle has center \((-g,-f)\). Since the chord gets bisected at point \((p,q)\), then the equation of the chord must be perpendicular to the line joining the center of the circle and the bisection point of the chord. Therefore, we get the line: $$\frac{x+g}{-g-p}=\frac{y+f}{-f-q}$$ $$\Rightarrow x(f+q)-y(g+p)+gq-pf=0$$ A line perpendicular to this one passing through \((p,q)\) is the equation of our chord, therefore: $$x(g+p)+y(f+q)+gp+p^2+fq+q^2=0$$ Another shorter method is to, consider the formula \(T=g(p,q)\), where \(T\) is the equation of tangent at the point \((p,q)\) of the circle, which gives us: $$px+qy+x(g+p)+y(f+q)=p^2+q^2+2pg+2fq$$ where we have found \(T\), the equation of tangent at point \((p,q)\) of the circle by substituting \(x^2=xp\), \(y^2=yq\), \(2x=x+p\) and \(2y=y+q\).