### Differentiation

The process of finding the **gradient
or slope** of a function is the differentiation.

We used to find the gradient of a
straight line, just by dividing the change in 'y' by change in 'x', in a certain
range of values. When it comes to a curve, however,
it is not easy to find the gradient or slope as the very thing we want to
measure, keeps changing from point to point.

Please click the *play* button at the bottom of the following applet to see it.

we have to draw tangents at all those points and then find the gradients individually. The above animation illustrates just that - and the challenge that we face with.

If we stick to this method we will have to draw hundreds, if not thousands, of tangents to find the gradient at various points of the curve; enough work to put off someone doing maths for years, if not decades, to come!

Good news is that there is a method
that comes to our rescue. It is differentiation. It provides us with a method
that finds the rate of change of graph; the value so obtained is called
**differential coefficient (dy/dx) - what we usually call the gradient.**

#### Differential Coefficient - dy/dx

In order to find the gradient at a point on a curve, we take into account two points that are very close to each other - A and B. Then the gradient of the line, AB, is calculated while minimizing the distance, AB - or Δx. The gradient, in this circumstances, approaches a limit. It's called the differential coefficient of the function (dy/dx) - or the gradient - at point A.

**E.g.1**

f(x) = x

f(x + Δx) = x + Δx

f(x + Δx) - f(x) = Δx

[f(x + Δx) - f(x)]/Δx = 1

Limit_{Δx => 0} [f(x + Δx) - f(x)]/Δx = 1

dy/dx = 1 = 1x^{0}

**E.g.2**

f(x) = x^{2}

f(x + Δx) = (x + Δx)^{2}

f(x + Δx) - f(x) = (x + Δx)^{2} - x^{2}

= x^{2} + 2xΔx + Δx^{2} - x^{2}

= 2xΔx + Δx^{2}

[f(x + Δx) - f(x)]/Δx = 2x + Δx

Limit_{Δx => 0} [f(x + Δx) - f(x)]/Δx = 2x

dy/dx = 2x = 2x^{1}

**E.g.3**

f(x) = x^{3}

f(x + Δx) = (x + Δx)^{3}

f(x + Δx) - f(x) = (x + Δx)^{3} - x^{3}

= x^{3} + 3x^{2}Δx + 3xΔx^{2} + Δx^{3} - x^{3}

= 3x^{2}Δx + 3xΔx^{2} + Δx^{3}

[f(x + Δx) - f(x)]/Δx = 3x^{2} + 3xΔx + Δx^{2}

Limit_{Δx => 0} [f(x + Δx) - f(x)]/Δx = 3x^{2}

dy/dx = 3x^{2}

The above results - and those of the similar with the use of binominal expansion - lead to the following pattern:

y | dy/dx |
---|---|

y = x^{1} | dy/dx = 1x^{0} |

y = x^{2} | dy/dx = 2x^{1} |

y = x^{3} | dy/dx = 3x^{2} |

y = x^{4} | dy/dx = 4x^{3} |

... | ... |

y = x^{n} | dy/dx = nx^{n-1} |

**If y = x ^{n} then dy/dx = nx^{n-1}**

**E.g.**

Find the differential coefficient of y = 1/x, from the first principles.

y = 1/x

y + Δy = 1/(x + Δx)

So, Δy = 1/(x + Δx) - 1/x

= (x - x - Δx)/x(x + Δx)

= -Δx/x(x + Δx)

Δy/Δx = -1/x(x + Δx)

= -1/(x^{2} + xΔx)

Limit_{Δx => 0} Δy/Δx = - 1/x^{2}

dy/dx = - 1/x^{2}

#### Differential Coefficient and Gradient

The gradient of a curve at a point is the same as the differential coefficient at the same point; if the curve is in the form of **y = x ^{n}** , its

**gradient**at any point is given by

**nx**. All we have to do is, to substitute 'x' values for the dy/dx and to get the gradient at points.

^{n-1}**E.g.1**

Differentiate the following:

- y = (x + 3)
^{2}

y = x^{2}+ 6x + 9

dy/dx = 2x + 6 - y = x
^{3}- 2x

dy/dx = 3x^{2}- 2 - y = x
^{1/2}+ 4x

dy/dx = 1/2x^{-1/2}+ 4

**E.g.2**

y = x^{2} - 2x

