For the function \( f(x)=|\cos x| \) , which of the following statements are correct ?
(A) \( f(x) \) is continuous for all \( x\in R \)
(B) \( f(x) \) is differentiable for all \( x\in R \)
(C) \( f(x) \) is not differentiable at \( x=(2n+1)\displaystyle\frac{\pi}{2},n\in Z \)
(D) \( f(x) \) is not differentiable at \( x=n\pi,n\in Z \)
Choose the correct answer from the options given below:
Answer & explanation
Correct answer: option 1
The correct answer is Option (1) → (A) and (C) only
f is the composition of the continuous functions cos x and |x|, so it is continuous everywhere. The modulus can create a corner only where cos x changes sign, i.e. where cos x = 0, at \( x=(2n+1)\frac{\pi}{2} \).
At \( x=\frac{\pi}{2} \), for example, \( f(x)=\cos x \) just to the left and \( f(x)=-\cos x \) just to the right:
\( \displaystyle Lf'\left(\frac{\pi}{2}\right)=-\sin\frac{\pi}{2}=-1 \)
\( \displaystyle Rf'\left(\frac{\pi}{2}\right)=\sin\frac{\pi}{2}=1 \)
The one-sided derivatives differ, so f is not differentiable there; the same happens at every odd multiple of \( \frac{\pi}{2} \).
So f is continuous for all real x and is not differentiable exactly at \( x=(2n+1)\frac{\pi}{2} \), the zeros of cos x.
Checking the statements
(A) \( f(x) \) is continuous for all \( x\in R \) — Correct. A composition of continuous functions is continuous.
(B) \( f(x) \) is differentiable for all \( x\in R \) — Incorrect. At \( x=\frac{\pi}{2} \) the left and right derivatives are −1 and 1.
(C) \( f(x) \) is not differentiable at \( x=(2n+1)\frac{\pi}{2},n\in Z \) — Correct. These are exactly the zeros of cos x, where it changes sign.
(D) \( f(x) \) is not differentiable at \( x=n\pi,n\in Z \) — Incorrect. At x = nπ, cos x = ±1 ≠ 0, so near these points f(x) = cos x or −cos x, both differentiable.