# Confusion about continuity of derivative function

So, I have the function $$f(x)=|\sin(x)| +|\cos(x)|$$ and I have to check differentiability of $$f$$ at the point $$x=\frac{\pi}{2}$$.

Now $$f(x)= \sin(x) + \cos(x), \ \text{as } x \in (0,\frac{\pi}{2})$$ and $$f(x)= \sin(x) - \cos(x), \ \text{as } x \in (\frac{\pi}{2},\pi)$$

So, left hand derivative: $$\frac{d}{dx}(\sin(x) + \cos(x)), \ \text{as } x=\frac{\pi}{2} = -1$$.

And the right hand derivative: $$\frac{d}{dx}(\sin(x) - \cos(x)), \ \text{as } x=\frac{\pi}{2} = +1$$. As lhd $$\neq$$ rhd, $$f$$ is not differentiable at $$x=\frac{\pi}{2}$$.

Is there anything wrong in my reasoning?

• No, your argument is correct. – Kavi Rama Murthy Jul 10 at 10:25
• Your reasoning allows you to assure that the derivative of $f$ is not continuous at $\pi/2$, but tells nothing about its derivability at that particular point! – David Jul 10 at 10:28
• Then you guys are contradicting yourselves! – Prof.Shanku Jul 10 at 10:29
• @user587126 Yes, we do! If you can compute the limit in Dr. Graubner's answer, proceed that way to determine whether $f$ is differentiable. Are you familiar with Taylor polynomials? – David Jul 10 at 10:38
• @JoséCarlosSantos I want to know if my method of finding differentiability of the said function at $\pi/2$ is correct or not. – Prof.Shanku Jul 10 at 10:59

There are two different questions here:

• 1: Is $$f'$$ defined at $$\frac{\pi}{2}$$? (What you claim to have concluded)
• 2: Is $$f'$$ continuous at $$\frac{\pi}{2}$$? (What you ask on the title)

Obviously, 2 cannot be true without 1. Your reasoning proves that 2 is indeed false, but says nothing about 1 ($$f'$$ could still be defined at $$\frac{\pi}{2}$$, despite not being continuous)

By definition, $$f'(x)$$ exists if, and only if, the limit $$\lim_{h\to 0} \frac{f(x+h)-f(x)}{h}$$ exists and has a finite value. In our case, the limit becomes: $$\lim_{h\to 0} \frac{|sin(\frac{\pi}{2}+h)|+|cos(\frac{\pi}{2}+h)|-1}{h} = \lim_{h\to 0} \frac{|cos(h)|+|sin(h)|-1}{h}$$

Can you solve this now simpler limit?

• A function is differentiable at a point iff the right hand and left hand derivatives at that point are equal. OP's answer to 1) is correct and you are only making things more complicated than necessary. – Kavi Rama Murthy Jul 10 at 11:53
• @KaviRamaMurthy That result is true, but it may be harder to prove than getting the limit – David Jul 10 at 11:55
• The result I stated does not even require a proof. It is immediarte from the definition of derivative. – Kavi Rama Murthy Jul 10 at 11:57
• Oh, sure! I thought you were refering to left and right limits of the derivative function. Anyway, how would you calculate the left and right hand derivatives without the limits? It is true that you can get rid of the absolute values, but still... – David Jul 10 at 12:00
• Since $f(x)=\sin\, x+\cos \, x$ for $0<x <\pi /2$ the left hand derivative if $f$ at $\pi /2$ is same as the actual derivative of $\sin\, x+\cos \, x$ at that point. This again is immediate from definitions. – Kavi Rama Murthy Jul 10 at 12:05