# How to check the differentiability of $|\cos x|+|\sin(2-x)|$?

$$f(x)=|cosx|+|sin(2−x)|$$ At which of the following point $$f$$ is not differentiable?

1. $$(2n+1)\pi/2$$
2. $$n\pi$$
3. $$n\pi+2$$
4. $$n\pi/2$$

where $$n \in \mathbb{Z}$$.

When I tried to solve it graphically, I got that $$|\sin x|$$ is not differentiable at $$n\pi$$ where $$n\in\mathbb{Z}$$ and $$|\cos x|$$ is not differentiable at $$(n+1)\pi/2$$ (I am not sure about this one). So the given function must not be differentiable at option (1) and option (3). Am I correct?

(I know this is duplicate but from there I could not get the answer satisfactorily and I can not even comment so I am posting it here)

• Your solution seems correct. What do you expect from an answer? – Aleksejs Fomins Mar 20 at 7:53
• Actually I am not sure about the differentiability of $|cosx|$ and I am also confused among the options so I expect a concrete proof of the correct answers. – Huny Mar 20 at 7:56
• $cos(x) = sin(x + \pi / 2)$, so it's differentiability is shifted by $\pi/2$ wrt $sin(x)$ – Aleksejs Fomins Mar 20 at 8:00
• Got it!Thanks!! – Huny Mar 20 at 8:02

• @Huny: consider the case of $2|\sin x|-|\sin 2x|$. – Yves Daoust Mar 20 at 8:04
• Also I am confused for the fourth option. $|cosx|$ is not differentiable at the odd multiples of $\pi/2$ and here n can be both(even or odd) so how can we assure the differentiability of the function at this point? – Huny Mar 20 at 8:10