<s>[INST] How to find the discriminant of this function How to find the discriminant of this equation:
$x^2+(ax+6)^2=4x+4$
Because, if I'm correct, that becomes: $x^2+32+12ax+a^2x^2$, and I have no clue how to continue..
 [/INST] The equation can arranged as $x^2+x(a-4)+2=0$
So, the discriminant is $(a-4)^2-4\cdot1\cdot 2=a^2-8a+8$ 

With the edited  question,the equation can arranged as $x^2(1+a^2)+x(-4+12a)+32=0$
So, the discriminant is $(12a-4)^2-4\cdot(a^2+1)\cdot32=16a^2-96a-112$
SO, $$x=\frac{-(12a-4)\pm\sqrt{16a^2-96a-112}}{2\cdot (1+a^2)}=\frac{2-6a\pm\sqrt{4a^2-24a-28}}{a^2+1}$$
</s>