<s>[INST] A supposed to be easy calculus problem Find the values of $m$ if the line $y=mx+2$ is a tangent to the curve $x^2-2y^2=1$.
My working:
First we differentiate $x^2-2y^2=1$ with respect to $y$ to get the gradient. We get $y^2=\frac{1}{2}x^2-\frac{1}{2}\implies y=\pm\sqrt{\frac{1}{2}x^2-\frac{1}{2}}$.
We take the positive one for demonstration
$\frac{dy}{dx}=\frac{1}{2}x(\frac{1}{2}x^2-\frac{1}{2})^{-\frac{1}{2}}=\frac{x}{2\sqrt{\frac{1}{2}x^2-\frac{1}{2}}}$
$\implies(1-2m^2)x^2=-2m^2$
Since the tangent touches the curve, we can make $x^2-2(mx+2)^2=1$, we then get $(1-2m^2)x^2=9+8mx$
$\implies(1-2m^2)x^2=-2m^2$ and $(1-2m^2)x^2=9+8mx$ are two equations with two unknowns, then we should be able to find the values of $m$, but I couldn't find any easy way to solve those 2 simultaneous equations. Is there any easier method?
I tried solving $9+8mx=-2m^2$ but we still have two unknowns in one equation?
Also, if we don't use those two simultaneous equations, can we solve this question with a different method?
I am trying to solve WITHOUT implicit differentiation.
Many thanks for the help!
 [/INST] Let $(a,b)$ be a point of tangency. We have $2x-4y\frac{dy}{dx}=0$, so the slope of the tangent line at $(a,b)$ (if $b\ne 0$) is $\frac{a}{2b}$.
The tangent line has equation $y-b=(x-a)(a/2b)$. Simplifying , and comparing with $y=mx+2$, we find that $b-a^2/(2b)=2$. It follows that $2b^2-a^2=4b$. Since $a^2-2b^2=1$, we conclude that $b=-1/4$. The rest is routine.
Remark: Note that the tangent line happens to be at a point on the "lower" half of the hyperbola. So taking the positive square root turns out not to be useful. 
</s>