Differentiability

Let ff be a real-valued function and let cc be a point in its domain. The derivative of ff at cc is defined byf(c)=limh0f(c+h)f(c)h,f'(c) = \lim_{h \to 0} \frac{f(c+h)-f(c)}{h}, provided this limit exists as a finite real number.

The derivative of ff at cc is denoted by f(c)f'(c) or ddx[f(x)]x=c.\left.\frac{d}{dx}[f(x)]\right|_{x=c}.

For a function to be differentiable at a point cc, both the left-hand derivative and the right-hand derivative must exist and be equal.

  • Left-Hand Derivative (LHD): limh0f(c+h)f(c)h\lim_{h \to 0^-} \frac{f(c+h)-f(c)}{h}
  • Right-Hand Derivative (RHD): limh0+f(c+h)f(c)h\lim_{h \to 0^+} \frac{f(c+h)-f(c)}{h}

If LHD = RHD, then the common value is the derivative f(c)f'(c).


Relationship between Continuity and Differentiability

Theorem 3: If a function ff is differentiable at a point cc, then it is also continuous at that point.

Reason: If f(c)=limh0f(c+h)f(c)hf'(c)=\lim_{h\to 0}\frac{f(c+h)-f(c)}{h} exists, then the quotient remains finite as h0h \to 0. Since h0h \to 0, the numerator f(c+h)f(c)f(c+h)-f(c) must also tend to 00. Therefore, limh0f(c+h)=f(c),\lim_{h\to 0} f(c+h)=f(c), which means ff is continuous at cc.

Corollary: Every differentiable function is continuous.

Important Note: The converse is not true. A function may be continuous at a point but not differentiable there. A standard example is f(x)=x,f(x)=|x|, which is continuous at x=0x=0 but not differentiable at x=0x=0 because the graph has a sharp corner there.

Thus, Differentiability    Continuity,\text{Differentiability} \implies \text{Continuity}, but Continuity̸    Differentiability.\text{Continuity} \not\implies \text{Differentiability}.


Algebra of Derivatives

Let uu and vv be differentiable functions of xx. Then the standard rules of differentiation are:

  1. Sum/Difference Rule: (u±v)=u±v(u \pm v)' = u' \pm v'

  2. Product Rule (Leibnitz Rule): (uv)=uv+uv(uv)' = u'v + uv'

  3. Quotient Rule: (uv)=uvuvv2,v0.\left(\frac{u}{v}\right)' = \frac{u'v - uv'}{v^2}, \quad v \ne 0.

These rules are used repeatedly along with the chain rule when differentiating composite expressions.


Chain Rule

The Chain Rule is used to differentiate a composite function.

Theorem 4 (Chain Rule): Let a function be written in the form y=f(x)=v(u(x)).y = f(x) = v(u(x)). If we put t=u(x),t = u(x), then y=v(t).y = v(t). If both dtdx\dfrac{dt}{dx} and dydt\dfrac{dy}{dt} exist, then dydx=dydtdtdx.\frac{dy}{dx} = \frac{dy}{dt} \cdot \frac{dt}{dx}.

In Leibniz notation, if yy depends on tt and tt depends on xx, then the derivative of yy with respect to xx is the product of the derivative of yy with respect to tt and the derivative of tt with respect to xx.

For a composition of three or more functions, the chain rule is applied step by step. For example, if y=w(u(v(x))),y = w(u(v(x))), and we let t=v(x),s=u(t),t = v(x), \qquad s = u(t), then dydx=dydsdsdtdtdx.\frac{dy}{dx} = \frac{dy}{ds} \cdot \frac{ds}{dt} \cdot \frac{dt}{dx}.

Solved Examples

Example 1: Non-differentiability of Modulus Function

Prove that the function ff given by f(x)=x1,xRf(x) = |x-1|, x \in \mathbb{R} is not differentiable at x=1x=1.

Solution: To test differentiability at x=1x=1, we compare the left-hand derivative and right-hand derivative.

Step 1: Find the function value at x=1x=1: f(1)=11=0.f(1)=|1-1|=0.

