# Differentiation

The gradient of a curve is constantly changing, and so finding the gradient is not as simple as reading the x-coefficient of the equation. Instead, we can draw tangents to the curve to calculate the gradient at the point where the tangent touches the curve.

The gradient of a curves at a given point is given as the gradient of the tangent to the curve at that point

## Finding the Derivative

However, drawing tangents is not very accurate when done by eye. Instead, we can use algebra to find the gradient of a curve at a given point.

This works by drawing a cord connecting two points on the curve, y = f(x). The gradient of this cord gives an estimate for the average gradient of the curve between the two points. As you can see, the closer the two points are together, the more accurate the gradient of of the cord is as an estimation. This is because the cord gets closer and closer to being parallel to the tangent.

This can be noted as a cord between points A and B, where the horizontal distance between the points (difference in x-values) is *h*. Therefore, the vertical distance (difference in y-values) is f(x₀+h) - f(x₀):

Since gradient is defined as change in y-value over change in x-value (rise over run), the gradient of the cord is given as:

As the value for h gets smaller, points A and B get closer together, and the gradient of the cord becomes a better estimation for the gradient of the curve at A.

As h → 0, the gradient of the cord is identical to the gradient of the curve at the point.

This is known as **differentiation from first principles:**

### Terminology

The

**derivative**of a function is the differentiated form of the functionThe derivative of

**f(x)**can be noted as**f'(x)**The derivative of

**y = f(x)**can be noted as**dy/dx****h → 0**means**"as h tends to zero"**- its value becomes negligible

## Differentiating xⁿ

You do not have to differentiate from first principles every time - it is only used as a proof. Instead, we use general rules to make differentiation quicker. To differentiate xⁿ:

**multiply by the power**,*n***reduce the power by one**,*n*becomes*n*-1

If f(x) = xⁿ, then f'(x) =nxⁿ‾¹

If f(x) =axⁿ, then f'(x) =anxⁿ‾¹

This applies when

*n*is real, and*a*is a constant

### Differentiating Quadratics

For functions with more than one term, you **differentiate one term at a time**, using the rules above. A quadratic is a function where the highest power of x is x², and can be differentiated as such:

If f(x) isax² +bx +c, then f'(x) = 2ax +b

This applies when

*a*,*b*and*c*are constants and*x*is the only variable

Note that the derivative is now linear, because all x-terms were reduces by one order. *c* has disappeared all together, because it can be seen as *c*x⁰, so when *c* is multiplied by the power of *x*, 0, it becomes 0.

### Differentiating Cubics

The exact same rules apply for all functions: differentiate each term individually.

If f(x) =ax³ +bx² +cx +d, then f'(x) = 3ax² + 2bx +c

This applies when

*a*,*b*,*c*and*d*are constants and*x*is the only variable

Note that the cubic becomes a quadratic when differentiated.

## Second Order Derivatives

The first order derivative is the rate of change of the function, or the gradient. The second order derivative is the **rate of change of the gradient** itself, or the rate of change of the rate of change of the function.

**It is noted as f''(x) or d²y/dx²**

This sounds complicated, but all it means is you **differentiate a function twice**:

If f(x) = *a*x³ + *b*x² + *c*x + *d:*

f'(x) = 3

*a*x² + 2*b*x +*c***f''(x) = 6***a*x + 2*b*

As well as second order derivatives, you can have third, fourth fifth etc order derivatives. However, these are rarely encountered at this stage.

## Gradients, Tangents & Normals

Often, differentiation is used to find the equation of a tangent or normal to a curve at a given point.

The tangent to the curve y = f(x) at the point (a, f(a)) has gradient f'(a)

The tangent to the curve y = f(x) at the point (a, f(a)) has equation y - f(a) = f'(a)(x -a)

The **normal **is the line that is perpendicular to the tangent, and intersects the curve at point A. The gradient of the normal is given as the negative reciprocal of the gradient of the tangent:

The normal to the curve y = f(x) at the point (a, f(a)) has gradient 1 / f'(a)

The normal to the curve y = f(x) at the point (a, f(a)) has equation y - f(a) = -(x -a) / f'(a)

The

**negative reciprocal**means that the**product of the gradients of the tangents and normal equals -1**

## Increasing and Decreasing Functions

A function can either be increasing or decreasing over a given interval, depending on whether its derivative is positive or negative.

f(x) is increasing on the interval [a, b] if f'(x) ≥ 0 for all values a < x < b

