UPSC MainsMathematics (Optional)Science and TechnologyPractice question

Differentiability of Modulus Trigonometric Function

Is f(x) = |cos x| + |sin x| differentiable at x = π/2? If yes, find its derivative at x = π/2. If no, give a proof of it.

FindProve~250 words3 min readmedium
Attempt it first, timed · optional

Write the answer on paper, as in the exam. Start the timer, keep to the word target.

00:00/ 11 min · 250 words

Done writing? Photograph the sheet and see how it scores against this model answer, with feedback on what to fix.

Upload your answer sheet

How to approach

Evaluate the value of the function f(x) at x = π/2. Compute the left-hand derivative (LHD) and right-hand derivative (RHD) using first principles by considering the signs of cos x and sin x in the immediate neighbourhoods of π/2. Conclude differentiability based on whether LHD equals RHD.

Model answer

444 words

Introduction

A real-valued function f(x) is differentiable at a point x = c if and only if both its left-hand derivative (LHD) and right-hand derivative (RHD) exist and are equal at that point. For the function f(x) = |cos x| + |sin x|, the modulus operator introduces potential points of non-differentiability where the underlying trigonometric expressions vanish.

Value of the Function at x = π/2

Substituting x = π/2 into f(x):

f(π/2) = |cos(π/2)| + |sin(π/2)| = |0| + |1| = 1.

Evaluation of the Left-Hand Derivative (LHD)

For x approaching (π/2)⁻ from the left, let x = π/2 - h where h > 0 and h → 0:

  • Behaviour of cos x: cos(π/2 - h) = sin h > 0, which implies |cos x| = sin h.
  • Behaviour of sin x: sin(π/2 - h) = cos h > 0, which implies |sin x| = cos h.

Thus, f(π/2 - h) = sin h + cos h.

By the definition of the left-hand derivative:

f'(π/2⁻) = lim_{h → 0⁺} [f(π/2 - h) - f(π/2)] / (-h)

f'(π/2⁻) = lim_{h → 0⁺} [sin h + cos h - 1] / (-h) = lim_{h → 0⁺} [ - (sin h)/h - (cos h - 1)/h ]

Using standard limits lim_{h → 0} (sin h)/h = 1 and lim_{h → 0} (1 - cos h)/h = 0:

f'(π/2⁻) = -1 - 0 = -1.

Evaluation of the Right-Hand Derivative (RHD)

For x approaching (π/2)⁺ from the right, let x = π/2 + h where h > 0 and h → 0:

  • Behaviour of cos x: cos(π/2 + h) = -sin h < 0, which implies |cos x| = -(-sin h) = sin h.
  • Behaviour of sin x: sin(π/2 + h) = cos h > 0, which implies |sin x| = cos h.

Thus, f(π/2 + h) = sin h + cos h.

By the definition of the right-hand derivative:

f'(π/2⁺) = lim_{h → 0⁺} [f(π/2 + h) - f(π/2)] / h

f'(π/2⁺) = lim_{h → 0⁺} [sin h + cos h - 1] / h = lim_{h → 0⁺} [ (sin h)/h + (cos h - 1)/h ]

f'(π/2⁺) = 1 + 0 = 1.

Comparison and Conclusion

Comparing the one-sided limits, f'(π/2⁻) = -1 while f'(π/2⁺) = 1. Since the left-hand derivative does not equal the right-hand derivative (LHD ≠ RHD), the limit defining the derivative does not exist.

Conclusion

Because the left-hand derivative (-1) is unequal to the right-hand derivative (1), f(x) = |cos x| + |sin x| is not differentiable at x = π/2. Geometrically, the function exhibits a sharp corner at x = π/2 caused by the non-smooth sign reversal of cos x across zero.

Key facts to remember

definition
Differentiability at a Point

A real function f is differentiable at x = c if the two-sided limit lim_{h→0} [f(c + h) - f(c)] / h exists, which requires both the left-hand and right-hand derivatives to exist and be identical.

example
Corner Point in Modulus Trigonometric Graphs

The term |cos x| has sharp cusps or corners at every odd multiple of π/2, preventing the existence of a unique tangent line at those points.

Frequently asked questions

Why does f(x) = |cos x| + |sin x| fail to be differentiable at x = π/2?

At x = π/2, cos x changes sign from positive to negative, giving |cos x| a corner point with unequal one-sided slopes (-1 and 1), while |sin x| remains smooth and locally equal to cos h.