<s>[INST] Limit with trigonometric function $\lim_{x \to \frac{\pi}{4}} \frac{\tan^2(x)-1}{\cos(x)-\sin(x)}$ I have this limit, I have resolved it until a part but I'm stucked now.
$$\lim_{x \to \frac{\pi}{4}} \frac{\tan^2(x)-1}{\cos(x)-\sin(x)}$$
$$ \lim_{x \to \frac{\pi}{4}} \frac{\frac{\sin^2(x)}{\cos^2(x)}-\frac{\cos^2(x)}{\cos^2(x)}}{\cos(x)-\sin(x)}$$
$$ \lim_{x \to \frac{\pi}{4}} \frac{\frac{\sin^2(x)-\cos^2(x)}{\cos^2(x)}}{\frac{\cos(x)-\sin(x)}{1}}$$
$$\lim_{x \to \frac{\pi}{4}} \frac{ \sin^2(x)-\cos^2(x)}{\cos^2(x)(\cos(x)-\sin(x)}$$
$$\lim_{x \to \frac{\pi}{4}} \frac{\sin(x)-\cos(x)}{\cos^2(x)}$$
$$\lim_{x \to \frac{\pi}{4}} \frac{\sin(x)}{\cos^2(x)}-\frac{\cos(x)}{\cos^2(x)}$$
$$\lim_{x \to \frac{\pi}{4}} \frac{\sin(x)}{\cos^2(x)}-\frac{1}{\cos(x)}$$
And now I replace by $\frac{\pi}{4}$ and what I get is $0$.
What am I doing wrong?
 [/INST] $$\frac{ \sin^2 x-\cos^2 x}{\cos x -\sin x} \neq \sin x-\cos x .$$
</s>