<s>[INST] Tangent at a given point I have a function $\frac{x^2+2}{x-1}$. I want to find a tangent at a given point of $x=1+\sqrt{3}$.
At first, I found a value of the function at given point. This is what I got: $2+\frac{6}{\sqrt{3}}$
Then, I found a derivative of this point and I think it's $0$. So, for me the tangent is $y=(2+\frac{6}{\sqrt{3}})$ but, the proper result is $-2\sqrt{3}-2$. What am I doing wrong?
 [/INST] The derivative of a function $f$ at a point $x_0$ is the slope of the tangent line to $f$ at $x_0.$
So, let $f(x)=\frac{x^2+2}{x-1}$ and $x_0=1+\sqrt{3}.$
$$\Rightarrow f'(x)=\frac{(x-1)\cdot 2x - (x^2+2)\cdot 1}{(x-1)^2}=\frac{x^2-2x-2}{(x-1)^2}.$$
and $$f'(x_0)=f'(1+\sqrt{3})=\frac{(1+\sqrt{3})^2-2(1+\sqrt{3})-2}{(1+\sqrt{3}-1)^2}=0.$$
Now, to get the equation of the line we have $$y-f(x_0)=f'(x_0)(x-x_0)$$ but $f'(x_0)=0$ so we have $$y=f(x_0).$$
$$\Rightarrow y=f(x_0)=f(1+\sqrt{3})=\frac{(1+\sqrt{3})^2+2}{(1+\sqrt{3})-1}=\frac{6+2\sqrt{3}}{\sqrt{3}}\cdot\frac{\sqrt{3}}{\sqrt{3}}=\frac{6\sqrt{3}+6}{3}=2\sqrt{3}+2.$$
Therefore, $$y=2\sqrt{3}+2.$$ 
</s>