# Products and Quotients – (Differentiation)

A function is a transformation that gives a single output for a given input. The transformation is according to a rule. The rule varies depending on the type of the function. For example, for the function f(x) = 2x, the rule is simple, i.e., “double the input”. The function can be plotted on x-y coordinate system and we get a straight line with a constant slope of 2 i.e., the output increases at rate twice that of input. The derivative of the function i.e., f’(x) is the rate of change in magnitude of the function with respect to the input ‘x’. It is basically the slope of the function at each point.

For the graph of f(x) = 2x, we see that the slope of the function remains same at all values of the input i.e., ‘x’. Therefore, the derivative of the function should be constant. As a matter of fact, the derivative for f(x) is a constant i.e., f’(x) = 2. It is important to realize that even if the function f(x) were equal to ‘2x + c’, where c represents a constant, the derivative would remain the same i.e., 2. It makes sense because the constant ‘c’ only shifts the graph of the function along the y-axis by an amount equal to ‘c’ and the slope of f(x) would still be the same. The graph of f’(x) would be represented by a horizontal line at y = 2.

The derivative of a function tells whether a function is increasing or decreasing. When the derivative of a function is greater than 0 it means that the function tends to increase as x increases. When the derivative of a function is equal to 0, it means that the rate of change in the magnitude of the function is 0. If a curve has 0 rate of change then it shows that its magnitude remains constant. Therefore, the derivative of a constant function is 0. If the derivative of a function is less than 0, i.e., if the derivative of the function is negative at a point then it means that the magnitude of the function tends to decrease as x increases.

For a quadratic function, the value of the derivative of the function is not constant. In other words, the rate at which the function is changing is not constant. For example, consider the simplest quadratic function i.e., f(x) = x2.

If we draw a tangent at each point on the curve, you can realize that for negative values of x, the tangent has a negative slope. As we approach x = 0 from the left side, the slope of the tangent becomes less and less negative. At exactly x = 0, the tangent looks identical to the horizontal x-axis. At values of x greater than 0, the tangent line becomes positive and increases as x increases. The slope of tangent line represents the magnitude of the derivative of the function at each value of x. And we may verify it because the derivative of the function f(x) evaluates to f’(x) = 2x.

Definition: Mathematically, the derivative f’(x) of a function f(x) is defined by the following limit.

$f'(x)=\lim_{h \to 0 }\frac{f(x+h)-f(x)}{h}$                              (1)

The relation says that the derivative of a function f(x) is simply a ratio, a ratio of change in magnitude of the function to the change ‘h’ in magnitude of input/independent variable. But there is an additional condition. The ratio is evaluated at the limit when ‘h’ approaches zero. In other words, the derivative is said to be evaluated at a single point!

This essentially is what the tangent line at a point on the graph of a function represents. The only thing that we should be careful about is, whether the function to be differentiated is continuous at every point and also whether the limit (the equation above) should exist. It is possible that the function may be continuous at a point but still not differentiable at that point. For example, consider the function f(x) = |x| (the mod function which outputs the absolute magnitude of input).

The function has a sharp corner at x = 0. Although the function is continuous at x = 0 but derivative does not exist at that point. It is because the limit evaluates to two different values at x = 0 (Approaching from left, the limit evaluates to -1 while approaching from right, the limit evaluates to 1). Thus, we have to be careful while evaluating the derivative of a function even if it is continuous.

Notation: The derivative of a function is represented as following.

$f'(x),\, \frac{dy}{dx},\,y',\,\frac{d}{dx}(f(x))$

It should be noted that the differentiation can be applied multiple times to get higher-order derivatives.  The higher-order derivatives are expressed as.

