What is the range of $f(x)= \lvert \cos(x) - \sin(x) \lvert$

70 Views Asked by At

I know that $ 0 \leq \lvert \cos(x) - \sin(x) \lvert $ but I am not sure how to proceed. Thanks for the help in advance!!

4

There are 4 best solutions below

6
On

HINT

Original problem - Range of $f(x)=|\cos x - \sin x|$

Recall that $$f(x)=\cos x - \sin x=\sqrt 2 \sin\left( \frac{\pi}4 -x \right)=\sqrt2\cos\left(\dfrac\pi4+x\right)$$

or as an alternative by

$$f'(x)=-\sin x -\cos x = -\cos x\left(\tan x+1\right)=0 \implies x=\frac{\pi}4+k\pi$$

New problem

Let consider $f(x,y)=\sin x - \cos y$

  • $f_x=\cos x=0$
  • $f_y=\sin y=0$

then critical points are

  • $x=\frac{\pi}2+k\pi$

  • $y=k\pi$

then determine max and min.

0
On

Notice that$$f({\pi\over 4})=0$$and$$f(-{\pi\over 4})=\sqrt 2$$

1
On

Hint: $$\cos x-1\cdot\sin x=\cos x-\tan\dfrac{\pi}{4}\cdot\sin x=\dfrac{\cos(x+\frac{\pi}{4})}{\cos\frac{\pi}{4}}$$

After Edit: $$0\leq|\cos x-\sin y|\leq|\cos x|+|\sin y|=2$$

0
On

If $f(x)=| \cos x- \sin x|$, then $g(x):=f(x)^2=1-\sin (2x)$. We have $0 \le g(x) \le 2$ , $g(-\frac{\pi}{4})=2$ and $g(\frac{\pi}{4})=0$. Since $g$ is continuous, we get $g( \mathbb R)=[0,2]$, thus $f( \mathbb R)=[0, \sqrt{2}].$