<s>[INST] general equation of a tangent line to a hyperbola Suppose that there is a hyperbola of the form $\frac{x^2}{a^2}-\frac{y^2}{b^2} = 1$.
I would like to figure out an equation that describes tangent line to this hyperbola.
How would I be able to do this using calculus? My calculus trials are bring me some gibberish answers.
I did use the calculus below, but what I want is how to derive the general form equation of $y=mx \pm \sqrt{a^2m^2-b^2}$ where $m$ refers to the slope of a tangent line.
 [/INST] (1a)
Let $y=mx+c$ be a tangent of $$\frac{x^2}{a^2}-\frac{y^2}{b^2}=1$$
Let $(h,k)$ be the point of intersection.
So,  $k=mh+c, b^2h^2-a^2k^2=a^2b^2\implies b^2h^2-a^2(mh+c)^2=a^2b^2$
or,$h^2(b^2-a^2m^2)- 2a^2mch -a^2b^2-a^2c^2=0 $
This is a quadratic equation in $h,$  for tangency, the roots need to be same, to make the two points of intersection coincident.
$\implies (- 2a^2mc)^2=4\cdot (b^2-a^2m^2)(-a^2b^2-a^2c^2)  $
$a^2m^2c^2=a^2m^2b^2+a^2m^2c^2-b^4-b^2c^2$ cancelling out $a^2$ as $a\ne0$
$0=a^2m^2b^2-b^4-b^2c^2$
$0=a^2m^2-b^2-c^2$ cancelling out $b^2$ as $b\ne0$
$\implies c^2=a^2m^2-b^2\implies c=\pm\sqrt{a^2m^2-b^2}$

(1b) 
Alternatively, we can take the central conic to be $Ax^2+By^2=1$
Applying the same method we get, $ABc^2=A+m^2B$
Here $A=\frac 1{a^2},B=-\frac 1{b^2}\implies  c^2=a^2m^2-b^2$

(2a)
Using calculus as André Nicolas has already done,
we find the equation of the tangent to be $$\frac {xx_1}{a^2}-\frac{yy_1}{b^2}-1=0$$
Comparing with $mx-y+c=0$ we get, $$\frac{x_1}{ma^2}=\frac{y_1}{b^2}=\frac{-1} c$$
Now $(x_1,y_1)$ lies on the given curve, so $\frac{x_1^2}{a^2}-\frac{y_1^2}{b^2}=1$, eliminating  $x_1,y_1$, we shall get the desired result.
(2b) we know , the parametric equation of the given curve is $x=a\sec t,y=b\tan t$
So, the equation of the tangent becomes $\frac{x\sec t}a-\frac{y\tan t}b-1=0$
Comparing with $mx-y+c=0$ we get, $$\frac{\sec t}{ma}=\frac{\tan t}b=\frac {-1}c$$
So, $\sec t=-\frac{ma}c,\tan t=-\frac b c$
Now use eliminate $t$.
</s>