So, dy/dx = 2x -2

Type in the value of x into the textbox and press *Enter.* The tangent will be drawn at that point

dy/dx =2x -2

dy/dx at x = 0 => dy/dx = 2x0 -2 = -2

dy/dx at x = 1 => dy/dx = 2x1-2 = 0

dy/dx at x = 2 => dy/dx = 2x2 -2 = 2

Just look at the gradients of the tangents; the values from the differentiation are compatible with them.

Using the above curve, y = x^{2} -2x, find the equations of tangents at x = 0 and x = 2. The two tangents meet up at A. Find the coordinates of A as well.

dy/dx = 2x - 2

dy/dx at x =0 => dy/dx = -2

For the tangent,

x = 0; y = 0; m = dy/dx = -2

y = mx + c

0 = -2x0 + c => c = 0

So, the equation of the tangent is y = -2x.

dy/dx at x = 2 => dy/dx = 2

For the tangent,

x = 2; y = 0; m = dy/dx = 2

y = mx + c

0 = 2x2 + c => c = -4

So, the equation of the tangent is y = 2x - 4.

If two equations cross at A,
-2x = 2x - 4

4x = 4

x = 1

y = -2 x 1 = -2

So, the coordinates of A are, (1,-2).

#### Equations of tangents to a curve

Differentiation is a very important tool in practical applications. The following example illustrates it.

**E.g.1**

A farmer wants to make an enclosure for his sheep using a fencing material of length 60m with one side being a wall. He wants to make its shape rectangular so that he can keep as many
sheep as possible. How should he choose the dimensions for the enclosure.

Let x be the width. Then the length is (60 - 2x) - only three sides to cover, as fourth is the wall.

If the area is A,

A = x(60 - 2x)

A = 60x - 2x^{2}

When the area is maximum, the gradient is 0

dA/dx = 60 -4x

dA/dx =0 => 60 - 4x = 0

4x = 60

x = 15

So, he should choose the width as 15m and the length as (60 - 2x15) = 30m, to maximize the area - a brilliant use of differentiation!

These are the possibilities - in a spread sheet with the curve:

**E.g.2**

Four squares from the corners of a square plate are removed so that it can be turned into a open cubical box. Find the length of a square to be removed in terms of the length of the main square so that the volume of the box is a maximum.

Let the length of the plate be l and that of a small square be x.

If the volume is V,

V = x(l - 2x)^{2}

= x(l^{2} - 4lx + 4x^{2})

= l^{2}x - 4lx^{2} + 4x^{3}

dV/dx = l^{2} - 8lx + 12x^{2}

At the peak of the graph of V against x, dV/dx = 0

12x^{2} - 8lx + l^{2} = 0

x = 8l ± √ 64l^{2} - 48l^{2} / 24

x = 8l ± √ 16l^{2} / 24

x = 8l ± 4l / 24

x = l/2 or l/6

Since l/2 is not possible, x = l/6

Therefore, to maximize the volume, a square of side l/6 should be cut off from each corner of the plate.

**E.g.3**

The product of two positive numbers is 100. Find the numbers so that the sum of them is a minimum.

Let the numbers be x and 100/x

If the sum is S, then S = x + 100/x

So, dS/dx = 1 - 100/x^{2}

If the sum is a minimum, dS/dx = 0

1 - 100/x^{2} = 0

x^{2} = 100

x = 10.

So, the numbers are 10 and 10.

Let's verify the result:

Numbers | Sum |
---|---|

100, 1 | 101 |

50, 2 | 52 |

25, 4 | 29 |

20, 5 | 25 |

10, 10 | 20 ☺ |

#### Questions for Practice

Please work out the following questions to complement what you have just learnt.

- Sketch y = x
^{2}- x - 6 and find the coordinates of the point with zero gradient. A tangent is drawn for the curve at x = 3. Find its equation. - The product of two numbers is 64. Find the numbers so that their sum is a minimum.
- Sketch y = x
^{2}- 3x and find the equation of the tangent at x = 2. Hence find the equation of the perpendicular line drawn at the same point to the curve. - A square sheet is turned into a cubical open box by removing four squares from its vertices. Find the minimum length of a square, so that the volume of the box is maximum.
- Find a relationship between the height and diameter of a cylinder when its surface area is maximum.