Step 2: Compute the left-hand derivative: LHD=limh0f(1+h)f(1)h.LHD = \lim_{h \to 0^-} \frac{f(1+h)-f(1)}{h}. Now, f(1+h)=(1+h)1=h.f(1+h)=|(1+h)-1|=|h|. For h<0h<0, we have h=h|h|=-h. Therefore, LHD=limh0h0h=limh0(1)=1.LHD = \lim_{h \to 0^-} \frac{-h-0}{h} = \lim_{h \to 0^-} (-1) = -1.

Step 3: Compute the right-hand derivative: RHD=limh0+f(1+h)f(1)h.RHD = \lim_{h \to 0^+} \frac{f(1+h)-f(1)}{h}. For h>0h>0, we have h=h|h|=h. Hence, RHD=limh0+h0h=limh0+1=1.RHD = \lim_{h \to 0^+} \frac{h-0}{h} = \lim_{h \to 0^+} 1 = 1.

Step 4: Compare LHD and RHD: LHD=1,RHD=1.LHD = -1, \qquad RHD = 1. Since the left-hand and right-hand derivatives are not equal, the derivative does not exist at x=1x=1.

Therefore, the function f(x)=x1f(x)=|x-1| is not differentiable at x=1x=1.


Example 2: Basic Chain Rule

Find the derivative of the function given by f(x)=sin(x2)f(x) = \sin(x^2).

Solution: This is a composite function. Let t=x2.t = x^2. Then y=sint.y = \sin t.

Step 1: Differentiate tt with respect to xx: dtdx=2x.\frac{dt}{dx} = 2x.

Step 2: Differentiate yy with respect to tt: dydt=cost.\frac{dy}{dt} = \cos t.

Step 3: Apply the chain rule: dydx=dydtdtdx=cost2x.\frac{dy}{dx} = \frac{dy}{dt} \cdot \frac{dt}{dx} = \cos t \cdot 2x.

Step 4: Substitute t=x2t=x^2 back: dydx=2xcos(x2).\frac{dy}{dx} = 2x\cos(x^2).

Answer: 2xcos(x2)2x\cos(x^2)


Example 3: Chain Rule with Linear Argument

Find the derivative of y=tan(2x+3)y = \tan(2x+3).

Solution: Let t=2x+3.t = 2x+3. Then y=tant.y = \tan t.

Step 1: Differentiate tt with respect to xx: dtdx=2.\frac{dt}{dx}=2.

Step 2: Differentiate yy with respect to tt: dydt=sec2t.\frac{dy}{dt}=\sec^2 t.

Step 3: Apply the chain rule: dydx=dydtdtdx=sec2t2.\frac{dy}{dx}=\frac{dy}{dt}\cdot\frac{dt}{dx} = \sec^2 t \cdot 2.

Step 4: Replace tt by 2x+32x+3: dydx=2sec2(2x+3).\frac{dy}{dx}=2\sec^2(2x+3).

Answer: 2sec2(2x+3)2\sec^2(2x+3)


Example 4: Composition of Three Functions

Differentiate sin(cos(x2))\sin(\cos(x^2)) with respect to xx.

Solution: Let y=sin(cos(x2)).y = \sin(\cos(x^2)). This is a composition of three functions:

  1. inner function: x2x^2,
  2. middle function: cos()\cos(\cdot),
  3. outer function: sin()\sin(\cdot).

Step 1: Differentiate the outermost sine function: dydx=cos(cos(x2))ddx[cos(x2)].\frac{dy}{dx} = \cos(\cos(x^2)) \cdot \frac{d}{dx}[\cos(x^2)].

Step 2: Differentiate the middle cosine function: ddx[cos(x2)]=sin(x2)ddx(x2).\frac{d}{dx}[\cos(x^2)] = -\sin(x^2) \cdot \frac{d}{dx}(x^2).

Step 3: Differentiate the inner function: ddx(x2)=2x.\frac{d}{dx}(x^2)=2x.

