 # Differentiability of Composite Functions

The composition of a function is an operation where two functions generate a new function. It is then not possible to differentiate them directly as we do with simple functions. This article explains differentiability of composite functions along with solved examples.

## Composite Function

Consider three sets A, B and C, which are non-empty.

Let f: A → B and g: B → C be two functions. Then g of f: A → C. This function is called the composition of f and g. Read more.

### Properties of the composition of function

• f is even, and g is even – fog is even function
• f is odd, and g is odd – fog is an odd function
• f is even, and g is odd – fog is even function
• f is odd, and g is even – fog is even function
• Composite of functions is not commutative i.e., $fog\,\ne \,gof.$
• Composite of functions is associative i.e., $(fog)oh\,=\,fo(goh)$
• If $f:A\to B$ is bijection and $g:B\to A$  is inverse of f. Then $fog={{I}_{B}} \text \ and \ gof={{I}_{A}}.$where, ${{I}_{A}}$ and ${{I}_{B}}$ are identity functions on the sets A and B respectively.
• If $f:A\to B$ and $g:B\to C$ are two bijections, then $gof:A\to C$ is bijection and ${{(gof)}^{-1}}=({{f}^{-1}}o{{g}^{-1}}).$
• $fog\ne gof$ but if, $fog=gof$ then either ${{f}^{-1}}=g$ or ${{g}^{-1}}=f$ also, $(fog)\,(x)=(gof)\,(x)=(x).$
• $gof(x)$ is simply the g-image of f(x), where f(x) is f-image of elements xA.
• Function $gof$ will exist only when the range of f is the subset of the domain of g.
• $fog$ does not exist if the range of g is not a subset of the domain of f.
• $fog$ and $gof$ may not be always defined.
• If both f and g are one-one, then $fog$ and $gof$ are also one-one.
• If both f and g are onto, then $gof$ is onto.

## How do you know if a function is differentiable?

• The function f (x) is said to be differentiable at point P, if and only if, a unique tangent exists at the point P.
• A function is said to be differentiable in an interval (a, b) if it is differentiable at every point of (a, b).
• A function is said to be differentiable in an interval [a, b] if it is differentiable at every point of [a, b].

## Composite Function Differentiation

Let g and h be two functions where y = g (u) and u = h (x). If the function is defined by y = g [h (x)] or g o h(x), then it is called a composite function. So, if g (x) and h (x) are 2 differentiable functions, then fog is also differentiable and hence (fog)’(x) = f’(g(x)).g’(x)

Let y be a differential function of u and u is a differential function of x, then

[dy/dx] = [dy/(du)] × [du/(dx)]

Let y = g(u) and u = f(x)

Let Δx be an increment in x and Δ u and Δy be the corresponding increments in u and y respectively.

[y + Δ y] = [g(u + Δu)] and [u + Δu] = [f(x + Δx)]

Δy = [g(u + Δu)] – [g(u)] and Δu = [f(x + Δx) – f(x)] [Δy/(Δu)] = [(g (u + Δu)]/[(Δu)] and [Δu/(Δx)] = [(f(x + Δx) – f(x))]/[Δx] [Δy/(Δx)] = [Δy]/[(Δu).Δu/(Δx)]

On applying the limits,

⇒ [dy/dx] = [dy/du] × [du/dx]

= [d/du] g(u) × [d/dx] f(x)

Limits Continuity and Differentiability

Differentiation

## Differentiability Of Composite Functions Examples

Example 1: Find dy/dx if y = √(x2 + 1).
Solution:
$\frac{dy}{dx} = \frac{1}{2}(x^2+1)^{-1/2} \times \frac{d}{dx}(x^2+1)$,
$\frac{dy}{dx} = \frac{1}{2}(x^2+1)^{-1/2} \times (2x)$,
$\frac{dy}{dx} = x(x^2+1)^{-1/2}$

Example 2: Find the derivative of $\frac{1}{cosx^3}$
Solution:
Given function is in the form f(g(h(x))). where f(x) = 1/x, g(x) = cos x and h(x) = x3
Let y = $\frac{1}{cosx^3}$.
Now, $\frac{dy}{dx} = \frac{-1}{(cosx^3)^2} \times \frac{d}{dx}(cosx^3) \times \frac{d}{dx}(x^3)$ = $(\frac{-1}{(cosx^3)^2} \times [-sin(x^3)] \times [3x^2)$ = $(\frac{3x^2sin(x^3)}{(cosx^3)^2}$

Example 3: Show that function f (x) = (x2 − 1) |x2 − 3x + 2|+ cos (|x|) is not differentiable at points 0, 1 and 2.

Solution:

Since function |x| is not differentiable at x = 0

∴|x2 − 3x + 2| = | (x − 1) ( x − 2) |

Hence, is not differentiable at x=1 and 2

Now f (x) = (x2 − 1) |x2 − 3x + 2|+ cos (|x|) is not differentiable at x = 2

For 1 < x < 2, f (x) = −(x2 −1) (x2 − 3x + 2) + cosx

For 2 < x < 3, f (x) = +(x2 −1) (x2 − 3x + 2) + cosx

L f′(x) = − (x2 −1) (2x − 3) − 2x (x2 − 3x + 2) − sinx

L f′(2) = − 3 − sin(2)

R f′(x) = (x2 −1) (2x − 3) + 2x (x2 − 3x + 2) − sinx

R f′(2) = (4 − 1) (4 − 3) + 0 − sin(2) = 3 − sin(2)

Hence, Lf′(2) ≠ Rf′(2).

Example 4: If $f(x)=\left\{ \begin{matrix} {{e}^{2x}}+ax, & x<0 \\ b{{(x-1)}^{2}}, & x\ge 0 \\ \end{matrix} \right.$ is differentiable at x = 0, then find the value of a and b.

Solution:

Given f (x) is differentiable at x = 0. Hence, f (x) will be continuous at x = 0.

$\lim_{x\rightarrow 0^{-}}(e^{2x}+ax)=\lim_{x\rightarrow 0^{+}}b(x-1)^{2} \\ e^0+a \times 0=b(0-1)^{2} \\ b=1$

But f (x) is differentiable at x = 0, then

$L{f}'(x)=R{f}'(x) \\ \frac{d}{dx}({{e}^{2x}}+ax)=\frac{d}{dx}b{{(x-1)}^{2}} \\ {2{e}^{2x}}+a=2b(x-1) \text \ At \ x=0, {2{e}^{0}}+a=-2b \\ a+2=-2b \\ a=-4 \\ (a,\,\,b)=(-4,\,\,1).$

Test Your Knowledge On Differentiability Of Composite Functions!