$f''(x),\, f'''(x),\,f^{4}(x)....$

$\frac{d^{2}}{dx^{2}}(f(x)),\,\frac{d^{3}}{dx^{3}}(f(x)),\,\frac{d^{4}}{dx^{4}}(f(x))$

Let us solve some examples of finding the derivative of a function.

Example 1: Find the derivative of the function f(x) = 5x2 + 2x + 4.

Using the power rule of differentiation, we can find the derivative of the function as:

$f'(x)=2(5x^{2-1})+2x^{1-1}=10x+2$

Example 2: Find the derivative of the function f(x) = 2/x. Also evaluate the derivative of the function at x = 3.

Using the power rule of the differentiation, we can find the derivative of the given function as:

$f'(x)=-1(2)x^{-1-1}=-2x^{-2}$

$f'(x)=-\frac{2}{x^{2}}$

The value of the derivative at x = 3 can be found out as:

$f'(x)\mid _{x=3}=-\frac{2}{3^{2}}=-\frac{2}{9}$

There are some special functions such as the trigonometric functions, the log function, the exponential functions, the inverse logarithmic functions etc. that have unique derivatives. It is worth noting here that the derivative of a function is also a function.

## Product Rule of Differentiation

You may recall that the differential operator ‘d/dx’ is a linear operator, i.e., the derivative of sum of two functions is the sum of the derivatives of the two functions. Symbolically, it is represented as the following.

$(f(x)+g(x))'=f'(x)+g'(x)$

For example, let f(x) = 2x and g(x) = sin x. The derivative of the sum of functions f(x) and g(x) is given by:

$(f(x)+g(x))'=f'(x)+g'(x)=(2x)'+(sin\, x)'=2+cos\,x$

This was simple. What if we are asked to find the derivative of the product of the functions i.e.,

(f(x)g(x))’ = ?

You might be tempted to think that the derivative of the product of two functions should be the product of the derivative of the two. Let us verify if this statement is true or false. But how do we verify it? For the previous example, we can find the individual derivatives, but at this stage we cannot find the derivative of ‘2xsinx’ to verify the above statement. We need to come up with a clever procedure to verify.

Let us say that f(x) = x3 and g(x) = 7x5. Using the power rule, the derivative of f(x) is f’(x) = 3x2, whereas, the derivative of g(x) is g’(x) = 35x4. The product of f(x) and g(x) is h(x) = f(x)g(x) = 7x8. The derivative of the product of the functions is h’(x) = 56x7. The product of the derivatives is f’(x)g’(x) = 3x2(35x4) = 105x6. It is evident now that the derivative of product of functions is not equal to the product of the derivatives of the functions (Only a single case of violation is required to disprove a statement).

$(f(x)g(x))' \neq f'(x)g'(x)$

The derivative of the product of two functions f(x) and g(x) is actually given by the following formula.

(f(x)g(x))’ = f'(x)g(x) + f(x)g'(x)

So, it involves a sum of two terms. Let us show that the above relation also holds true for the example we discussed earlier. The left-hand side has already been evaluated to be equal to 56x7. The right-hand side evaluates to 3x2(7x5) + x3(35x4) = 21x7+35x7 = 56x7. Therefore, the relation has been verified for our case (the left and right hand sides of the product rule are equal in our case).

Exercise: As an exercise, find the derivative of the product of the functions f(x) = 2x and g(x) = sin x. (The derivative of sin x is cos x).

Intuition of the product rule: When we have a product of the functions and we want to know that how the product varies, then it is intuitive to hold one of the functions and find the derivative of the other, then hold the other function and find the derivative of the first function and add the two results. This is the intuition behind the product rule.

Now a question arises here. Does the order of the functions in the product affect the derivative of the product? After inspecting the concerned equation, one can easily realize that the order of the functions in the product will not affect the overall expression of the derivative of the product.

Another question should be addressed here. What if we want to find the derivative of the product of more than two functions? Do we need more product rules? To answer that question, let us suppose, we want to find the derivative of product of three functions f(x), g(x) and h(x). In other words, we want to find (f(x)g(x)h(x))’. We can group together multiple functions in form of one function i.e., let m(x) = f(x)g(x). Thus, the problem reduces to finding the derivative of m(x)h(x).

(f(x)g(x)h(x))’ = (m(x)h(x))’ = m'(x)h(x) + m(x)h'(x)

= (f(x)g(x))’ h(x) + f(x)g(x)h'(x)

= {f'(x)g(x) + f(x)g^(x)}h(x) + f(x)g(x)h'(x)

In this way, we can find derivative of product of more than two functions.

Exercise: Find the derivative of product of the functions f(x) = x2, g(x) = 3x and h(x) = ex (Derivative of ex is ex).

You may have realized why the product rule is so important. The product rule helps find the derivatives of the complex functions by decomposing the function in form of product of fundamental functions whose derivatives are well known.

## Quotient Rule of Differentiation

Now that we know how to find the derivative of the product of functions, it is a must to also have knowledge about finding the derivative of the quotient of functions.

Let us have two functions f(x) and g(x). What would be the derivative of the quotient f(x)/g(x).

$(\frac{f(x)}{g(x)})' = ?$

From our past experience, we are pretty sure that it will not be as simple as the quotient of respective derivatives of the two functions. But let us verify this to be 100% sure. We will take f(x) and g(x) such that the quotient comes out to be some expression whose derivative can be easily evaluated. Suppose f(x) = x3 and g(x) = 7x5, the quotient f(x)/g(x) = x3/7x5 = 1/7x2. The derivative of the quotient is,

$(\frac{f(x)}{g(x)})' = (\frac{1}{7x^{2}})'=-\frac{2}{7x^{3}}$

On the other hand, f’(x)/g’(x) = 3x2/35x4 = 3/35x2. Thus, it has been verified that,

$(\frac{f(x)}{g(x)})' \neq \frac{f'(x)}{g'(x)}$

The derivative of the quotient of two functions is given by the following equation.

$(\frac{f(x)}{g(x)})' = \frac{f'(x)g(x)-f(x)g'(x)}{(g(x))^{2}}$

It involves more computations as compared to the product rule. It should be also noted that it involves the square of the function g(x) in the denominator. Let us verify this relation for the case we discussed above. It is known that derivative of f(x)/g(x) = -2/7x3. Let us evaluate the right-hand side of the quotient rule. The numerator is equal to (x3)’(7x5) – x3(7x5)’ = 3x2(7x5) – x3(35x4) = 21x7 – 35x7 = -14x7. The denominator of the equation is g2(x) = (7x5)2 = 49x10. The right-hand side of the above relation thus becomes -14x7/49x10 = -2/7x3. Thus, the quotient rule holds true (for our case at least!).

You may recall that as we changed the order of functions in a product, the overall derivative of the product did not change. This is known as the commutative property. Let us observe whether the quotient rule possess the commutative property. Clearly, it does not, for two reasons. There is subtraction in the numerator. If the places of f(x) and g(x) are swapped, the numerator will flip its sign. Secondly, the denominator contains the square of the function that appears in original quotient’s denominator. Therefore, in general the derivatives of the quotients f(x)/g(x) and g(x)/f(x) are different.

Exercise: Find the derivative of the quotient f(x)/g(x) as well as g(x)/f(x), for f(x) = 2x and g(x) = sin x.

## How to remember it?

There is a clever trick to remember the order of the products in the numerator of the right hand side of the quotient rule. Before discussing that, you can realize that the numerator contains the terms same as that of the product rule i.e., f’(x)g(x) and g’(x)f(x).

The problem lies with remembering which term has to be subtracted from the other. Assume that we do not remember the order.

Let us take one of the possibilities i.e., f(x)g’(x) – f’(x)g(x). Now observe what if we replace the g(x) in the quotient by 1. The quotient will reduce to f(x) and its derivative should be simply f’(x). For the right-hand side, if the numerator is f(x)g’(x) – f’(x)g(x) and g(x) = 1, the numerator simplifies to -f’(x) which is not the same as f’(x).

Therefore, the correct order must be the other one i.e., f’(x)g(x) – f(x)g’(x). In this way, you do not have to worry about remembering it. Keep in mind that the denominator is equal to (g(x))2.

Special case: Now that we are familiar with the quotient rule, let us play around with it. What if the numerator function f(x) = 1? To see, let us plug in f(x) = 1 in the quotient rule.

$(\frac{f(x)}{g(x)})' = \frac{f'(x)g(x)-f(x)g'(x)}{(g(x))^{2}}$

$(\frac{1}{g(x)})' = \frac{0(g(x))-1(g'(x))}{(g(x))^{2}}$

$(\frac{1}{g(x)})' = \frac{-g'(x)}{(g(x))^{2}}$        (4)

What do we get from it? If the derivative of a function g(x) is g’(x), then the derivative of its reciprocal is given by the above equation.

For example, given the function f(x) = ln x (natural log of x). The derivative of its reciprocal is evaluated as

$(\frac{1}{\ln x})' = \frac{-1/x}{(\ln x)^{2}}$

Note that the derivative of ln x is 1/x.

Exercise: Find the derivative of the reciprocal of the function $h(x)= 2\sqrt{x}$. Evaluate the expression at x = 2.

Source: