Equation of a line tangent to a circle: why it works? I've the problem following: "Determine the points on the circumference of the circle $x^2 + y^2 = 1$ whose tangent lines are 
and the point $(3,0)$." I found the derivative $\dfrac{\mathrm{d} y}{\mathrm{d} x}=-\dfrac{x}{y}$ and I managed to solve the exercise by doing something like:
$y^2 = 1 - x^2\\
y - f(p) = f'(p)\cdot(x-p) \quad (1)\\
y - 0 = -\dfrac{x}{y}\cdot(x - 3)\\
y^2 = -x^2 + 3x\\
x = \dfrac{1}{3}\\$
From there I managed to get the correct equation of the line tangent to the circle as required by the exercise. But when I do $x=3$ in the line (1), I get:
$\sqrt{1-x^2}=\dfrac{-3}{\sqrt{1-3^2}}\cdot(x-3)$,
which results in some strange stuff. Then I don't know if the way I solved it is the correct one. If it is, why I can't obtain $x=\dfrac{1}{3}$ when $x=3$?
Thanks in advance.
 A: We do it the calculus way (there is a much simpler geometric way). 
Let the point(s) of tangency be $(a,b)$. Then by your calculation, the slope of the tangent line is $-\frac{a}{b}$. 
The tangent line, we are told, goes through the external point $(3,0)$. The line joining $(a,b)$ to $(3,0)$ has slope $\frac{b}{a-3}$. Thus we arrive at
the equation
$$\frac{b}{a-3}=-\frac{a}{b}.$$
Simplification gives $b^2=-a(a-3)$ and therefore $a^2+b^2=3a$. But $a^2+b^2=1$, and therefore $3a=1$. It follows that $a=\frac{1}{3}$. A picture, or algebra, shows there are two tangent lines, since $a^2+b^2=1$ yields two values of $b$.
Much closer to what you did is to find the equation of the tangent line. The tangent line has slope $-\frac{a}{b}$ and passes through $(a,b)$. It follows that an equation of the tangent line(s) is
$$y-b=-\frac{a}{b}(x-a).$$
Substitute the point $(3,0)$ for $(x,y)$. Some algebra, together with $a^2+b^2=1$, gives us the desired result.
Remark: It is very important not to let $(x,y)$ be the mystery point(s) of tangency, for that risks confusion with the variables used in describing the equation of the tangent line. 
For an approach using analytic geometry, let the point(s) of tangency be $P=(a,b)$. Note that the line through $P$ and $(3,0)$ is perpendicular to the line $OP$. It follows by the Pythagorean Theorem that
$$(a-3)^2+b^2+1^2=3^2.$$
Some algebra, together with $a^2+b^2=1$, yields $a=\frac{2}{6}$. 
Or else we can use the fact that the line $OP$ has slope $\frac{b}{a}$ and therefore the tangent line at $P$ has slope $-\frac{a}{b}$. Now use the calculation of the first solution. 
A: The problem here is that line $(1)$ represents the equation of the tangent line to the curve $y = f(x)$ at the point $(p,f(p))$. Since $(3,0)$ is not on the curve $y = f(x)$, you applied this formula incorrectly.
Since André gave you the intended way of solving it, I'll show you the geometric way of doing it: similar triangles! Let $O$ be the centre of the circle, let $A$ be the point of tangency on the circle, and let $B$ be the external point $(3,0)$. Draw a vertical line through the circle at point $A$, and let $C$ be the point where this vertical line crosses the $x$-axis. Observe that $\Delta OAB$ is similar to $\Delta OCA$. Hence, by computing the scale factor in two different ways, it follows that:
$$
\frac{OC}{OA} = \frac{OA}{OB} \iff x = \frac{1}{3}
$$
