## Differentiation From First Principles (with example)

When you differentiate a function or curve you are finding the gradient of the tangent to the curve. If the curve you are differentiating a curve or function that is in terms of x, eg y=x^{2}, then the differential is also a curve or function in terms of x, eg 2x. This allows you to find the gradient of the curve for any point on the curve with a known x co-ordinate.

Differentiating from first principles involves finding the gradient of a tangent to a curve from the basic definition of gradient,

grad = (y_{1} – y_{2}) / (x_{1}-x_{2})

ie) not by following a rule.

When differentiating from first principles we consider chords (lines passing from one point on the curve to another) from the point on the curve with the x coordinate x to points with a slightly larger x coordinate x+d. The gradient of these chords is an approximation of the gradient of the tangent to the curve at the point with x co-ordinate x and the approximation becomes better as d becomes smaller. If we take the limit as d tends to 0 we find the actual gradient of the tangent

**Note: the derivative of a curve y = f(x) is written as dy/dx**

## Example: y=x^{2}

Consider 2 points P and Q on the curve y=x^{2} a small distance apart where the difference in their x co-ordinate is d. Then

P(x,x^{2})

Q(x+d,(x+d)^{2})

Then the gradient of the chord PQ is given by

To find the derivative we must now take the limit of this as d tends to 0.

So we find

By David Woodford

## Differentiate Inverse Cos – Proof

**Now available from trevorpythag.blogspot.com**

How to differentiate cos^{-1}x

y=cos^{-1}x

Bring the cos across

cosy = x

Differentiate both sides, remember when differentiating y time by dy/dx

-sin(y) dy/dx = 1

dy/dx = -1/siny

However we want to get the differential in terms of x, to do this we can use the identity

sin^{2}t+cos^{2}t = 1

so

sint = √(1 – cos^{2}t)

putting this into our expression for dy/dx we get

dy/dx = -1/√(1-cos^{2}y)

but cosy = x so

**dy/dx =- 1/√(1-x ^{2})**

## Sine and Cos Graphs Differentiating sin and cos

This is the basics of the sine cos and tan graphs and how sine and cos relate to give you tan. It also shows how to differentiate sin and cos.

The output or range of both sine and cos is from -1 to 1 when given any angle. They can be shown on a graph where y = sin(x) and y = cos(x). In these graphs all the angles go along the x axis and you can see a wave type shape is formed

**Sine Graph**

**Cosine Graph**

As you can see both the sin and cos graphs move periodically between -1 and 1 as the angles change, this pattern continues indefinitely because once you pass 360 degrees or 2 pi radians you will return back to the beginning. If you try to perform sin^{-1} of a value out side the range -1 to 1 you will get an error.

**Differentiate Sin and Cos**

also notice that the gradient of the sin graph is the value of the cos graph for the same angle and that the gradient of the cos graph is the -value of the sin graph for that angle. This means that we can differentiate the sin and cos graphs:

if f(x) = sin(x) then f ‘ (x)=cos(x)

and

if f(x) = cos(x) then f ‘ (x) = -sin(x)

however if we use ax instead of x we must differentiate it by bringing the a out, when its just x this doesn’t matter as the differential of x is 1.

ie)

let y = sin(f(x))

now let u = f(x)

du/dx = f ‘ (x)

also

y=sin(u) as u = f(x)

dy/du = cos(u)

from the chain rule

dy/dx = du/dx * dy/du

therefore

**if y = sin(f(x))
dy/dx = f ‘ (x)cos(f(x))**

**and similarly for cos
if y = cos(f(x))
dy/dx = -f ‘ (x)sin(f(x))**

## Comments