The image above shows a general curve. What could you say about its gradient? Does it change along the curve?

Using what we know about he gradient of a straight line, we can see where the gradient of a curve is positive, negative or zero by drawing tangent to the curve in difference places around the curve.

Notice that when the curve increases it has a positive gradient, when it decreases it has a negative gradient and when it turns around the gradient is zero. Another example is shown below here.

### Example

Sketch the gradient function of the curve below:

## Differentiation from First Principles

A function is **differentiable** if the gradient of the tangent can be found. Most functions are **continuous**, which means that they have a smooth unbroken line or curve. However, some have a gap, or discontinuity, in the graph (e.g. hyperbola). This can be shown by a asymptote or a 'hole' in the graph. We cannot find the gradient of a tangent to the curve at a point that doesn't exist! So the function is not differentiable at the point of discontinuity.

**A function y=f(x) is differentiable at the point x=a if the derivative exists at that point. This can only happen if the function is continuous and smooth at x=a.**

### Examples

1. Find all points where the function below is not differentiable.

### Show Answer

The function is not differentiable at points *A* and *B* since there are sharp corners and the curve is not smooth at these points. It is also not differentiable at point *C* since the function is discontinuous at this point.

2. Is the function differentiable at all points?

### Show Answer

## Limits

To differentiate from first principles, a limit is used when we want to move as close as we can to something. Often this is to find out where a function is near a gap or discontinuous point. In this topic, it is used when we want to move from a gradient of a line between two points to a gradient of a tangent.

### Examples

1.

### Show Answer

2. Find an expression in terms of *x* for .

### Show Answer

### Differentiation as a Limit

The formula is used to find the gradient of a straight line when we know two points on the line. However, when the line is a tangent to a curve, we only know one point on the line-the point of contact with the curve.

To **differentiate from first principles**, we first use the point of contact and another point close to it on the curve (this line is called a **secant**) and then we move the second point closer and closer to the point of contact until they overlap and the line is at single point (the **tangent**). To do this, we use a **limit**.

### Examples:

1. For the function , find the gradient of the secant *PQ* where *P* is the point on the function where *x=2* and *Q* is another point on the curve close to *P*. Choose different values for *Q* and use these results to estimate the gradient of the curve at *P*.

We can find a general formula for differentiating from first principles by using *c* rather than any particular number. We use general points *P(c, f(c))* and *Q(x, f(x))* where *x* is close to *c*.

The gradient of the secant *PQ* is given by:

The gradient of the tangent at *P* is found when *x* approaches *c*. We call this *f'(c)*.

There are other versions of this formula.

We can call the points *P(x, f(x))* and *Q(x+h, f(x+h))* where *h* is small.

Secant *PQ* has gradient:

To find the gradient of the secant, we make *h* smaller as shown, so that *Q* becomes closer and closer to *P*.

As *h* approaches 0, the gradient of the tangent becomes:

If we use and close to *P* where and are small:

Gradient of secant *PQ:*

As approaches 0, the gradient of the tangent becomes , and we call this .

This notation stands for the derivative, or the gradient of the tangent.

### Examples:

1. Differentiate from first principles to find the gradient of the tangent to the curve at the point where *x=*1.

### Show Answer

2. Differentiate from first principles.

### Show Answer