The range of the function $f(x)=\frac{\sin x}{\sqrt{1+\tan^2x}}-\frac{\cos x}{\sqrt{1+\cot^2x}}$ Find the range of the function $f(x)=\frac{\sin x}{\sqrt{1+\tan^2x}}-\frac{\cos x}{\sqrt{1+\cot^2x}}$.
By simply looking at the problem and simplifying trigonometrically,it looks as if range is zero but not.I think there is some trick to solve this.I am perplexed.I tried to find the domain first but not successful.Please help....
 A: Using $\displaystyle |\sin x|=\left\{\begin{matrix}
\displaystyle \sin x \;,& \displaystyle 0 \leq x\leq \frac{\pi}{2} \\\\ 
\displaystyle \sin x \;,& \displaystyle \frac{\pi}{2} \leq x\leq \pi \\\\ 
 \displaystyle -\sin x\;, & \displaystyle\pi \leq x\leq \frac{3\pi}{2} \\\\ 
 \displaystyle -\sin x \;,& \displaystyle\frac{3\pi}{2} \leq x\leq 2\pi
\end{matrix}\right.$ and $\displaystyle |\cos x|=\left\{\begin{matrix}
\displaystyle \cos x \;,& \displaystyle 0 \leq x\leq \frac{\pi}{2} \\\\ 
\displaystyle -\cos x \;,& \displaystyle \frac{\pi}{2} \leq x\leq \pi \\\\ 
 \displaystyle -\cos x \;,& \displaystyle\pi \leq x\leq \frac{3\pi}{2} \\\\ 
 \displaystyle \cos x \;,& \displaystyle\frac{3\pi}{2} \leq x\leq 2\pi
\end{matrix}\right.$ 
So $$\displaystyle f(x)=\frac{\sin x}{\sqrt{1+\tan^2x}}-\frac{\cos x}{\sqrt{1+\cot^2x}} = \sin x\cdot \left|\cos x\right|-\cos x\cdot \left|\sin x\right|$$
Here Function $f(x)$ is Periodic With Time Period $= 2\pi.$
So we will Calculate for Only one Time Period.
In $\bullet \displaystyle \; 0 \leq x\leq \frac{\pi}{2}\;,$ We get $f(x) = \sin  x\cdot \cos x-\cos x\cdot \sin x = 0$
In $\bullet \displaystyle \; \frac{\pi}{2} \leq x\leq \pi\;,$ We get $f(x)=-\sin 2x .$ So $0 \leq f(x)\leq 1$ 
In $\bullet \displaystyle \; \pi \leq x\leq \frac{3\pi}{2}\;,$ We get $f(x)=0 .$
In $\bullet \displaystyle \; \frac{3\pi}{2} \leq x\leq 2\pi\;,$ We get $f(x)=\sin 2x .$ So $-1 \leq f(x)\leq 0$
So Here We get $\displaystyle -1 \leq f(x)\leq 1$   
A: Not quite.
The function is indeed zero in $[0,\pi/2]$, but is not zero in $[\pi/2, \pi]$. This is because $\sqrt{x^2} \neq x$, but rather $|x|$.
Thus, in areas where both $\cos x$ and $\sin x$ are jointly positive or negative, the function will be zero. But in cases where they are not...
A: if sinx>=0 and cosx>=0 : f(x)=0
if sinx>=0 and cosx<=0 (90<=x<=180) : f(x)=-2sinx.cosx=-sin(2x)  
180<=2x<=360 :   -1<=sin(2x)<=0  :     0<=-sin(2x)<=1   :   0<=f(x)<=1
if sinx<0 and cosx<0 : f(x)=0
if sinx<=0 and cosx>=0 : (-90<=x<=0) : f(x)=2sinx.cosx=sin(2x) 
-180<=2x<=0 :  -1<=sin2x<=0 :   -1<=f(x)<=0
So -1<=f(x)<=1
