<s>[INST] Straight line is tangent to the curve. The straight line $y=mx+1$ is tangent to the curve $x^2+y^2-2x+4y=0$. Find the possible values of $m$.
My attempt

Substitute the $y=mx+1$ into the equation $x^2+y^2-2x+4y=0$. $$x^2+(mx+1)^2-2x+4(mx+1)=0$$ $$x^2+m^2x^2+2mx+1-2x+4mx+4=0$$ $$(1+m^2)x^2+6mx-2x+5=0$$ $$(1+m^2)x^2+(6m-2)x+5=0$$
I think what I did is wrong as I don't know how to continue from my steps. Can anyone explains it? Thanks
 [/INST] If line $y=mx+1$ is a tangent to $F(x, y)=0$, where $F(x, y)$ is a polynom of degree $2$, then $F(x, mx+1)=0$ have exactly one solution. Hence, discriminant is zero: $$(6m-2)^2=4\cdot(1+m^2)\cdot5$$
</s>