$\displaystyle{\lim \limits_{x \to \frac\pi4}\frac{(\csc^2x-2\tan^2x)}{(\cot x-1)}}$ without L'Hôpitals Rule. The limit,
$\displaystyle{\lim \limits_{x \to \frac\pi4}\frac{(\csc^2x-2\tan^2x)}{(\cot x-1)}}=6$
is easily found using L'Hôpitals Rule. However, the exercise is to evaluate it without using this method. I've tried multiple substitutions, mainly pythagoric and reciprocal identities, but without success, the indeterminate form $\frac{0}{0}$ keeps appearing. I’ve also tried splitting the limit and doing the substitutions. I'm looking to simplify the expression in order to evaluate the limit directly.
Thanks in advance.
 A: Hint:$$\begin{align*}\frac{\csc^2 x-2\tan^2 x}{\cot x-1}&=\frac{\csc^2 x-2-2\tan^2 x+2}{\cot x-1} ]\\&=\frac{\csc^2 x-2}{\cot x-1}+2\tan x\frac{1-\tan^2 x}{1-\tan x}\\&=\frac{\cot^2 x-1}{\cot x-1}+2\tan x\frac{1-\tan^2 x}{1-\tan x}\\&=\boxed{\cot x+1+2\tan x(1+\tan x)}\end{align*}$$
It is easier to take the limit now.....
A: This limit can actually be calculated quite directly. You only need $\tan \frac{\pi}{4}= 1$
Rewrite the expression as follows and set $t=\tan x$ and consider $t\to 1:$
\begin{eqnarray*}\frac{(\csc^2x-2\tan^2x)}{(\cot x-1)}
& = & \frac{\frac{\cos^2 x}{\sin^2 x}+1-2\tan^2x}{\frac 1{\tan x}- 1} \\
& \stackrel{t=\tan x}{=} & \frac{\frac 1{t^2}+1-2t^2}{\frac 1t-1}\\
& = & \frac{1+t^2 - 2t^4}{t(1-t)}\\
& = & \frac{(1-t)(1+t)(1+2t^2)}{t(1-t)}\\
& = & \frac{(1+t)(1+2t^2)}{t} \stackrel{t\to1}{\longrightarrow}6\\
\end{eqnarray*}
A: I use (at the end)
$\begin{array}\\
\cos x-\sin x
&=\sqrt{2}((1/\sqrt{2})\cos x-(1/\sqrt{2})\sin x)\\
&=\sqrt{2}(\sin(\pi/4)\cos x-\cos(\pi/4)\sin x)\\
&=\sqrt{2}\sin(\pi/4-x)\\
\end{array}
$
$\begin{array}\\
v
&=\lim \limits_{x \to \frac\pi4}\dfrac{\csc^2x-2\tan^2x}{\cot x-1}\\
&=\lim \limits_{x \to \frac\pi4}\dfrac{\dfrac1{\sin^2x}-2\dfrac{\sin^2x}{\cos^2x}}{\dfrac{\cos x}{\sin x}-1}\\
&=\lim \limits_{x \to \frac\pi4}\dfrac{\cos^2x-2\sin^4x}{\sin x\cos^3 x-\sin^2x\cos^2x}\\
&=\lim \limits_{x \to \frac\pi4}\dfrac{1-\sin^2x-2\sin^4x}{\sin x\cos x(1-\sin^2x)-\sin^2x(1-\sin^2x)}\\
&=\lim \limits_{x \to \frac\pi4}\dfrac{(1-2\sin^2x)(1+\sin^2x)}{\sin x(1-\sin^2x)(\cos x-\sin x)}\\
&=\lim \limits_{x \to \frac\pi4}\dfrac{(1-2\sin^2x)(3/2)}{(\sqrt{2}/2)(\cos x-\sin x)}\\
&=\dfrac{3}{\sqrt{2}}\lim \limits_{x \to \frac\pi4}\dfrac{1-2\sin^2x}{(\cos x-\sin x)}\\
&=\dfrac{3}{\sqrt{2}}\lim \limits_{x \to \frac\pi4}\dfrac{(1-\sqrt{2}\sin x)(1+\sqrt{2}\sin x)}{\cos x-\sin x}\\
&=\dfrac{3}{\sqrt{2}}\lim \limits_{x \to \frac\pi4}\dfrac{(1-\sqrt{2}\sin x)(1+\sqrt{2}(\sqrt{2}/2))}{\cos x-\sin x}\\
&=\dfrac{6}{\sqrt{2}}\lim \limits_{x \to \frac\pi4}\dfrac{(1-\sqrt{2}\sin x)}{\cos x-\sin x}\\
&=\dfrac{6}{\sqrt{2}}\lim \limits_{x \to \frac\pi4}\dfrac{1-\sqrt{2}\sin x}{\sqrt{2}\sin(\pi/4-x)}\\
&=3\lim \limits_{x \to \frac\pi4}\dfrac{1-\sqrt{2}\sin x}{\sin(\pi/4-x)}\\
&=3\lim \limits_{y \to 0}\dfrac{1-\sqrt{2}\sin (y+\pi/4)}{\sin(-y)}\\
&=3\lim \limits_{y \to 0}\dfrac{1-\sqrt{2}(\sin y\cos(\pi/4)+\cos(y)\sin(\pi/4))}{\sin(-y)}\\
&=3\lim \limits_{y \to 0}\dfrac{1-2(\sin y+\cos(y))}{\sin(-y)}\\
&=3\lim \limits_{y \to 0}\dfrac{-2\sin y}{-\sin(y)}\\
&=6\\
\end{array}
$
A: $$\frac{\csc^2(x)-2\tan^2(x)}{\cot (x)-1}=2 \tan (x)+\cot (x)+2 \sec ^2(x)-1$$
A: The denominator $\cot x-1$ resembles $t-1$ too much to not be taken into consideration.
You surely know that
$$
\csc^2x=1+\cot^2x,\qquad \tan x=\frac{1}{\cot x}
$$
so the numerator becomes, with $\cot x=t$,
$$
1+t^2-\dfrac{2}{t^2}=\dfrac{t^4+t^2-2}{t^2}
$$
Never mind if you don't see the factorization $t^4+t^2-2=(t^2-1)(t^2+2)$; you do know that a factor $t-1$ can be found! With synthetic division you find
$$
\begin{array}{r|rrrr|r}
& 1 & 0 & 1 & 0 & -2 \\
1 & & 1 & 1 & 2 & 2
\\\hline
& 1 & 1 & 2 & 2 & 0\end{array}
$$
and thus $t^4+t^2-2=(t-1)(t^3+t^2+2t+2)$ and you can rewrite your limit in the form
$$
\lim_{x\to\pi/4}\frac{\cot^3x+\cot^2x+2\cot x+2}{\cot^2x}=6
$$
If you had seen $t^4+t^2-2=(t^2-1)(t^2+2)=(t-1)(t+1)(t^2+2)$, you'd get the equivalent form
$$
\lim_{x\to\pi/4}\frac{(\cot x+1)(\cot^2x+2)}{\cot^2x}
$$
