Calculus - Limit calculate help I'm having a problem to solve this limit.
$$\lim_{x \to \pi/4} \frac{\tan x-1}{\sin x-\cos x}$$
$\lim_{x \to \pi/4} \frac{\tan x-1}{\sin x-\cos x}$ = 
$\lim_{x \to \pi/4} \frac{\frac{\sin x}{\cos x}-1}{\sin x-\cos x}$=
$\lim_{x \to \pi/4} \frac{\frac{\sin x-\cos x}{\cos x}}{\sin x-\cos x}$=
$\lim_{x \to \pi/4} \frac{\frac{\frac{\sin x-\cos x}{\cos x}}{\sin x-\cos x}}{1}$ =
numerator is : (upper*lower) = 1*$\sin x-\cos x$
denominator is : (inner-up*inner-low) = $\cos x*(\sin x-\cos x)$. 
Which is :
$$\lim_{x \to \pi/4} \frac{\sin x-\cos x}{(\cos x)(\sin x-\cos x)}$$
I don't know what to do next?
Any ideas?
 A: Rearrange the fraction into something simpler. Express $\tan(x)$ in terms of $\sin(x)$ and $\cos(x)$.
$$\frac{\tan(x)-1}{\sin(x)-\cos(x)}=\frac{\frac{\sin(x)}{\cos(x)}-1}{\sin(x)-\cos(x)}$$
You've done this and the next step in your own work.
$$=\frac{\frac{\sin(x)}{\cos(x)}-\frac{\cos(x)}{\cos(x)}}{\sin(x)-\cos(x)}$$
$$=\frac{\frac{\sin(x)-\cos(x)}{\cos(x)}}{\sin(x)-\cos(x)}$$
Factor out $(\sin(x)-\cos(x))$ from the numerator and denominator.
$$=\frac{\sin(x)-\cos(x)}{\sin(x)-\cos(x)}\cdot\frac{\frac{1}{\cos(x)}}{1}$$
$$=\frac{\frac{1}{\cos(x)}}{1}=\frac{1}{\cos(x)}$$
$$\therefore\:\frac{\tan(x)-1}{\sin(x)-\cos(x)}=\frac{1}{\cos(x)}$$
Apply the limit to both sides.
$$\lim_{x \to \pi/4} \frac{\tan x-1}{\sin x-\cos x}=\lim_{x \to \pi/4} \frac{1}{\cos(x)}$$
The limit is then the value of $\frac{1}{\cos(x)}$ at $x=\frac{\pi}{4}$. In this particular case, you can substitute $x=\frac{\pi}{4}$ (but you can't always do this).
$$\frac{1}{\cos(\frac{\pi}{4})}=\frac{1}{\left(\frac{1}{\sqrt{2}}\right)}$$
$$\therefore\:\sqrt{2}$$
A: Safely cancel out $\sin x-\cos x$ as $\displaystyle x\to\frac\pi4,\sin x-\cos x\to0\implies\sin x-\cos x\ne0$
Things will be clearer if we write $$\lim_{x \to \pi/4} \frac{\tan x-1}{\sin x-\cos x}=\lim_{x\to\dfrac\pi4}\frac{\tan x-1}{\cos x(\tan x-1)}$$
As $\displaystyle x\to\frac\pi4,\tan x\to1\implies\tan x\ne1$