Step 4: Combine all factors: dydx=cos(cos(x2))(sin(x2))2x.\frac{dy}{dx} = \cos(\cos(x^2)) \cdot (-\sin(x^2)) \cdot 2x. So, dydx=2xsin(x2)cos(cos(x2)).\frac{dy}{dx} = -2x\sin(x^2)\cos(\cos(x^2)).

Answer: 2xsin(x2)cos(cos(x2))-2x\sin(x^2)\cos(\cos(x^2))


Example 5: Product Rule combined with Chain Rule

Differentiate y=sin3xcos6xy = \sin^3 x \cdot \cos^6 x with respect to x.

Solution: Let u=sin3x,v=cos6x.u = \sin^3 x, \qquad v = \cos^6 x. Then y=uv.y = uv.

Step 1: Apply the product rule: dydx=udvdx+vdudx.\frac{dy}{dx} = u\frac{dv}{dx} + v\frac{du}{dx}. So, dydx=sin3xddx(cos6x)+cos6xddx(sin3x).\frac{dy}{dx} = \sin^3 x \cdot \frac{d}{dx}(\cos^6 x) + \cos^6 x \cdot \frac{d}{dx}(\sin^3 x).

Step 2: Differentiate cos6x\cos^6 x using the chain rule: ddx(cos6x)=6cos5xddx(cosx)=6cos5x(sinx)=6sinxcos5x.\frac{d}{dx}(\cos^6 x) = 6\cos^5 x \cdot \frac{d}{dx}(\cos x) = 6\cos^5 x(-\sin x) = -6\sin x\cos^5 x.

Step 3: Differentiate sin3x\sin^3 x using the chain rule: ddx(sin3x)=3sin2xddx(sinx)=3sin2xcosx.\frac{d}{dx}(\sin^3 x) = 3\sin^2 x \cdot \frac{d}{dx}(\sin x) = 3\sin^2 x\cos x.

Step 4: Substitute back: dydx=sin3x(6sinxcos5x)+cos6x(3sin2xcosx).\frac{dy}{dx} = \sin^3 x(-6\sin x\cos^5 x) + \cos^6 x(3\sin^2 x\cos x). That is, dydx=6sin4xcos5x+3sin2xcos7x.\frac{dy}{dx} = -6\sin^4 x\cos^5 x + 3\sin^2 x\cos^7 x.

Step 5: Factor out the common term 3sin2xcos5x3\sin^2 x\cos^5 x: dydx=3sin2xcos5x(2sin2x+cos2x).\frac{dy}{dx} = 3\sin^2 x\cos^5 x(-2\sin^2 x + \cos^2 x). So we may write dydx=3sin2xcos5x(cos2x2sin2x).\frac{dy}{dx} = 3\sin^2 x\cos^5 x(\cos^2 x - 2\sin^2 x).

Answer: 3sin2xcos5x(cos2x2sin2x)3\sin^2 x\cos^5 x(\cos^2 x - 2\sin^2 x)


Example 6: Chain Rule with Roots

Find the derivative of y=2cot(x2)y = 2\sqrt{\cot(x^2)}.

Solution: First rewrite the square root as a power: y=2[cot(x2)]1/2.y = 2[\cot(x^2)]^{1/2}.

Step 1: Differentiate using the power rule and chain rule: dydx=212[cot(x2)]1/2ddx[cot(x2)].\frac{dy}{dx} = 2 \cdot \frac{1}{2}[\cot(x^2)]^{-1/2} \cdot \frac{d}{dx}[\cot(x^2)]. So, dydx=[cot(x2)]1/2ddx[cot(x2)].\frac{dy}{dx} = [\cot(x^2)]^{-1/2} \cdot \frac{d}{dx}[\cot(x^2)]. That is, dydx=1cot(x2)ddx[cot(x2)].\frac{dy}{dx} = \frac{1}{\sqrt{\cot(x^2)}} \cdot \frac{d}{dx}[\cot(x^2)].

