Given $$\lim_{ x\to \infty} \sqrt{x^2-x+1} -px-q=0$$ find the values of $p$ and $q$. The answer is $p=1$ and $q= -1/2$.
I know the method is using L'Hospital’s rule and I rationalise the denominator. But I don’t know how to find the p and q. Thank you very much!
HINT
We have that
$$\sqrt{x^2-x+1}-px-q=\left[\sqrt{x^2-x+1}-(px+q)\right]\frac{\sqrt{x^2-x+1}+(px+q)}{\sqrt{x^2-x+1}+(px+q)}=$$
$$=\frac{x^2-x+1-(px+q)^2}{\sqrt{x^2-x+1}+(px+q)}=\frac{x^2-x+1-p^2x^2-2pqx-q^2}{\sqrt{x^2-x+1}+(px+q)}$$