f(x) is decreasing on the interval [a, b] if f'(x) ≤ 0 for all values a < x < b

## Stationary Points

A **stationary point** is a point on a curve where the **gradient is zero**. It can take one of three forms:

At a

**local maximum**, the gradient changes from positive to negativeAt a

**local minimum**, the gradient changes from negative to positiveAt a

**point of inflection**, the gradient does not change sign - it can either stay positive or negative throughout.

You can **determine which type of point it is** by looking at what the second order derivative is doing, or by what the first order differential is on either side of the point.

To determine the nature of a stationary point, A:

If

**f''(a) > 0**, the point is a**local minimum**If

**f''(a) < 0**, the point is a**local maximum**If

**f''(a) = 0**, look at the gradient on either side of A as it could be any of the three

## Convex & Concave Curves

All curves are either **convex** or **concave** over a particular interval.

It is easy to remember which is which, because con**cave** curves look like the entrance to a cave, while con**v**ex curves look like a v.

A **point of inflection** is where the curve changes from being concave to being convex or vice versa

## Sketching Gradient Functions

To sketch a gradient function of a particular function, this guide applies:

**Maximum or minimum points**on f(x)**cut the x-axis**on f'(x)**Points of inflection**on f(x)**touch but do not**cross the x-axis on f'(x)A

**positive gradient**on f(x) means f'(x) is**above the x-axis**A

**negative gradient**on f(x) means f'(x) is**below the x-axis****Vertical asymptotes**on f(x)**remain**as vertical asymptotes on f'(x)**Horizontal asymptotes**of f(x) become horizontal**asymptotes at the x-axis**on f'(x)

## The Chain Rule

The **chain rule** is used to differentiate composite functions:

Where

*y*is a function of*u*, and*u*is a function of*x*

For example, to differentiate y = (3*x*⁴ + *x*)⁵:

For functions in the form y = ( f(x) )ⁿ, finding dy/dx can be generalised as such:

Multiply by n

Multiply by f'(x), the derivative of the bracket

Reduce the power of the bracket by one

If y = ( f(x) )ⁿ, then dy/dx =nf'(x) ( (f(x) )ⁿ‾¹

A special form of the chain rule can be used when functions are not in the form y = f(x):

## The Product Rule

The **product rule** is used to differentiate the product of two functions:

where

*u*and*v*are function of*x*

This can be noted as:

If f(x) = g(x) h(x), then f'(x) = g(x) h'(x) + h(x) g'(x)

For example, to differentiate y = *x*² √(3*x* - 1):

## The Quotient Rule

The **quotient rule** is used for fractions where both numerator and denominator are functions of x:

where

*u*and*v*are functions of*x*

Note the minus sign in the numerator - order is important!

For example, to differentiate y = *x* / (2*x*+5):

## Trigonometric Differentiation

Trigonometric functions can be differentiated using **small angle approximations** (see notes sheet on trigonometry). These approximations are only valid when angles are measured in radians, therefore

To differentiate a trigonometric function, all angles must be in radians

### Differentiating sin and cos

From first principles, we know that:

If f(x) = sin(kx), then f'(x) =kcos(kx)

If f(x) = cos(kx), then f'(x) = -ksin(kx)

**It is important to remember the negative sign when deriving cos***x*.

### Differentiating tan

We can use the quotient rule and the trigonometric identity tan*x* = sin*x* / cos*x* to differentiate tan*x*:

If f(x) = tan(kx), then f'(x) =ksec²(kx)

### Differentiating cosec, sec & cot

Similarly, the quotient rule can be used to prove the results for cosec, sec and cot. The results are given as:

If f(x) = cosec(kx), then f'(x) = -kcosec(kx) cot(kx)

If f(x) = sec(kx) then f'(x) =ksec(kx) tan(kx)

If f(x) = cot(kx), then f'(x) = -kcosec²(kx)

## Parametric Differentiation

When functions are given as parametric (see notes sheet on parametric equations), there is no need to convert them into Cartesian form to differentiate them. Instead, the derivative of the Cartesian equation can be found from the derivatives of the parametric equations:

This is from a version of the chain rule.

For example, to differentiate x = t³ + t, y = t² +1:

## Implicit Differentiation

Sometimes, functions can be difficult or near impossible to rearrange so that a linear variable is the subject. these equations can often be differentiated implicitly without having to rearrange them at all.

In general, from the chain rule:

Specific results that you will come across a lot are: