Trigonometry – Range of Function $ f(x)=|\sin(\frac{x}{2})|+|\cos(x)|$

trigonometry

Find the range of function $$f(x)=|\sin\bigg(\frac{x}{2}\bigg)|+|\cos(x)|.$$

Using $0\leq \bigg|\sin\bigg(\frac{x}{2}\bigg)\bigg|\leq 1$ and $ 0\leq |\cos(x)|\leq 1, 0\leq f(x)\leq 1+1=2.$ But minimum value is $\frac{1}{\sqrt{2}}$.

Other way what I tried:
$ f(x)=\bigg|\sin\bigg(\dfrac{x}{2}\bigg)\bigg|+\bigg|1-2\sin^2\bigg(\dfrac{x}{2}\bigg)\bigg|$.
$f(t)=|t|+|1-2t^2|,t=\sin\bigg(\dfrac{x}{2}\bigg).$ How can I get the minimum value?

Best Answer

Let us consider $g(x)=|\sin(x)|+|1-2\sin^2(x)|$. Observe that $g$ is $\pi$-periodic, ie $g(x+\pi)=g(x)$. Also since $\sin (x)=\sin(\pi-x)$, it follows that we can assume $x\in [0, \frac{\pi}2]$ since the graph just repeats laterally inverted in $[\frac{\pi}2,\pi]$.

$g(x)=\begin {cases}2\sin^2x+\sin x -1 && \frac{\pi}2\geq x\geq\frac{\pi}4 \\-2\sin^2x + \sin x +1&& \frac{\pi}4>x\geq 0\end{cases}$

For the first case, consider the parabola $y(x):=2x^2+x-1$. We are interested in $\frac{1}{\sqrt 2}\le x \le 1$. Note that $y$ has its minimum value $y(v)$ on its vertex where $v=-0.25$. Since $|v-\sin(\pi/4)|<|v-\sin(\pi/2)|$, it follows in this case that $$\max_{x=\sin(\pi/2)} y(x) = 2$$ and $$\min_{x=\sin(\pi/4)} y(x)=\frac{1}{\sqrt 2}$$

For the second case note the parabola $w(x):=-2x^2+x+1$ has a maximum value at its vertex $w(v)$ where $v=0.25$. Now note we are interested in $0\le x <\frac{1}{\sqrt 2}$. Noting that $v$ is within the permissible range of $x$, $w(v)$ is the maximum value attained in this case. Since $|v-\sin0|<|v-\sin(\pi/4)|$, it follows and $$\max_{x=0.25} w(x)=1.125$$ and $$\inf_{x=\sin(\pi/4)} w(x)=\frac{1}{\sqrt 2}$$

Combining both cases, $$\max_{x=\sin(\pi/2)} g(x)=2$$ $$\min_{x=\sin(\pi/4)} g(x)=\frac1{\sqrt 2}$$