How do I find the difference between the gradients of two lines represented by an equation I want to find the difference between the gradients (or slopes?) of two lines. The equation of the lines is $$x^2(\tan^2 \theta+\cos^2 \theta)-2xy\tan\theta+y^2 \sin^2 \theta=0$$
I have assumed the gradients are $m_1$ and $m_2$.
I compared the given equation with the general equation $ax^2+2hxy+by^2$ and found out the respective values and plugged it in the formula I know ie
$m_1-m_2=2\sqrt{h^2-ab}=2\sqrt{\tan^2 \theta-(\tan^2 \theta+\cos^2 \theta) \sin^2 \theta}$
Proceeding from here is difficult and the answer given in my book is $2$. How do I do this or is that an error? Thanks in advance!
 A: I'm going to guess wildly at what you actually mean because you do not write what you actually mean.  I expect that if you clarify your question and it turns out I have guessed wrongly, others will vote this answer into oblivion, as they should...
Say we have two lines in point-slope form: $$\begin{align}
    y &= m_1 x + b_1 , \\
    y &= m_2 x + b_2 .
\end{align}$$  We may combine these equations as $$
    (y-m_1 x - b_1)(y - m_2 x - b_2) = 0
$$ and expand, giving $$
    y^2 -(m_1 + m_2) x y + m_1 m_2 x^2 -(b_1 + b_2) y + (b_1 m_2 + b_2 m_1) x + b_1 b_2 = 0 .
$$  Writing your equation in the same form, we have $$
    y^2 -2\frac{\tan \theta}{\sin^2 \theta} x y + \frac{\tan^2 \theta + \cos^2 \theta}{\sin^2 \theta} x^2 - 0 y + 0 x + 0 = 0 .
$$  Comparing coefficients of the constant and linear terms, we discover $b_1 + b_2 = 0$ and $b_1 b_2 = 0$, so $b_1 = b_2 = 0$.  Comparing coefficients of the degree $2$ terms, we find the system $$\begin{align}
    m_1 + m_2 = 2\frac{\tan \theta}{\sin^2 \theta} \text{ , and} \\
    m_1 m_2 = \frac{\tan^2 \theta + \cos^2 \theta}{\sin^2 \theta} .\\
\end{align}$$
It's a useful fact that $(m_1 + m_2)^2 - 4 m_1 m_2 = (m_1 - m_2)^2$, which one can easily verify by expanding.  Therefore, $$\begin{align}
    (m_1 - m_2)^2 &= 4 \frac{\tan^2 \theta}{\sin^4 \theta} - 4 \frac{(\tan^2 \theta + \cos^2 \theta)}{\sin^2 \theta} \\
        &= 4 \frac{\tan^2 \theta - \sin^2 \theta (\tan^2 \theta + \cos^2 \theta)}{\sin^4 \theta} \\
        &= 4 \frac{\tan^2 \theta (1 - \sin^2 \theta) - \sin^2 \theta \cos^2 \theta}{\sin^4 \theta} \\
        &= 4 \frac{(\tan^2 \theta - \sin^2 \theta) \cos^2 \theta}{\sin^4 \theta} \\
        &= 4 \frac{(\sec^2 \theta - 1) \cos^2 \theta}{\sin^2 \theta} \\
        &= 4 \frac{\tan^2 \theta \cos^2 \theta}{\sin^2 \theta} \\
        &= 4 ,
\end{align}$$ as desired. 