Step 2: Differentiate cot(x2)\cot(x^2): ddx[cot(x2)]=csc2(x2)ddx(x2).\frac{d}{dx}[\cot(x^2)] = -\csc^2(x^2) \cdot \frac{d}{dx}(x^2). Since ddx(x2)=2x,\frac{d}{dx}(x^2)=2x, we get ddx[cot(x2)]=2xcsc2(x2).\frac{d}{dx}[\cot(x^2)] = -2x\csc^2(x^2).

Step 3: Substitute back: dydx=2xcsc2(x2)cot(x2).\frac{dy}{dx} = \frac{-2x\csc^2(x^2)}{\sqrt{\cot(x^2)}}.

Answer: 2xcsc2(x2)cot(x2)\frac{-2x\csc^2(x^2)}{\sqrt{\cot(x^2)}}


Example 7: Differentiating Composite Roots

Differentiate cos(x)\cos(\sqrt{x}) with respect to xx.

Solution: Let y=cos(x).y = \cos(\sqrt{x}).

Step 1: Apply the chain rule to the outer cosine function: dydx=sin(x)ddx(x).\frac{dy}{dx} = -\sin(\sqrt{x}) \cdot \frac{d}{dx}(\sqrt{x}).

Step 2: Differentiate x\sqrt{x}: x=x1/2,ddx(x1/2)=12x1/2=12x.\sqrt{x} = x^{1/2}, \qquad \frac{d}{dx}(x^{1/2}) = \frac{1}{2}x^{-1/2} = \frac{1}{2\sqrt{x}}.

Step 3: Substitute back: dydx=sin(x)12x.\frac{dy}{dx} = -\sin(\sqrt{x}) \cdot \frac{1}{2\sqrt{x}}. Hence, dydx=sin(x)2x.\frac{dy}{dx} = \frac{-\sin(\sqrt{x})}{2\sqrt{x}}.

Answer: sin(x)2x\frac{-\sin(\sqrt{x})}{2\sqrt{x}}


Example 8: Non-differentiability of Greatest Integer Function

Prove that the greatest integer function defined by f(x)=[x],0<x<3f(x) = [x], 0 < x < 3 is not differentiable at x=1x=1 and x=2x=2.

Solution: A function must first be continuous in order to be differentiable. The greatest integer function has jump discontinuities at integers, so it cannot be differentiable there. We can also verify this directly using one-sided derivatives.

At x=1x=1

Step 1: Note that f(1)=[1]=1.f(1) = [1] = 1. For h<0h<0 and close to 0, 1+h<11+h<1, so [1+h]=0.[1+h]=0. Thus, LHD=limh0f(1+h)f(1)h=limh001h=limh01h.LHD = \lim_{h \to 0^-} \frac{f(1+h)-f(1)}{h} = \lim_{h \to 0^-} \frac{0-1}{h} = \lim_{h \to 0^-} \frac{-1}{h}. As h0h \to 0^-, the quantity 1h+\frac{-1}{h} \to +\infty, so the left-hand derivative does not exist as a finite number.

For h>0h>0 and close to 0, 1+h>11+h>1 but less than 2, so [1+h]=1.[1+h]=1. Hence, RHD=limh0+11h=0.RHD = \lim_{h \to 0^+} \frac{1-1}{h} = 0. Since LHD and RHD are not equal, the function is not differentiable at x=1x=1.

At x=2x=2

Step 2: Note that f(2)=[2]=2.f(2) = [2] = 2. For h<0h<0 and close to 0, 2+h<22+h<2 but greater than 1, so [2+h]=1.[2+h]=1. Then, LHD=limh012h=limh01h+,LHD = \lim_{h \to 0^-} \frac{1-2}{h} = \lim_{h \to 0^-} \frac{-1}{h} \to +\infty, so the left-hand derivative does not exist as a finite number.

For h>0h>0 and close to 0, 2+h>22+h>2 but less than 3, so [2+h]=2.[2+h]=2. Thus, RHD=limh0+22h=0.RHD = \lim_{h \to 0^+} \frac{2-2}{h} = 0. Again LHD and RHD are not equal, so the function is not differentiable at x=2x=2.

