Topic2 Differentiation Part1
-
Upload
patrickkwan -
Category
Documents
-
view
234 -
download
0
Transcript of Topic2 Differentiation Part1
-
8/9/2019 Topic2 Differentiation Part1
1/32
Differentiation
1.0 : Introduction
Here we cover the basic theory and application of that part of calculus called differentiation.
Differentiation is one of two fundamental topics in calculus. These notes will include :
Algebraic and Geometric Definitions of the Derivative of a Function
Here we will see how the derivative of a function can be defined in two ways : by algebra or
via geometry. In using the geometric approach we will study the basic ideas behind
gradients and tangents of a function. We will consider the process of two point on a curve
approaching to form a tangent to the curve and we will formalise this process
mathematically
Differentiation from 1st Principles
Having formalised the process of deriving the tangent we will derive, from 1st principles,
the tangents of certain functions and define this process as differentiation.
Derivatives of Trigonometric, Exponential and Logarithmic Functions
Here we will study the basic derivatives of trigonometric functions. Here we will need to
study two important limits relating to the use of trig functions in order to be able to obtain
their derivative. We will also study how to find the derivative of exponential and
logarithmic functions.
Rules of Differentiation
Here we will study the basic rules for differentiating functions containing other functions
(chain rule), functions multiplied together (product rule), and functions divided by each
other (quotient rule)
Stationary Values
Here we will study the behaviour of derivatives around certain regions of a function. We
will see that it is possible to analyse a function from the way their derivatives are organised
around a point on the function called a stationary point. We will also study how we may use
such analysis to help us sketch graphs, and also how to apply it in optimisation problems.
Differentiation of Implicit and Hyperbolic Functions
Here we will differentiate different forms of functions, as well as new trig functions.
Tangents and Normals
Here we will study the connection between the tangent of a curve and the normal to the
tangent. The normal to the tangent (or any other line) any line is defined as the line
perpendicular to the tangent.
Maclaurin and Taylor Series (if time allows)
Here we will study how various non algebraic function such as trig functions, , etc...ex, lnx
can be transformed into equivalent infinite series. This requires the use of differentiation.
Theoretical Study of Limits (if time allows)
The concept of a derivative relies on the limiting process, in that the gradient of a functionapproach the tangent of the function when x approaches 0. as such the concept of limits isimportant and we shall study this in more detail.
www.ucl.ac.uk/~uczlcfe
1
-
8/9/2019 Topic2 Differentiation Part1
2/32
1.1 : A Historical Introduction to Calculus
1.1.1 : The two basic concepts of calculus
www.ucl.ac.uk/~uczlcfe
2
-
8/9/2019 Topic2 Differentiation Part1
3/32
1.1.2 : Who invented calculus ?
www.ucl.ac.uk/~uczlcfe
3
-
8/9/2019 Topic2 Differentiation Part1
4/32
1.2 : The Derivative Of A Function
1.2.1 : An algebraic definition of the derivative of a function
We saw in the notes of algebra (in the section on derived functions) that there was a way of
evaluating f(x+x) from a combination of the original function f(x) and its derived functions, the
general expression being :
(1.2.1)f(x + x) =f(x) + x.f(x) + x2
2!f(x) + x
3
3!f(x) + x
4
4!fiv(x) + ....
We then saw how to obtain the derived functions , etc... fromf(x). Although we only everf,f,f
derived this expression for polynomials, let us assume that it is valid for any functionf(x) (this isnt
strictly true, but for our purposes this assumption will suffice. In fact Lagrange, a French
mathematician, thought he had proved in 1797 that such an expansion was valid for any function
f(x) but we now know that this isnt the case since their are functions which cannot be expanded in
the form above. More on this in the section on Taylor series).
Some basic algebra on (1.2.1) gives
(1.2.2)f(x + x) f(x)
x=f(x) + x
2!f(x) + x
2
3!f
(x) + x3
4!fiv(x) + ....
Now, x is a positive number considered to be small. What happens if we let this number becomesmaller and smaller and smaller ? What if we let it become so small it approaches the value 0
without it ever becoming 0 ? In doing this we are doing something very new. We are doing
something called taking limits. We are in fact going to take the limit of expression (1.2.2) as xapproaches 0. In symbols we would expresses this description as . Hence taking limits inlim
xd
0(1.2.2) we have
limxd0
f(x +x) f(x)x
= limxd0
f(x) + x2!
f(x) + x2
3!f
(x) + x3
4!fiv(x) + ....
(1.2.3)
Then applying this limit to each term on the right hand side of (1.2.3) all terms will disappear
except the first term (since the first term does not depend on x). As such we then define thederivative of a function to be
(1.2.4)dfdx =f
(x) =xd0limf(x + x) f(x)
x
Now, it may seem as if we have put x = 0 in (1.2.3) in order to obtain (1.2.4) but we havent. Andwe know we cant put x = 0 since if we did we would be dividing by 0 in the left hand side of(1.2.3). Therefore we must always let xt 0 (x approach 0) without it equaling 0. It just sohappens that when we do this limiting process all the terms on the right hand side of (1.2.3), except
the first term, disappear.
Expression (1.2.4) is therefore the general expression for the function derived fromf(x). Thef (x)
name given to this particular derived function is derivative. Hence is the derivative off(x).f(x)
www.ucl.ac.uk/~uczlcfe
4
-
8/9/2019 Topic2 Differentiation Part1
5/32
1.2.2 : A geometric definition of the derivative of a function
In fact, the concept and the definition of a derivative was originally developed geometrically. This
approach also overcomes the flaw mentioned in the previous definition of the derivative (namely
that not all functions can be expressed in the form of (1.2.1) whereas all function can be studied in
the manner below).
To develop the definition of the derivative geometrically consider the diagram below :
y1
y= mx+ c
x
y
x1
x2
y2
We should be familiar with how to calculate the slope or gradient of the line above. The
slope/gradient of a line is how steep the line is. We may therefore calculate this slope or gradient in
the usual manner as
slope/gradient =y
2y
1x2 x1
The slope is therefore the increase in y divided by the increase in x. Sometimes you may see this
described in words as rise over run. In a linear equation this solpe/gradient is represented by
coefficient m in the equationy = mx + c.
However, how do we find the gradient of a curve such as the one below ? What is the gradient of
the curve at point P ? :
x
y
P
www.ucl.ac.uk/~uczlcfe
5
-
8/9/2019 Topic2 Differentiation Part1
6/32
Since there are infinitely many lines which pass through P, which line do we use to find out how
steep the curve is at point P ? Our 1st aim is therefore to study an important idea which will lead to
our being able to find slopes of curves at specific points.
As such consider the function as shown below, and consider the secant joining points P (1,f(x) =x2
1) and Q (2, 4) on the curve :
y
P
Q4
x
10
1
2
y = x2
x + xx
y
y + y
(a secant is a line passing through any two points on a curve). We may find the gradient or slope of
this secant in the usual way. If we call the horizontal distance (read this as delta x) and thexvertical distance (read this as deltay), then the gradient/slope of the secant is represented byy
(read this as deltax over deltay) :y/x
3342111
y/xyy +yx + xxyxgradientQP
Now, if we keep point P fixed and move point Q towards P along the curve, then we will get
different secants from which we may calculate the gradient
yP
Q
x
y
x
www.ucl.ac.uk/~uczlcfe
6
-
8/9/2019 Topic2 Differentiation Part1
7/32
As we see from the diagram above, as Q gets closer to P so y and x become smaller. We can thenlet Q get closer and closer and closer and closer to P. In fact we will let Q get as close as possible to
P without ever landing on top of P. In terms of notation we would say that QtP, but Q!P. This is
an extremely important concept : Q approaches P forever, but Q never equals P. This is the concept
of limits, and is fundamental to calculus : no limits, no calculus. Ultimately, as Q approaches P,
the secant will become what is called a tangentat P, in other words a line which touches the curveonly at point P :
P
Q
P
y
x
y
x
===>
Theoretically, since Q!P there will always be a secant (however microscopically smaller) for us to
be able to form y/x. We will then be able to find the gradient of the tangent at point P.
As an example, consider the function y = x2, and let us form the gradient y/x of the secant forsmaller and smaller values ofx and y. Various calculations of the gradient give :
2011011
.......
.......
.......
2.0010.0020011.0020011.0010.00111
2.010.02011.02011.010.0111
2.10.211.211.10.111
2.51.252.251.50.511
3342111
y/xyy +yx + xxyxgradientQP
So it seems that as , and the gradient of the curve gets closer and closer to 2. InQ d P x +x dxfact at P the gradient of the curve becomes the tangent of the curve at point P.
In general, the closer Q gets to P the better the approximation of the gradient of the secant is to the
gradient of the tangent.
www.ucl.ac.uk/~uczlcfe
7
-
8/9/2019 Topic2 Differentiation Part1
8/32
So
as Qt P, gradient of secant PQ t gradient of tangent at P
or
gradient of secant PQ = gradient of tangent at PQdPlim
I.e.
= gradient of tangent at Pxd0lim
y
x
Hence the gradient of the tangent to at P = (1, 1) isy =x2
limxd0
y
x= 2
In order to find gradients of tangents at different points on the curve we could repeat they =x2
above tabulation for different points P. This would however be tedious. There is in fact a more
general way of finding the gradient of the tangent at any point on the curve. Consider therefore any
point P(x, y) on the curve . Then let Q(x + x, y + y) be any other point on the curve suchy =x2
that the x coordinate of P has increased by x and the y coordinate of P has increased by y. Ourtable of coordinates now becomes
(x +x)2 x2
xx2(x +x)2(x +x)2x + xxx2x
y/xyy +yx + xxyxgradientQP
(note that the Q coordinate is found by substituting into the function ). And again wex + x y =x2
may simplify the expression in the last column using basic algebra to get
y
x=
(x + x)2 x2
x=
x2 + 2xx + (x)2 x2
x
= 2x +xThen, taking limits we have
xd0lim
y
x= 2x
We therefore see that for any value ofx the gradient of the slope of is 2x. Because this is truey =x2
for any value ofx, it is true for any point P on the curve.
www.ucl.ac.uk/~uczlcfe
8
-
8/9/2019 Topic2 Differentiation Part1
9/32
Another example
Let us now consider finding the gradient of the function . The coordinate of P and Q willy = 2x2 xbe
P : (x,y) = (x, 2x2 x)
Q : (x +x,y +y) = (x +x, 2(x +x) (x +x))
Hence the gradient of the slope of isy = 2x2 x
y
x=
(y + y) yx
=2(x + x)2 (x + x) [2x2 x]
x
=2x2 + 4xx + 2(x)2 x x 2x2 +x
x
= 4x + 2x 1Then as x d 0
xd0lim
y
x= 4x 1
We therefore see that for any value ofx the gradient of the slope of is 4x1. Becausey = 2x2 xthis is true for any value ofx, it is true for any point P on the curve.
Example
See example 5b, p113 of Bostock and Chandler
Exercises
Refer to exercises 5a, p111 and exercises 5b, p113 of Bostock and Chandler.
Exercise on thinking mathematically
Repeat the above analysis on the following functions, using point P as P = (1, 1)
i) ii) iii)y = 2x2 y =x3 y = 2x3
iv) v)y = 3x3
y = 4x3
(If you know how to use the formula properties of Microsoft Excel then it might be faster to us this,
otherwise use a calculator)
Is there any pattern you can spot between your answer to i) and the answer of the example above ?
Is there any pattern you can spot between your answers to ii), iii), iv), and v) ? What about
comparing the answers to i) and the example above with the answers to ii), iii), iv), and v) ? Is there
any recognisable pattern or effect that you can see ?
End of Exercise
www.ucl.ac.uk/~uczlcfe
9
-
8/9/2019 Topic2 Differentiation Part1
10/32
Exercise on thinking mathematically
1) Consider analysing the difference between successive gradients as a point Q approaches a
point P. For a function let us set the x-coordinate of point P asx=1, and the x- coordinatey = 3x 2of point Q asx=2. Theny=2 andy+y = 5, and the gradient of the line PQ is 3 :
35221
[(y+y) - y] / [ (x+x) - x]y+yx+xyx
gradientQP
Let us now move point Q towards point P in constant increments of 0.2 from x=2 tox=1 (see the
x+x column in the table below). What happens to the difference between successive gradients ?
321
0
32.61.2
0
33.21.4
0
33.81.6
0
34.41.8
035221
[ (y+y) - y] / [ (x+x) - x]y+yx+xyx
difference
between
gradients
gradientQP
Question :
What does this difference tell us about the gradient and the way the gradient changes ? How fast
does the gradient change ? What is the steepness of the gradient ?
2) We can repeat the analysis for . Starting at the same points P and Q above we have :2x2 +x
5310.4
05.44.081.2
0.4
05.85.321.4
0.4
06.26.721.6
0.4
06.68.281.8
0.4
710231
y+yx+xyx
2nd difference
betweengradients
1st difference
betweengradients
gradient
QP
www.ucl.ac.uk/~uczlcfe
10
-
8/9/2019 Topic2 Differentiation Part1
11/32
Question :
i) What does the 1st difference tell us about the gradient and the way the gradient changes ?
How fast does the gradient change ? What is the steepness of the gradient ?
ii) What does the 2nd difference tell us about the gradient and the way the gradient changes ?
How fast does the gradient change ? What is the steepness of the gradient ?
iii) What is it about the structure of the functions in 1) and 2) above which makes these
differences occur ? What is it about the aspect of the functions which makes the steepness of the
gradients change ?
3) Repeat the above analysis for the functions :
i) ii)y = x3 2x + 1 y =x4 10
finding 1st differences, 2nd differences, 3rd differences, etc... (i.e. as many differences as
appropriate).
Question :
i) What does this difference tell us about the gradient and the way the gradient changes ? How
fast does the gradient change ? What is the steepness of the gradient ?
ii) What is it about the structure of the functions in 1), 2) and 3) above which makes these
differences occur ? What is it about the aspect of the functions which makes the steepness of the
gradients change ?
iii) Is there any pattern you can spot between the type of function being studied and the number
of differences which can be calculated from it ? How many difference columns would you need to
calculate for the general polynomial ? Why ?a0xn + a1xn1 + a2xn2 + .... + an1x + anEnd of Exercise
1.3 : Differentiation - A Formal Definition
The process of finding the gradient/slope of a function at a point is known as differentiation. Then,
in finding we are finding what is called the derivative of a function. The derivative islimxd0 y/xtherefore a general expression which allows us to find the gradient of the function at any specific
value ofx.
Then, in collecting together the main ideas presented above we may formalise the process of
differentiation as follows, in other words we may state differentiation in rigorously to be :
Given any function , then let P be a point of the curve of that functiony =f(x)such that the coordinate of P is . Then, let Q be a point whose position(x,y)
results from an increase in the x coordinate of P. Point Q then hasxcoordinate , and the corresponding increase in the y(x +x,f(x + x))coordinate when moving from point P to point Q will then be , as shown iny
the diagram below :
www.ucl.ac.uk/~uczlcfe
11
-
8/9/2019 Topic2 Differentiation Part1
12/32
y+y
x
y
xP
Q
y = f(x)
x
y
y
x+x
The gradient of the secant PQ is then
gradient PQ = (*)y
x=
f(x + x) f(x)(x + x) x
Therefore the gradient at point P itself is
(1.3.1)dy
dx
=xd
0
limy
x
=xd
0
limf(x + x) f(x)
x
The tangent of a functionf(x) is therefore a line passing through point P on that function. Applying
the process (1.4.1) on any function (as shown in the previous examples above) is known as
differentiating from 1st principles.
An extremely important (and sometimes conceptually difficult) point to understand is that a
functionf(x) can have a value in the limit as x approaches a value a, even though the function
itself may not be calculated atx = a. In (1.3.1) above it is therefore the case that y/x has a value asxt 0, even thought y/x is undefined when x = 0. More on this later when we get to study the
function .sinx
x
Examples
Differentiate the following functions from 1st principles :
i) ii) iii)y = x + 3 f(x) = 4x + 2x2 y =x.(x 1)2
iv) v)y = x3/2 x1/22x1/2
f(x) = 1/x
Exercises
Refer to exercises 5b, p113 of the core textbook of Bostock and Chandler
www.ucl.ac.uk/~uczlcfe
12
-
8/9/2019 Topic2 Differentiation Part1
13/32
Exercise on reading mathematically
Interpret fully expression (*) and (1.4.1) above. What do the expressions mean as a whole and what
do separate parts of the expressions mean ? What is the similarity and difference in meaning
between the denominator of (*) and the denominator of (1.4.1) ? What do these expressions tell us
about the way the gradient and the derivative is derived/calculated ?
End of Exercise
Exercise on thinking mathematically : Activity 1
1) In developing the expression for dy/dx in (1.3.1) above, and in all the diagrams previously
shown, we saw that point Q approached point P from the right hand side. But we can also
approach point P from the left hand side, as shown in the diagram below.
So, using diagram (ii) to help you visualise the situation :
---> develop the correct notation for coordinates (a), (b), and (c).
---> write down the gradient of the line QP
---> in the limiting process as point Q approaches point P, develop the correct
expression for the derivative off(x), at point P.
x
P
Q
f(x)
x
y
diagram i) : Q approaches P from the right diagram ii) : Q approaches P from the left
x + x
(c)
(a)
Q
P
(b)
x
y
x
f(x + x)
2) Similarly, In developing the expression for dy/dx in (1.3.1) above, and in all the diagramspreviously shown, we saw that there was only one point Q which approached point P, and
did so from the right hand side. But we can also approach point P from both the left and the
right hand side, i.e. we can have two point Q1 and Q2 on opposite sides of point P, as shown
in the diagram below.
So, using diagram (iii) to help you visualise the situation :
---> develop the correct notation for coordinates (a), (b), (c), and (d).
---> write down the gradient of the line Q1Q2---> in the limiting process as point Q1Q2 approaches point P, develop the correct
expression for the derivative off(x), at point P
www.ucl.ac.uk/~uczlcfe
13
-
8/9/2019 Topic2 Differentiation Part1
14/32
x(b)
P
Q1
Q2
(c)
x
y
diagram iii) : Q1
and Q2
both approach P
(a)
f(x)
(d)
3) Confirm that your answer in 2) can be derived algebraically by combining your answer to 1)
and expression (134.1)
End of Exercise
Exercise on thinking mathematically : Activity 2
This activity follows on from the previous activity 1 above
1) From ex 2) in the previous activity you developed an expression for the derivative off(x), at
point P. Consider only the gradient of this expression, i.e. use only the expression without
doing the limit as .x d 0
Then, consider a point P(x,y) on the curve of . Using the expression for the gradientf(x) =x3
Q1Q2 with , with , we getf(x) =x3
x = 0.1
gradient Q1Q2 =f(x + 0.1) f(x 0.1)
0.2
i) Use a graphics calculator or graph drawing software to draw the graph of
y =(x + 0.1)3 (x 0.1)3
0.2
ii) What is the shape of the graph in i) ? In other words, what family of functions doesthis graph belong to ?
www.ucl.ac.uk/~uczlcfe
14
-
8/9/2019 Topic2 Differentiation Part1
15/32
iii) Repeat i) and ii) using smaller values ofx, such as 0.05, 0.01, 0.005, etc...
iv) As x gets smaller and smaller find the equation of the curve which your graphs of i)and iii) seem to be approaching.
v) Use you answer in iv) to find the derivative of y with respect to x at the points on thecurve , wherex = 3, x = 2, x = 1, x = 0, x = 1, x = 2f(x) =x3
2) Repeat all of 1) for the function .f(x) =x2
3) Repeat all of 1) but this time using the expression for the derivative you found in 1) of
activity 1 above.
End of Exercise
Exercise on thinking mathematically : Activity 3
This activity follows on from the previous activity 1 above.
From ex 2) in activity 1 you developed an expression for the derivative off(x), at point P. Use this
expression to find the derivative of the following function
i) ii) iii)y = x + 3 f(x) = 4x + 2x2 f(x) =x.(x 1)2
iv) f(x) = 1/xEnd of Exercise
1.3.1 : Other notations for derivatives
www.ucl.ac.uk/~uczlcfe
15
-
8/9/2019 Topic2 Differentiation Part1
16/32
www.ucl.ac.uk/~uczlcfe
16
-
8/9/2019 Topic2 Differentiation Part1
17/32
1.4 : Differentiating Basic Functions From 1st Principles
1.4.1 : The derivative of basic algebraic expressions
Knowing how to differentiate functions from 1st principles can be algebraically long and
complicated. We therefore need a short, quicker way to differentiate polynomial functions. From
the examples and exercises previously shown above, a pattern might be seen to develop when itcomes to differentiating polynomial functions, namely that :
given y = axn
then the derivative ofy w.r.t.x is given bydy
dx= n.axn1
In fact this can be shown to be the case simply by differentiating from 1st principles the expression
(a is a constant) as follows : At a point P and Q the coordinate of P and Q will bey = axn
P : (x,y) = (x, axn)Q : (x +x,y +y) = (x +x, a(x +x)n)
Hence the gradient of the slope of isy = axn
y
x=
(y + y) yx
= a(x +x)n axn
x
We may then expand using the binomial theorem to geta(x + x)n
= a[xn
+ n.xn1
x +
n(n1)
2! x
n2(x
)2
+ ...] axn
x
+ terms in dx or higher order= a.n.xn1
Then as x d 0
(1.4.1)dy
dx=
xd0lim
y
x= a.nxn1
This is known as thepower rule for differentiation.
1.4.2 : The derivative of trig functionsBefore we can differentiate sin x and cos x from 1st principles we need to study two important
limits involving these trig functions. For sin x the relevant limits is
limxd0sinxx
the graph of which is shown below :
www.ucl.ac.uk/~uczlcfe
17
-
8/9/2019 Topic2 Differentiation Part1
18/32
Despite our intuition, which might suggest thatf(x) has no answer atx = 0, the graph shows us that
the function approaches the value +1 and hence it has a limit at x = 0. To see this let us study the
behaviour of this limit by studying numerically the value which the function approaches when x
approaches 0 from both the left and right hand side ofx = 0 :
0.993350.2
0.998330.1
0.999580.05
0.999980.01
0.999990.005
?0
0.99999-0.005
0.99998-0.01
0.99958-0.05
0.99833-0.1
0.99335-0.2
f(x)x
From the table it therefore seems that
limxd0sinxx = 1
and this is indeed the case. This result may be proved using geometry : See lecture/tutorial.
www.ucl.ac.uk/~uczlcfe
18
-
8/9/2019 Topic2 Differentiation Part1
19/32
1.4.3 : Limit of(cos x 1) / x
Another important limit, this time needed for differentiatingy = cosx from 1st principles, is that of
limxd0cosx1
x
the graph of which is shown below :
and again we see that the limit does exist even though algebraically it looks as if there is a division
by 0 at x = 0. Hence, again, the function has a limit atx = 0 since the values of the function
approaches 0. To see this, let us study the behaviour of this limit by studying numerically the valuewhich the function approaches whenx approaches 0 from both the left and right hand side ofx = 0 :
-0.049950.1
-0.024990.05
-0.004990.01
-0.002490.005 ?0
0.00249-0.005
0.00499-0.01
0.02499-0.05
0.04996-0.1
f(x)x
Hence we see that
(*)limxd0cosx 1
x = 0
www.ucl.ac.uk/~uczlcfe
19
-
8/9/2019 Topic2 Differentiation Part1
20/32
To prove this we can use the result of as well as a trig identity. Therefore usinglimxd0sinxx = 1
, we obtaincos2x = 1 2sin2x
ucosx = 1 2sin2x2
cosx 1 = 2sin2x2
Substituting into (*) we obtain
limxd02sin2(x/2)
x = 0
Dividing by 2, and factorising a sinx/2 :
limxd0 sin(x/2)
x/2.sin(x/2) = 0
Taking limits
limxd0 sin(x/2)
x/2.limxd0 sin(x/2) = (1)(0) = 0
For most basic functions puttingx = 0 into an equation and havingxt 0 in the same equation will
give the same answer. However, we now see that there is a mathematical difference between putting
x = 0 into (*) and (**) and having xt 0 in (*) and (**). The two processes do not give the same
answer. Division by 0 is impossible (or rather, it is not defined), where letting x forever approach 0
as close as possible without ever equaling 0 is possible, and give us whatever answer it gives.
There are therefore a class of functions which although cannot be evaluated at specific values, sayx
= a, b, c, etc... do have an answer as these functions approach those values. I.e. they do have an
answer asxta, b, c. This is the great conceptual leap which took some of the best mathematicians(from the time Newton and Leibniz invented calculus) 200 years to understand. Namely the idea
that a function can have a limiting value (i.e. can have an answer asxta) but cannot be evaluated
at that value (i.e. does not have an answer when x = a). Then, when the function has a limiting
value, the function is said to be defined at that value, i.e.
The limit off(x) (asx approach the value a) is actually equal tof(a)
i.e.
limxdaf(x) =f(a)
1.4.4 : Derivative of sin x
Now we are in a position to differentiatef(x) = sin x from 1st principles :
ddx
(sinx) =xd0lim
sin(x + x) sin(x)x
We may now use the factor formula of trig identities to factorise the numerator. In other words :
sin(x +x) sin(x) h 2cos(x +x/2) sin(x/2)
www.ucl.ac.uk/~uczlcfe
20
-
8/9/2019 Topic2 Differentiation Part1
21/32
Hence our derivative becomes :
ddx
(sinx) = limxd0
2cos(x + x/2) sin(x/2)x
= limxd0 cos(x + x/2). sin(
x/2)
x/2
Then, forx measured in radians we have
and (*)limxd0
cos(x + x/2) = cosx limxd0
sin(x/2)
x/2= 1
Hence
ddx
(sinx) = cosx
Similarly we can show that
ddx (cosx) = sinx
However, these derivative are only valid if the angle x is measured in radians since the limit
in (*) only works ifx is measured in radians. In general any limit involving a triglimhd0 sin(h)/h
function divided by a small increment (x or h) will need to have its angle measured in radians.
Examples
See lecture and refer to examples 8a, p256 of Bostock and Chandler core textbook.
Exercises
Refer to exercises 8a, p256 of Bostock and Chandler core textbook.
Exercise on thinking mathematically
1) The proofs of the derivatives ofsin x and cos x above used the factor formula. However, we
may use the compound formula for trig identities to expand . Similarly we may do so forsin(x +x)when differentiating cos x from 1st principles. Hence, perform the expansion ofcos(x +x)
and to obtain the derivatives ofsin x and cos x.sin(x +x) cos(x +x)
End of Exercise
1.4.5 : The exponential function
General exponential functions are ones where the power is not constant but a variable. Hence
2x, 10x+1, 53x + 2
etc.... Plotting for various values ofx we gety = 2x
www.ucl.ac.uk/~uczlcfe
21
-
8/9/2019 Topic2 Differentiation Part1
22/32
From the graph we see make the following observations about the behaviour of this function :
i) domain and range : the function is always positive for all values ofx, i.e.f(x) > 0,xii) the value of f(x) increase ever more rapidly asx increases.
iii) the function approaches 0 in the negativex direction but never actually equals 0, i.e.
as .f(x) d 0 x d
We will now introduce a new and important function called the exponential function ex. This
function is important because it is used everywhere in mathematics and science. In science it is
used to model decay processes such as financial calculation of interest rates, radioactive decay, the
decay of charge on the capacitor of an electrical circuit, damping of car suspension systems,
amongst other applications. In mathematics it is used, amongst other things, to define new
trigonometric functions called hyperbolic functions.
Compared to the graphs above, the graph of the exponential function is as shown by the solid line:
www.ucl.ac.uk/~uczlcfe
22
-
8/9/2019 Topic2 Differentiation Part1
23/32
In the value ofa which gives this function is a = 2.718281828.... and is given the symbol e.y = ax
Exercise on developing mathematical thinking
Consider the following general exponential function a(x+b) + c
i) For various values of a, b, and c plot the general exponential function.
ii) Describe the behaviour of this function for each of the different values ofa, b, and c chosen.
How does the curve of the function change when these values are changed ? What is the
effect ofa, b, and c on the function when any/all of these coefficients are negative ?
iii) formalise their description of ii) above into mathematical description (as done in the section
1.4.1 on exponentials above)
iv) compare your ii) with your iii). Make sure that every relevant issue is described formally
and make sure that your formal description is complete.
End of Exercise
1.4.6 : The derivative of the basic exponential function
Let us consider how to differentiate exponential functions. As such, consider the general
exponential function , . From the definition of the derivative ofy with respect to x wey = ax a c have :
dy
dx= d
dx(ax ) = lim
xd0
ax+x axx
,= ax.limxd0
ax 1x
Note that we can factorise ax since this is independent ofx. All we have to do now is to evaluate
the limit. A theoretical discussion of this is beyond the scope of our course, so instead let us look at
a numerical/conceptual argument. Let us see what happens when, for a very small value of x, weevaluate the limit for various values ofa :
1.3863044
1.09861830.693152
01
x = 0.00001a
The table suggests that as , there is a value ofa between 2 and 3 for which the limitx d 0
is 1.limxd0
ax 1x
If we can find this value of a then the derivative of , where . would simply be ax itself.y = ax a c Numerically speaking we could continue trying various values ofa between 2 and 3 to see which
value would give us an answer to the limit which would be closer and closer to 1.
www.ucl.ac.uk/~uczlcfe
23
-
8/9/2019 Topic2 Differentiation Part1
24/32
Thus if
for small xax 1x
j 1
then
for small xax 1 j x
or for small xax
j 1 +xi.e.
for small xa j (1 + x)1/x
In the limits we have
a = limxd0
(1 +x)1/x = 2.718281828459......
This number is in fact given the symbol e (and which was given by Euler, a German mathematician
who 1st came across this as an important value in mathematics), and the corresponding function is
thereforef(x) = ex.
Therefore when a = e we have
ddx
(ex ) = ex
where ex is the exponential function. So the derivative of the exponential function is the
exponential function itself. We will leave the differentiation of the more general exponential
function until latery = ax
Examples
See lecture and refer to examples 8b, p260 of Bostock and Chandler core textbook.
Exercises
Refer to exercises 8b, p261 of Bostock and Chandler core textbook.
1.4.7 : Some history of the exponential number/function
The number e is first discovered through a study of compound interest. In 1683 Jacob Bernoulli
looked at the problem of compound interest and, in examining continuous compound interest, he
tried to find the limit of as n tends to infinity. He used the binomial theorem to show that(1 + 1/n)n
the limit had to lie between 2 and 3, so we could consider this to be the first approximation found toe. Also if we accept this as a definition of e, it is the first time that a number was defined by a
limiting process. He certainly did not recognise any connection between his work and that on
logarithms.
As far as we know the first time the number e appears in its own right is in 1690. In that year
Leibniz wrote a letter to Huygens and in this he used the notation b for what we now call e. Later,
Johann Bernoulli began the study of the calculus of the exponential function in 1697 when he
published Principia calculi exponentialium seu percurrentium. The work involves the calculation
of various exponential series and many results are achieved with term by term integration.
www.ucl.ac.uk/~uczlcfe
24
-
8/9/2019 Topic2 Differentiation Part1
25/32
It is Euler who suggested the notation e. The claim which has sometimes been made, however, that
Euler used the letter e because it was the first letter of his name is not true. It is probably not even
the case that the e comes from "exponential", but it may have just be the next vowel after "a" and
Euler was already using the notation "a" in his work. Whatever the reason, the notation e made its
first appearance in a letter Euler wrote to Goldbach in 1731. He made various discoveries regarding
e in the following years, but it was not until 1748 when Euler published Introductio in Analysininfinitorum that he gave a full treatment of the ideas surrounding e. He showed that
e = 1 + 1/1! + 1/2! + 1/3! + ...
and that e is the limit of as n tends to infinity. Euler gave an approximation for e to 18(1 + 1/n)n
decimal places,
e = 2.718281828459045235
without saying where this came from. It is likely that he calculated the value himself, but if so there
is no indication of how this was done. In fact taking about 20 terms of 1 + 1/1! + 1/2! + 1/3! + ...
will give the accuracy which Euler gave. (*Summary/excerpts taken from the websiteshttp://www-history.mcs.st-andrews.ac.uk /HistTopics/e.html*)
1.4.8 : The log function
Here I will summarise the properties of logs when they are seen as functions. As such general log
functions are ones of the form
logx,log(2x + 1)
etc.... Plotting for various values ofa we gety = a logx
www.ucl.ac.uk/~uczlcfe
25
-
8/9/2019 Topic2 Differentiation Part1
26/32
From the graph we see make the following observations about the behaviour of this function :
i) domain and range : the function produces unlimited values but only for positive
values ofx, i.e. 0ii) the value of f(x) increase ever more slowly asx increases.
iii) the function approaches in the negativey direction but never crosses the x axis,i.e. as .f(x) d x d 0
We will now introduce an important variation of the log function called the natural log function and
symbolised by y = ln x. This function is important because it is also used everywhere in
mathematics and science since it defines the inverse of the exponential function, and thus helps us
solve problems involving exponentials.
Compared to the graphs above, the graph of the natural log function is
In the value ofa which gives this function is a = 0.434294481....y = a logx
Exercise on developing mathematical thinking
Consider the following general exponential function a log(x + b) + c
i) For various values of a, b, and c plot the general log function.
ii) Describe the behaviour of this function for each of the different values ofa, b, and c chosen.
How does the curve of the function change when these values are changed ? What is the
effect ofa, b, and c on the function when any/all of these coefficients are negative ?
iii) formalise their description of ii) above into mathematical description (as done in the section
1.4.1 on exponentials above)
iv) compare your ii) with your iii). Make sure that every relevant issue is described formally
and make sure that your formal description is complete.End of Exercise
www.ucl.ac.uk/~uczlcfe
26
-
8/9/2019 Topic2 Differentiation Part1
27/32
1.4.9 : The derivative oflnx
We will now study how to differentiate (because, of all the log functions, the derivative ofy = lnxthis is the easiest to obtain). We will leave the derivative of the general log function untily = logxlater (but note that, by standard log rules we can always transform ln x to log x).
In order to obtain the derivative of we could start from 1st principles and set up :y = lnx
dy
dx= lim
xd0
ln(x + x) lnxx
The problem with this is that we do not know how to expand . So it seems as if we areln(x +x)stuck ! But not really. Using rules of logs we can change the numerator so that the expression above
becomes
dy
dx= lim
xd0
lnx +x
x
x
= limxd0
1x
ln x + xx
= limxd0
1x
ln 1 + xx
Now perform the trick of multiplying by multiplying byx/x :
y
x= xx lim
xd0
1x
ln 1 + xx
=1x limxd0
xx ln 1 +
xx
Now, the reason we multiplied byx/x was so that we could now use the rules of logs again to get
= 1x limxd0
ln 1 + xxx/x
= 1x ln limxd0
1 + xxx/x
But (if you cant see why then let u = x/x, then we getlimxd0 1 +xx
x/x
= e limud0(1 + u)1/u
which we know is e), so we have
(1.4.2)dy
dx= 1x ln e =
1x
There is another, much easier, way in which we can show that the derivative of ln x is 1/x. We do
this by converting into exponential form. So, ify = lnx
theny = lnx x = ey
www.ucl.ac.uk/~uczlcfe
27
-
8/9/2019 Topic2 Differentiation Part1
28/32
This last expression isx(y), i.e. a function ofy. We can now differentiate this function w.r.t.y :
(iii)dxdy
= ey =x
Do not get confused by the supposed change in the order of the variables : (i) is a function ofx sowe differentiate it w.r.t. variablex. (ii) is a function ofy so we differentiate it w.r.t. variabley. So,
both functions are still differentiable w.r.t. to there independent variable.
However, we require the derivative ofy w.r.tx (i.e. we want dy/dx) not the derivative ofx w.r.ty
(i.e. not dx/dy). So what relationship can we find between
dy
dxand
dxdy
?
Well, from the basic definition of derivative we have :
dy
dx= limxd0
y(x + x) y(x)x
= limxd0y
x
= limxd01
y/x
= 1limyd0
y/x
(1.4.3)= 1
dx/dy
So from (1.4.3) above we see that dx/dy is the reciprocal ofdy/dx. Hence (iii) becomes
dy
dx= 1x
and the derivative ofy = ln x is dy/dx = 1/x (see appendix for alternative way of finding the
derivative of lnx).
We can now see how to find the derivative of the more general log function y = loga x. From rules
of logs we have :y = logax =
lnxln a
= 1ln a
. lnx
Hencedy
dx= 1
ln a.1x =
1x. ln a
1.4.10 : Differentiatingy=ax
We may now study how to differentiate the more general exponential y = ax. Then we may rewrite
this function in terms of the exponential as
(iv)y = elnax
(v)y = ex lna
www.ucl.ac.uk/~uczlcfe
28
-
8/9/2019 Topic2 Differentiation Part1
29/32
where, for (v) we have used the standard rule of powers for logs. We now know how to differentiate
(v) since this is just the exponential function. However because of the function of a function nature
of (v) we differentiate it by the chain rule :
(vi)dy
dx=
dy
dududx
= ex ln a. ddx
(x ln a)
since ln a is a constant (vi) easily becomes :
(vii)dy
dx= ex ln a. ln a = ax. ln a
Hence the derivative of the general exponential functiony=ax is dy/dx = ax. ln a.
Examples
See lecture and refer to examples 8d, p264 of Bostock and Chandler core textbook.
ExercisesRefer to exercises 8d, p264 of Bostock and Chandler core textbook.
1.4.11 : Some history of the log function
Logarithms were invented by John Napier, a Scottish mathematician, in 1614 as a way of
simplifying mathematical calculations involving powers. Thus equations involving powers could be
simplified to equations containing only multiplications, and equations involving multiplications
could be simplified to equations containing only additions.
However, the logarithms he invented differed from the common logarithms we now use today in the
sense that he defined logarithms as a ratio of two distances in a geometric form (just as a basic
definition of sinx, cosx, tanx are ratios of two distances of a triangle), as opposed to the currentdefinition of logarithms which involves the manipulation of exponents (powers). The possibility of
defining logarithms as exponents was recognized by John Wallis in 1685 and by Johann Bernoulli
in 1694.
However, this way of viewing and using logs still implied that logs and exponents were
fundamentally seen as arithmetic operations used to reduce powers to multiplications and
multiplications to additions, not as functions. The idea of deducing that t = loga x can be derived
fromx = at, and therefore of thinking of logs as a function (which is the inverse ofx = at) involves
a much later way of thinking about logs.
It would be fair to say that Johann Bernoulli began the study of the analysis of exponential
functions in 1697, and as such generalised the study of logs as functions. It may have been Jacob
Bernoulli who first understood the way that the log function is the inverse of exponential functions.
On the other hand the first person to make the connection between logarithms and exponents may
well have been James Gregory. In 1684 he certainly recognised the connection between logarithms
and exponents, but he may not have been the first to do so.
Consequently, the log function can be defined either as an arithmetic techniques to simplify the
solution to equations, or as a function which is the inverse of the exponential function.(*Summary/excerpts of the history of logs taken from the websites http://www-gap.dcs.st-and.ac.uk/~history
/HistTopics/e.html and http://www.sosmath.com/algebra/logs/log1/log1.html*)
www.ucl.ac.uk/~uczlcfe
29
-
8/9/2019 Topic2 Differentiation Part1
30/32
Exercise on developing mathematical thinking
So far we have been able to differentiate all the functions we have encountered. However, not all
functions can be differentiated. Remember that the derivative of a functionf(x) is given by
df
dx =xd0limf(x + x) f(x)
x
and this derivative can only be found at a point x = c if the limit exists at the point c itself. If the
limit does exists thenf(x) is said to be differentiable, otherwisef(x) is not differentiable atx = c.
1) use the above definition of the derivative to find df/dx atx = 1 for the function f(x) = 4x2+1,
i.e. find
.xd0lim
f(1 + x) f(1)x
Isf(x) differentiable atx = 1 ?
2) Let g(x) be a function defined as
g(x) =
x2 + 3 x < 1
2x + 2 x m 1
i) Find g(2), g(1), g(0), g(1), g(2), g(3)ii) Sketch the graph of y = g(x) for 2 [x[ 3iii) Find g'(1) from first principles using the above definition of a derivative. Here you
will need to calculate
andxd0+lim
g(1 + x) g(1)x xd0
limg(1 + x) g(1)
x
In other words you will need to calculate the limit of g'(1) as x approaches 0 fromthe right hand side (i.e. xt 0+) and separately as x approaches 0 from the lefthand side (i.e. xt 0).
3) Let h(x) be a function defined as
h(x) =
x2 + 3 x < 1
2x + 4 x m 1
i) Find h(2), h(1), h(0), h(1), h(2), h(3)ii) Sketch the graph of y = h(x) for 2 [x[ 3iii) Find h'(1) from first principles if it exists. Again you will need to calculate a two
sided limit as :
andxd0+lim h(1 + x) h(1)x xd0lim h(1 + x) h(1)x
www.ucl.ac.uk/~uczlcfe
30
-
8/9/2019 Topic2 Differentiation Part1
31/32
4) Let k(x) be a function defined as
k(x) =
x2 + 3 x < 1
2x + 4 x m 1
i) Find k(2), k(1), k(0), k(1), k(2), k(3)ii) Sketch the graph of y = k(x) for 2 [x[ 3iii) Find k'(1) from first principles if it exists. Again you will need to calculate a two
sided limit
5) Comment on how the graphs ofg(x), h(x), and k(x) differ at the point x = 1. How is the
shape of the graph related to differentiability ?
End of Exercise
Exercise on thinking mathematically
It is possible to use 1st principles to define second, third, fourth, etc... derivative of a function. As
such consider
d2fdx2
=f(x) =xd0lim
f(x + x) f(x)x
i) Simplify this expression to obtain the definition of the second derivative.
There are many other definitions of the second derivative. In order to develop these one must use
alternative definitions of the first derivative such as those you can develop from the exercise onp13-14 of these notes. Therefore, using these two alternative definitions for the first derivative
ii) Define and simplify two alternative expressions to the definition of the second
derivative.
iii) Find, and simplify, a third alternative definition to the second derivative (for this you
will need to find another alternative definition to the first derivative. You should be
able to get this simply by spotting a pattern between the three definitions you
developed from the exercise on p13-14 of these notes).
iv) Use the expressions below to obtain other definitions for the first and second
derivative :
f(x + x) =f(x) + x.f(x) + x2
2!f(x) + x
3
3!f
(x) + x4
4!fiv(x) + ....
f(x x) =f(x) x.f(x) + x2
2!f(x) x
3
3!f
(x) + x4
4!fiv(x) ....
v) From your definitions of the second derivatives above deduce a generalised
definition for the second derivative
vi) Develop similar for the 3rd and 4th derivatives of a functionf(x).
End of Exercise
www.ucl.ac.uk/~uczlcfe
31
-
8/9/2019 Topic2 Differentiation Part1
32/32
Appendix
A Comment about infinitessimals
Calculus deals fundamentally with infinitessimals, i.e. infinitely short lengths or distances. In
defining the derivative we then used a ratio of two infinitessimals, i.e. y/x. However, we are notrestricted to forming this type of infinitessimal. We may in fact use infinitessimals in whatever
combination is mathematically legal in order to address our problem. For example, consider the
diagram below :
y
x
y
x
x x+x
y+y
y
1
2
3
4
We may then study the change in a given areaA if thex andy lengths of the region are increased by
an infinitely small amount x and y. In this case we have that region (1) above to be :
A(x, y) =x.y
If we then increase the area by increasing thex andy distances by infinitely small amounts, we then
have the total region (1), (2), (3), (4) :
A(x+x,y+y) = (x+x).(y+y)
We may then expand A(x+x, y+y) by considering the separate areas (1), (2), (3), (4) :
A(x + x,y + y) =A(x,y) +A(x + x,y) +A(x,y + y) +A(x,y)(1) (3) (2) (4)
= x.y + (x+x).y + x.(y+y) + x.y
From this we see that infinitessimals are used to describe whatever relationship exists between the
variables as necessary, and that in this example we can talk about the product of infinitessimal in
order to describe an infinitely small area given by
A = x.y