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.