Therefore, f(x)=[x]f(x)=[x] is not differentiable at both x=1x=1 and x=2x=2.


Example 9: Differentiating Secant and Tangent Composition

Differentiate sec(tan(x))\sec(\tan(\sqrt{x})) with respect to xx.

Solution: Let y=sec(tan(x)).y = \sec(\tan(\sqrt{x})). This is a composition of three functions: x\sqrt{x}, then tan\tan, then sec\sec.

Step 1: Differentiate the outermost secant function: dydx=sec(tan(x))tan(tan(x))ddx[tan(x)].\frac{dy}{dx} = \sec(\tan(\sqrt{x}))\tan(\tan(\sqrt{x})) \cdot \frac{d}{dx}[\tan(\sqrt{x})].

Step 2: Differentiate tan(x)\tan(\sqrt{x}): ddx[tan(x)]=sec2(x)ddx(x).\frac{d}{dx}[\tan(\sqrt{x})] = \sec^2(\sqrt{x}) \cdot \frac{d}{dx}(\sqrt{x}).

Step 3: Differentiate x\sqrt{x}: ddx(x)=12x.\frac{d}{dx}(\sqrt{x}) = \frac{1}{2\sqrt{x}}.

Step 4: Combine all parts: dydx=sec(tan(x))tan(tan(x))sec2(x)12x.\frac{dy}{dx} = \sec(\tan(\sqrt{x}))\tan(\tan(\sqrt{x}))\sec^2(\sqrt{x})\cdot \frac{1}{2\sqrt{x}}. Therefore, dydx=sec(tan(x))tan(tan(x))sec2(x)2x.\frac{dy}{dx} = \frac{\sec(\tan(\sqrt{x}))\tan(\tan(\sqrt{x}))\sec^2(\sqrt{x})}{2\sqrt{x}}.

Answer: sec(tan(x))tan(tan(x))sec2(x)2x\frac{\sec(\tan(\sqrt{x}))\tan(\tan(\sqrt{x}))\sec^2(\sqrt{x})}{2\sqrt{x}}


Example 10: Quotient Rule with Chain Rule

Differentiate y=sin(ax+b)cos(cx+d)y = \frac{\sin(ax+b)}{\cos(cx+d)}.

Solution: Let u=sin(ax+b),v=cos(cx+d).u = \sin(ax+b), \qquad v = \cos(cx+d). Then y=uv.y = \frac{u}{v}.

Step 1: Apply the quotient rule: dydx=uvuvv2.\frac{dy}{dx} = \frac{u'v - uv'}{v^2}.

Step 2: Differentiate uu using the chain rule: u=ddx[sin(ax+b)]=cos(ax+b)a=acos(ax+b).u' = \frac{d}{dx}[\sin(ax+b)] = \cos(ax+b) \cdot a = a\cos(ax+b).

Step 3: Differentiate vv using the chain rule: v=ddx[cos(cx+d)]=sin(cx+d)c=csin(cx+d).v' = \frac{d}{dx}[\cos(cx+d)] = -\sin(cx+d) \cdot c = -c\sin(cx+d).

Step 4: Substitute into the quotient rule: dydx=acos(ax+b)cos(cx+d)sin(ax+b)(csin(cx+d))cos2(cx+d).\frac{dy}{dx} = \frac{a\cos(ax+b)\cos(cx+d) - \sin(ax+b)(-c\sin(cx+d))}{\cos^2(cx+d)}. So, dydx=acos(ax+b)cos(cx+d)+csin(ax+b)sin(cx+d)cos2(cx+d).\frac{dy}{dx} = \frac{a\cos(ax+b)\cos(cx+d) + c\sin(ax+b)\sin(cx+d)}{\cos^2(cx+d)}.

Answer: acos(ax+b)cos(cx+d)+csin(ax+b)sin(cx+d)cos2(cx+d)\frac{a\cos(ax+b)\cos(cx+d) + c\sin(ax+b)\sin(cx+d)}{\cos^2(cx+d)}