We have a circle with radius 2, centred on the origin. Find the equation of the lines passing through the point $(0,4)$ which are tangent to the circle.
So we have the circle $$x^2 + y^2 = 4$$
We need 2 lines $$y=ax+4$$
So if you fill that in the equation of the circle, we end up with $$a^2x^2 + 8ax + x^2 + 12 = 0 $$.
So we'd have to solve $$ a = \dfrac{-8x \pm \sqrt{64x^2-4x^2(x^2+12)}}{2x^2}$$
I must have done something wrong, since this causes the discriminant to be negative, and thus gives no answer. Is there a smarter way I overlooked?
Suppose $A(x_1,y_1)$ is the point of the circle where the tangent is drawn.
Then the equation of the tangent is $xx_1+yy_1=4$. Since $(0,4)$ belongs to the tangent it satisfies her equation so $0x_1+4y_1=4\rightarrow y_1=1$.
Then subtitute this value to the circle equation
we get $x_1^2+y_1^2=4\rightarrow x_1^2+1^2=4\rightarrow x_1=\sqrt3$ or $x_1=-\sqrt3$.
Thus we have two tangents with equations:
$\sqrt3x+y=4$ and $-\sqrt3x+y=4$.