The straight line $y=mx+1$ is tangent to the curve $x^2+y^2-2x+4y=0$. Find the possible values of $m$.
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