<s>[INST] Finding function given limit $$\lim_{x\to2} \frac{x^2-cx+d}{x^2-4} = 3$$
Find $c$ and $d$.
I tried replacing all the x's with 2, but ended up with 0 on the bottom. In order for the limit to exist, something from the top has to cancel out with $(x+2)$ or $(x-2)$. How do I find $c$ and $d$?
 [/INST] We have that
$$\lim_{x\to 2}\frac{x^2-cx+d}{x^2-4}=3$$
requires that for $x=2$
$$x^2-cx+d=0 \implies 4-2c+d=0 \implies d=-4+2c$$
then
$$x^2-cx+d=x^2-cx-4+2c=(x-2)(x+2)-c(x-2)=(x-2)(x+2-c)$$
then
$$\lim_{x\to 2}\frac{x^2-cx+d}{x^2-4}=\lim_{x\to 2}\frac{(x-2)(x+2-c)}{(x-2)(x+2)}$$
As an alternative once we recognize that the numerator must vanish at $x=2$, we can use l'Hopital to obtain
$$\lim_{x\to 2}\frac{x^2-cx+d}{x^2-4}=\lim_{x\to 2}\frac{2x-c}{2x}=3$$
from which we can find $c$ and then $d$.
</s>