<s>[INST] Should we consider the line passing through the origin is having equal intercepts? I am a grade 11 student and I had the following question on my math test.
$x^2 +y^2+4x-8y+2=0$
is a circle and we have to find out the equations of the tangents of the circle that cuts off equal intercepts of the same sign from the axes of coordinates.
Naturally, I started with the equation being $\frac{x}{a}+\frac{y}{a}=1$ and found 2 equations. I then thought that I was assuming that the intercepts can never be 0 if I only used the formula.
So I then used the formula $y=mx$ to find two more equations and then kept the 4 equations as the answer. I didn't get any marks; so I gave back the copy for a recheck as I still , to some extent, believe that I was right.
Was I right about this? Or I should have kept the 1st two equations only??
Some people wanted to know the process of how I found the equation more descriptively. Here it is:
Given, $x^2 +y^2+4x-8y+2=0$ is a circle.
$\therefore$ centre, $C \equiv (-2,4)$, Radius, $R =\sqrt{18}$
Now, let the equation be $\frac{x}{a}+\frac{y}{a}=1$  where $a \neq 0$
$\implies x+y-a=0 \cdots (1)$.
$\therefore $ perpendicular distance to (1) from the centre
$ = \frac{|-2+4-a|}{\sqrt{1^2+1^2}} $ which should be equal to the radius if the line I tangent.
$\therefore \frac{|-2+4-a|}{\sqrt{1^2+1^2}} = \sqrt{18}\cdots (2)$
Solving 2 we get, $a=8,-4$
Again let,
Equation be $y-mx=0$ if the intercept is 0
Perpendicular distance from centre = $\frac{|2m+4|}{\sqrt{m^2+1}}=\sqrt{18}$[Radius] $\cdots (3)$
solving 3 we get, $m=1,-\frac{1}{7}$
Thus the required equations of tangent are:
$x+y-8=0$
$x+y+4=0$
$y=x$
$7y=x$
 [/INST] We have the circle $x^2+y^2+4x-8y+2 = 0$. We can rewrite that as $x^2+y^2+2gx+2fy+c = 0$, where $g=2$, $f=-4$, and $c=2$. This means the center of the circle is $\left(-g,-f\right) = \left(-2,4\right)$ and the radius $r$ is $\sqrt{g^2+f^2-c} = \sqrt{(-2)^2+(4)^2-2} = 3\sqrt2$.
Consider the equation of a line $y=mx+c$, which we can rewrite as $mx-y+c = 0$. Notice how the intercepts are $\left(0,c\right)$ and $\left(-\frac{c}{m},0\right)$. If we want to find the "equal intercepts of the same sign from the axes of coordinates," then it makes sense to let $m=1$ or $m=-1$.
(The wording in quotes is confusing, so from here I just decided to find all the tangent lines in general.)
The distance we are looking for, which is also the radius, is given by
$$\frac{\left|m\alpha-\beta+c\right|}{\sqrt{1+m^2}} = r \iff r^2 = \frac{(m\alpha-\beta+c)^2}{1+m^2}.$$
Since the center is $\left(-2,4\right)$, we can plug in $-2$ and $4$ for $\alpha$ and $\beta$, respectively, to get
$$\frac{(m(-2)-(4)+c)^2}{1+m^2} = 18.$$
Now we have to choose our $m$. If $m=-1$, then we can solve for $c$ to get $c=-4$ or $c=8$. If $m=1$, then we can solve for $c$ to get $c=0$ or $c=12$. This means the tangent lines are
$$\eqalign{
y&=-x+8 \cr
y &= -x-4 \cr
y &= x+12 \cr
y &= x+0
}$$
and notice how if you graph them along with the circle, they are lines tangent to the circle.
Does that answer your question?
</s>