The range of the function $f:\mathbb{R}\to \mathbb{R}$ given by $f(x)=\frac{3+2 \sin x}{\sqrt{1+ \cos x}+\sqrt{1- \cos x}}$ The range of the function $f:\mathbb{R}\to \mathbb{R}$ given by $f(x)=\frac{3+2 \sin x}{\sqrt{1+ \cos x}+\sqrt{1- \cos x}}$ contains $N$ integers. Find the value of $10N$.
I tried to find the minimum and maximum value of the function.First i simplified the function.
$f(x)=\frac{3+2 \sin x}{\sqrt{1+ \cos x}+\sqrt{1- \cos x}}=\frac{1+4\sin^2\left(\frac{x}{2}+\frac{\pi}{4}\right)}{2\sin \left(\frac{x}{2}+\frac{\pi}{4}\right)}$
Then i differentiated the function and equate it to zero to get the critical points.
Critical point equations are $\cos\left(\frac{x}{2}+\frac{\pi}{4}\right)=0$
$\sin\left(\frac{x}{2}+\frac{\pi}{4}\right)=\frac{1}{2},\sin\left(\frac{x}{2}+\frac{\pi}{4}\right)=\frac{-1}{2}$
When i checked plotted the function on desmos.com graphing calculator,i found minimum value to be $0.5$ and maximum value to be $2.5$.
Which i cannot get by my critical points.Where have i gone wrong?Please help me. 

Your simplified equation is correct only for $0 \leq x \leq \pi$. During your derivation be sure to consider both positive and negative square roots in the denominator. The result is an alternate version of your simplified equation 
$f(x)=\frac{3+2 \sin x}{\sqrt{1+ \cos x}+\sqrt{1- \cos x}}=\frac{5-4\sin^2\left(\frac{x}{2}-\frac{\pi}{4}\right)}{2\sin \left(\frac{x}{2}-\frac{\pi}{4}\right)}$
valid for $\pi < x < 2\pi$. When you work this through you will get another critical point at $\cos(x/2 - \pi/4)=0$.
