# 3. The Derivative from First Principles

In this section, we will differentiate a function from "first principles". This means we will start from scratch and use algebra to find a general expression for the slope of a curve, at any value *x*.

First
principles is also known as "delta
method", since many texts use Δ*x* (for "change in *x*) and Δ*y* (for "change in *y*"). This makes the algebra appear more difficult, so here we
use *h* for Δ*x* instead. We still call it "delta
method".

### NOTE

If you want to see how to find slopes (gradients) of tangents directly using derivatives, rather than from first principles, go to Tangents and Normals in the Applications of Differentiation chapter.

We wish to find an **algebraic method** to find the slope
of *y* = *f*(*x*) at *P*, to save
doing the numerical substitutions that we saw in the last section (Slope of a Tangent to a Curve - Numerical Approach).

We can approximate this value by taking a point somewhere near to
*P*(*x*, *f*(*x*)), say *Q*(*x* +
*h*, *f*(*x* + *h*)).

The value `g/h` is an approximation to the slope of the tangent which we require.

We can also write this slope as `("change in"\ y) /("change in"\ x)` or:

`m=(Deltay)/(Deltax`

If we move *Q* closer and closer to *P* (that is, we let *h* get smaller and smaller), the line *PQ* will get closer and closer to the tangent at *P* and so the slope of *PQ* gets closer to the slope that we want.

If we let *Q* go all the way to touch *P* (i.e. `h = 0`), then we would have the **exact** slope of the tangent.

## Differentiation from first principles applet

In the following applet, you can explore how this process works.

We are using the example from the previous page (Slope of a Tangent), y = x^{2}, and finding the slope at the point P(2, 4).

Use the **left-hand slider** to move the point P closer to Q. Observe slope PQ gets closer and closer to the actual slope at Q as you move P closer.

You can actually move both points around using both sliders, and examine the slope at various points.

What is the slope at point (0, 0)?

Number of intervals:

Copyright © www.intmath.com

## Information

The function:

## Expressing the differentiation process using algebra

Now, `g/h` can be written:

`g/h=(f(x+h)-f(x))/h`

So also, the slope *PQ* will be given by:

`m=(y_2-y_1)/(x_2-x_1)=(Deltay)/(Deltax)` `=(f(x+h)-f(x))/h`

But we require the slope **at** *P*, so we let `h → 0` (that is let *h* approach `0`), then in effect, *Q* will
approach *P* and `g/h` will approach the
required slope.

## The Slope of a Curve as a Derivative

Putting this together, we can write the slope of the tangent at *P* as:

`dy/dx=lim_(h->0)(f(x+h)-f(x))/h`

This is called **differentiation from first principles,** (or
the **delta method**). It gives the instantaneous rate of change
of *y *with respect to
*x.*

This is equivalent to the following (where before we were using *h* for Δ*x*):

`dy/dx=lim_(Deltax->0)(Deltay)/(Deltax`

You will also come across the following way of writing the Delta Method:

`dy/dx=lim_(Deltax->0)(f(x+Deltax)-f(x))/(Deltax`

## Notation for the Derivative

IMPORTANT: The **derivative** (also called **differentiation**) can be written in several ways. This can cause some confusion when we first learn about differentiation.

The following are equivalent ways of writing the first derivative of `y = f(x)`:

`dy/dx` or `f’(x)` or `y’`.

### Example 1

Find `dy/dx` from first principles if *y *= 2*x*^{2}+ 3*x*.

Answer

*f*(*x*) =
2*x*^{2} + 3*x* so

`f(x+h)=2(x+h)^2+3(x+h)`

`=2(x^2+2xh+h^2)+` `(3x+3h)`

`=2x^2+4xh+2h^2+` `3x+` `3h`

We now need to find:

`(dy)/(dx)=lim_(h->0)(f(x+h)-f(x))/h`

`=lim_(h->0)([2x^2+4xh+2h^2+3x+3h]-[2x^2+3x])/h`

`=lim_(h->0)(4xh+2h^2+3h)/h`

`=lim_(h->0)(4x+2h+3)`

`=4x+3`

We have found an expression that can give us the slope of the tangent anywhere on the curve.

If `x = -2`, the slope is `4(-2) + 3 = -5` (red, in the graph below)

If `x = 1`, the slope is `4(1) + 3 = 7` (green)

If `x = 4`, the slope is `4(4) + 3 = 19` (black)

We can see that our answers are correct when we graph the curve (which is a parabola) and observe the slopes of the tangents.

This is what makes calculus so powerful. We can find the slope anywhere on the curve (i.e. the rate of change of the function anywhere).

Please support IntMath!

### Example 2

a. Find `y'` from first
principles if *y *=* x*^{2 }+
4*x*.

b. Find the slope of the tangent where *x*
= 1 and also where *x *= −6.

c. Sketch the curve and both tangents.

Answer

a. **Note:** `y'` means "the first derivative". This can also be written `dy/dx`.

Now *f*(*x*) = *x*^{2} + 4*x*

So

`f(x+h)=(x+h)^2+4(x+h)`

`=x^2+2xh+h^2+4x+4h`

Therefore

`(dy)/(dx)=lim_(h->0)(f(x+h)-f(x))/h`

`=lim_(h->0)([(x+h)^2+4(x+h)]-[x^2+4x])/h`

`=lim_(h->0)([x^2+2xh+h^2+4x+4h]-[x^2+4x])/h`

`=lim_(h->0)(2xh+h^2+4h)/h`

`=lim_(h->0)(2x+h+4)`

`=2x+4`

b. When `x = 1`, slope `m = 2(1) + 4 = 6`

When `x = -6`, slope `m = 2(-6) + 4 = -8`

c. Sketch:

Please support IntMath!

### Search IntMath, blog and Forum

### Online Algebra Solver

This algebra solver can solve a wide range of math problems.

Go to: Online algebra solver

### Calculus Lessons on DVD

Math videos by MathTutorDVD.com

Easy to understand calculus lessons on DVD. See samples before you commit.

More info: Calculus videos

### The IntMath Newsletter

Sign up for the free **IntMath Newsletter**. Get math study tips, information, news and updates each fortnight. Join thousands of satisfied students, teachers and parents!