Some functions can be differentiated directly, but in certain cases, we use the rules of derivatives to find the derivative of a function.
We express differentiation of a function f(x) with respect to x as
f'(x) =\frac{d(f(x))} {dx}
where d/dx represents the differentiation and f'(x) is the function after differentiation.
There are different rules of derivatives, which are as follows:
Power Rule of Derivatives
The power rule of differentiation says that if the given function is of the form xⁿ, where n is any constant, then we can differentiate the function in the following way:
f(x) = xn
f'(x) = d((xn))/dx
f'(x) = nxn-1
This means that in such a case the differentiation is equal to the variable raised to 1 less than the original power and multiplied by the original power. Or, simply the power will be dropped in front of the variable (i.e., x in this case), and the power is reduced by one.
Example: Differentiate the function f(x) = x3 with respect to x.
Given f(x) = x3
⇒ f'(x) = d/dx(x3)
⇒ f'(x) = 3x3-1
⇒ f'(x) = 3x2
Product Rule of Derivative
Product rule of differentiation states that if the function f(x) can be written as the product of two functions, g(x) and h(x), then the derivative of f(x) is found by
f(x) = g(x).h(x)
f'(x) = g'(x)h(x) + g(x)h'(x)
If there are two subfunctions in the main function, then we need to take the derivative twice, taking one function constant at a time. In the above demo, f(x) is the main function, and g(x) and h(x) are its two subfunctions. so, in the derivative, first h(x) is taken as constant and g(x) is differentiated to g'(x). Similarly, in the second part, g(x) is taken as constant, and h(x) is differentiated to h'(x).
Let us understand it with an example.
Example: Differentiate the function f(x) = (x+1)(x+2) with respect to x.
Given f(x) = (x+1)(x+2)
As the given function is a product of two functions g(x) = x+1 and h(x) = x+2, we can find the derivative of f(x) as:
f(x) = g(x).h(x)
⇒ f'(x) = g'(x)h(x) + g(x)h'(x)
⇒ f′(x) = (x+2).d/dx(x+1) + (x+1).d/dx(x+2)
⇒ f'(x) = (x+2) + (x+1)
⇒ f'(x) = 2x + 3
Quotient Rule of Derivative
Quotient rule of differentiation says that if the function f(x) can be written as the quotient of two functions, g(x) and h(x), then the derivative of f(x) is calculated as follows:
f(x) = \frac{g(x)}{h(x)}\\\Rightarrow f'(x) = \frac{g'(x)h(x) - g(x)h'(x)}{(h(x))^2}
Let us understand it with an example.
Example: Differentiate the function
Given f(x) = (x+1)(x+2)
As the given function is a product of two functions g(x) = x+1 and h(x) = x+2, we can find the derivative of f(x) as:
f(x) = \frac{g(x)}{h(x)}\\ \Rightarrow f'(x) = \frac{g'(x)h(x) - g(x)h'(x)}{(h(x))^2}\\ \Rightarrow f'(x) = \frac{(x+2).\frac{d}{dx}(x+1) - (x+1).\frac{d}{dx}(x+2)}{(x+2)^2}\\ \Rightarrow f'(x) = \frac{x+2 - (x+1) }{(x+2)^2}\\ \Rightarrow f'(x) = \frac{1}{(x+2)^2}
Chain Rule of Derivative
Chain rule of differentiation states that if a function y = f(x) = g(t), where t = h(x), then differentiating f(x) can be done as follows:
f(x) = g(t)
⇒ f(x) = g(h(x))
⇒ f′(x) = d/dx(g(h(x))
⇒ f'(x) = g'(h(x)).h'(x)
Let us understand it with an example.
Example: Differentiate the function f(x) = sin(x2) with respect to x.
Given f(x) = sin(x2)
We can consider g(t) = sin (t) and h(x) = x2
Thus f(x) = g(h(x))
Using chain rule,
f'(x) = g'(h(x)).h'(x), and
g'(t) = d/dt(sin t) = cos t
⇒ g'(x) = cos x
⇒ h'(t) = d/dt(t2) = 2t
⇒ h'(x) = 2x
⇒ f'(x) = cos(x2).2x = 2x.cos(x2)
Sum and Difference Rules of Derivative
If a function f(x) is the sum or difference of two functions, g(x) and h(x), then the derivative of f(x) is equal to the sum or difference of the derivatives of g(x) and h(x). Mathematically, it can be written as:
For a function f such that,
f(x) = g(x) ± h(x)
⇒ d/dx(f(x)) = d/dx{g(x) ± h(x)}
⇒ d/dx(f(x)) = d/dx{g(x)} ± d/dx{h(x)}
⇒ f'(x) = g'(x) ± h'(x)
Let us understand it with an example.
Example: Find the derivative of f(x) = sin(x) + cos(x) with respect to x.
Given f(x) = sin(x) + cos(x)
Let g(x) = sin(x) and h(x) = cos(x)
As f(x) = g(x) + h(x)
⇒ f'(x) = g'(x) + h'(x)
⇒
f'(x) = \frac{d}{dx}(\sin x)+ \frac{d}{dx}(\cos x) ⇒ f'(x) = cos x - sin x
Derivative Rules for Constant Multiple
This rule of differentiation says that if a function is multiplied by a constant, the constant remains the same during differentiation and can be taken out of the derivative. Thus, if we have a function f(x) and it is multiplied by any constant 'a', then
d/dx{a.f(x)} = a.d/dx{f(x)} = a.f'(x)
Let us understand it with an example.
Example: Calculate the derivative of f(x) = 3x3.
Solution:
f(x) = 3x3
⇒ f'(x) = d/dx(3x3)
⇒ f'(x) = 3.d/dx(x3)
⇒ f'(x) = 3(3x2) = 9x2
Derivative Rules for Various Functions
Derivative Rules for Trigonometric Function
Trigonometry makes use of 6 functions, which are sin, cos, tan, sec, cosec, and cot. The derivatives of these 6 functions is given below:
| f(x) | f'(x) |
|---|---|
| sin(x) | cos(x) |
| cos(x) | -sin(x) |
| tan(x) | sec2x |
| sec(x) | sec(x)tan(x) |
| cosec(x) | -cosec(x) cot(x) |
| cot(x) | -cosec2x |
Derivative Rules for Inverse Trigonometric Function
Trigonometry also has 6 inverse functions, which are sin⁻¹, cos⁻¹, tan⁻¹, sec⁻¹, cosec⁻¹, and cot⁻¹.. The derivatives of these 6 functions are given below:
| f(x) | f'(x) |
|---|---|
| sin-1(x) | 1/√(1-x2) |
| cos-1(x) | -1/√(1-x2) |
| tan-1(x) | 1/(1+x2) |
| sec-1(x) | 1/[x√(x2-1)] where x ≠ -1, 0, 1 |
| cosec-1(x) | -1/[x√(x2-1)] where x ≠ -1, 0, 1 |
| cot-1(x) | -1/(1+x2) |
Derivative Rules for Exponential Function
Any function that has 'e' is said to be an exponential function. Generally, we have two types of exponential functions, which are given in the table below along with their derivatives:
| f(x) | f'(x) |
|---|---|
| ex | ex |
| ax | axln(a) |
Derivative Rules for Logarithmic Function
Any function that involves 'e' is said to be a Logarithmic function. Generally, we have two types of Logarithmic functions which are given in the table below along with their derivatives:
| f(x) | f'(x) |
|---|---|
| loga x | 1/(x ln(a)) or 1/(x loge a) |
| ln(x) or logₑ x | 1/x |
Derivative Rules for Hyperbolic Function
Each trigonometric function has a corresponding hyperbolic function, which is named by adding an 'h' after the name of a trigonometric function. Thus, we have 6 hyperbolic functions, which are given below along with their derivatives:
| f(x) | f'(x) |
|---|---|
| sinh(x) | cosh(x) |
| cosh(x) | sinh(x) |
| tanh(x) | sech2(x) |
| sech(x) | -sech(x)tanh(x) |
| cosech(x) | -cosech(x)coth(x) |
| coth(x) | -cosech2(x) |
Derivative Rules for Inverse Hyperbolic Function
Each inverse trigonometric function has a corresponding inverse hyperbolic function, which is named by adding an 'h' after the name of an inverse trigonometric function. Thus, we have 6 inverse hyperbolic functions, which are given below along with their derivatives:
| f(x) | f'(x) |
|---|---|
| sinh-1(x) | 1/√(1+x2) |
| cosh-1(x) | 1/√(x2-1) |
| tanh-1(x) | 1/(1-x2) |
| sech-1(x) | -1/√x(1-x2) |
| cosech⁻¹(x) | -1/|x|√(1-x2) |
| coth-1(x) | 1/(1-x2) |
Derivative Rules for Composite Function
If a function f(x) is of the form g(h(x)), then
f'(x) = g'(h(x)).h'(x)
This is the same as the chain rule. Refer to the example of the chain rule to understand it.
Derivative Rules for Parametric Function
If we have two functions, x(t) and y(t), then we calculate dy/dx as follows:
- First, we calculate the derivative of x(t) with respect to t.
- Then we calculate the derivative of y(t) with respect to t.
- Divide the derivative of y(t) by x(t) to get dy/dx.
dy/dx = y'(t)/x'(t)
Let us understand it with an example.
Example: Calculate dy/dx if x(t) = sin(x) and y(t) = x2.
x(t) = sin(x)
⇒ x'(t) = cos(x)
and y(t) = x2
⇒ y'(t) = 2x
Thus, dy/dx = 2x/cos(x) = 2x.sec(x)
Derivative Rules for Implicit Function
A function that comprises both dependent and independent variables is called an implicit function. In such cases, it may not be easy to change the function into an explicit function. For example, if we have a function in variables x and y, then it may not be possible to write the function as y = f(x). In such cases, we differentiate the function by separating the variables on two sides of the equality sign.
Consider a function x2 + y = 3. This function can be differentiated as follows:
Given: x2 + y = 3
Separating the variables on both sides of the equation, we get:
y = 3 - x2
Now differentiating both sides w.r.t x, we get:
dy/dx = 0 - 2x
dy/dx = -2x
Derivative Rules for Infinite Series
If we have a function
y = f(x) = x^{x^{x^{\ldots\infty}}} \\ y = x^y\\ Taking logarithm on both sides, we get:
log y = y.log x
Differentiating both sides with respect to x, we get:
\frac{1}{y}\frac{dy}{dx} = \frac{dy}{dx}\log x+y\frac{d}{dx}(\log x)\\ \frac{1}{y}\frac{dy}{dx} = \frac{dy}{dx}\log x + \frac{y}{x}\\ \frac{dy}{dx}(\frac{1}{y}-\log x) = \frac{y}{x}\\ \frac{dy}{dx}\frac{(1-y\log x)}{y} = \frac{y}{x}\\ \frac{dy}{dx} = \frac{y^2}{x(1-y\log x)}
Partial Derivative Rules
Partial Derivative is applicable to a multivariable function in which the function is differentiated with respect to a particular variable and the other variables are treated as scalar multiples. Product, quotient, power, and chain rules are applicable to the partial derivatives also in the same way as they are applicable to complete derivatives.
Consider two functions, u = f(x, y) and v = g(x, y), to be functions of x and y. Then the rules of derivatives can be applied to it as follows:
Product Rule of Partial Derivative
If there is a function h(x, y) that is a product of u and v, then:
\frac{\partial h}{\partial x} = \frac{\partial f}{\partial x}.g(x, y)+f(x, y)\frac{\partial g}{\partial x}\\ \frac{\partial h}{\partial y} = \frac{\partial f}{\partial y}.g(x, y)+f(x, y)\frac{\partial g}{\partial y}
Quotient Rule of Partial Derivative
If there is a function h(x, y) that is a division of u and v, then:
h(x, y) = \frac{f(x, y)}{g(x,y)}\\ \frac{\partial h}{\partial x} = \frac{\frac{\partial f}{\partial x}.g(x, y)-f(x, y)\frac{\partial g}{\partial x}}{(g(x,y))^2}\\ \frac{\partial h}{\partial y} = \frac{\frac{\partial f}{\partial y}.g(x, y)-f(x, y)\frac{\partial g}{\partial y}}{(g(x,y))^2}
Power Rule of Partial Derivative
According to this rule, if h(x, y) is a power of any function f(x, y), then
h(x, y) = [f(x,y)]n
\frac{\partial h}{\partial x} = n[f(x,y)]^{n-1}.\frac{\partial f}{\partial x}\\ \frac{\partial h}{\partial y} = n[f(x,y)]^{n-1}.\frac{\partial f}{\partial y}
Chain Rule of Partial Derivative
According to this rule, if u = f(x, y) and x = x(s, t) and y = y(s, t), then the following is true:
\frac{\partial u}{\partial s} = \frac{\partial u}{\partial x}.\frac{\partial x}{\partial s}+\frac{\partial u}{\partial y}.\frac{\partial y}{\partial s}\\ \frac{\partial u}{\partial t} = \frac{\partial u}{\partial x}.\frac{\partial x}{\partial t}+\frac{\partial u}{\partial y}.\frac{\partial y}{\partial t}
Solved Examples
Example 1. Find the derivative of f(x) = (x+2)(x-7).
Solution:
f(x) = (x+2) (x-7)
g(x) = x+2 and h(x) = x-7
Using product rule, we get
f'(x) = g'(x)h(x) + g(x)h'(x)
f'(x)= 1(x-7) + (x+2)(1)
f'(x) = x - 7 + x + 2
f'(x)= 2x -5
Example 2. Find the derivative of f(x) = sin(x)/x.
Solution:
f(x) = sin(x)/x
g(x) = sin(x) and h(x) = x
Using quotient rule,
f(x) = \frac{g(x)}{h(x)}\\ f'(x) = \frac{g'(x)h(x) - g(x)h'(x)}{(h(x))^2}\\ f'(x) = \frac{x\frac{d}{dx}(\sin x)-\sin(x)\frac{d}{dx}(x)}{x^2}\\ f'(x) = \frac{x\cos x- sinx}{x^2}
Example 3. Find the derivative of f(x) = sin(x).cos(x).
Solution:
f(x) = sin(x).cos(x)
g(x) = sin(x) and h(x) = cos(x)
Using product rule,
f'(x) = g'(x)h(x) + g(x)h'(x)
f'(x) = cos(x).cos(x) + sin(x)[-sin(x)]
f'(x) = cos2x - sin2x = cos(2x)
Example 4. Find the derivative of f(x) = sec(2x+3).
Solution:
Given f(x) = sec(2x+3)
g(t) = sec(t) and t = h(x) = 2x+3
Using chain rule,
g'(t) = sec(t)tan(t) or g(x) = sec(x)tan(x)
h'(x) = 2
f'(x) = g'(h(x)).h'(x)
f'(x) = sec(2x+3)tan(2x+2)*2 = 2sec(2x+3)tan(2x+3)
Example 5. Find the derivative of f(x) = x2 + x + 1.
Solution:
Given f(x) = x2 + x + 1
Using sum/ difference rule
f'(x) = d/dx(x2) + d/dx(x) + d/dx(1)
f'(x) = 2x + 1 + 0
Practice Problems
Problem 1. Find the derivative of 9x + 2x.
Problem 2. Find the derivative of cos(x) + x.sin(x).
Problem 3. Find the derivative of sin(x) + 3x2 + log(x). cos(x).
Problem 4. Find the derivative of (x2+4)/x+1.
Problem 5. Find the derivative of log(2x)/x.
Problem 6. Find the derivative of tan(sin(x)).
Problem 7. Find the derivative of cot(sin(x)).
Problem 8. Find the derivative of x·ln(2x+2).
Problem 9. Find the derivative of esin(2x + 5). (1 + x).
Problem 10. Find the derivative of log(x + 1/x - 1).