You are on page 1of 28

.

Appendix:
Differentiation, Integration, and
Optimization
Differentiation and Integration
 We often encounter the problem of knowing how an outcome, say y,

is changing with respect to another variable x

 – but where we wish to know the direct functional relation that

determines y in relation to x, which we write as y = f(x) - pronounced:

“y is a function of x”.

 Progressing from a rate of change of a variable y with respect to x, to

a direct or absolute dependence of y on x, is what we call integration.


Differentiation and Integration
  
As an introduction to the idea, consider that we are driving out of

London on the M1 motorway north to our destination with a

speed of 70 miles per hour (mph).

The speed of 70 mph tells us that the rate of change of our

distance travelled (miles) with respect to time (hours) can be

expressed:

 (A-1)

 So if Δtime = 1 hour, Δdistance = 70 miles.


Differentiation
  and Integration:
  
 Suppose, however, that we wish to know not our rate of change of distance

with respect to time,

 Δdistance /Δtime,

 as expressed by (A-1),

 but the actual distance travelled from London as a function of time.

 The answer is the integration of Eqn A-1, as


distance (miles) = 70 mph x time (hours) + a “fixed number” (A-2 )

 so that, with each additional hour of elapsed time, we add a further 70 miles of

distance to our journey.


Differentiation and Integration
  
 The “fixed number” in Eqn A-2 allows us to determine distance as the

distance from a specific point of our choosing.

 For example, we might decide that does not apply as we travel, say, the

first 20 miles of our journey from the start-off point of departure until we are

on the M1 motorway. If we maintain our speed at 70 mph once we are on the

motorway, the distance we have travelled from our start-off point of

departure is determined as

 distance (miles) = 70 mph x time (hours) + 20 miles

 where time is the time we have been on the motorway.



Differentiation and Integration

  
What we are leading up to saying is that

We can generalize Eqns A-1 and A-2 with the statement that

 =A (A-3)

 implies the relation (as the integration of = A) :

 y = A x t + a constant (some fixed number) (A-4)


Differentiation and Integration
  
 Thus, if I tell you that at each point for x: 

 =3

 without specifying what either y or x actually refer to, you

can, nevertheless,

 immediately deduce (as the integration of = 3) :

 y = 3x + a constant.
Quadratic functions
  
 If we have a “quadratic” relation between y and x as

 y = Ax2 + a constant (A-5)

 Then

 = 2 x (Ax) (A-6)

 For example, with y = 3x2 + 4 in the figure on the following slide, we

can verify by inspection of the figure that at any point, the gradient or

slope of the curve, , is determined as

 = 3 x 2 x x = 6x.
Example of a quadratic function: : Graph of y = 3x2 +4.
Quadratic functions: y = 3x2 +4
  
 Thus, when x = 2 in Fig. A-1, we have y =16, and, by

inspection, the gradient = = 12,

 which is consistent with = 6x = 6 x 2 = 12;

 and when x = 3 in the figure, we have y = 31, and, by

inspection, the gradient = = 18,

 which is consistent with = 6x = 6 x 3 = 18.


Higher order polynomials
  
 If we were to continue to consider increasing powers of x, the

outcome would be the statement that the equation:

 y = A(xN) + a constant (A-7)

 implies the relation:

 = A N xN-1 (A-8)
Higher order polynomials
  For example, given
 y = 12 + 3x9

 we have:

 = 3 x 9 x x8 = 27x8

 As another example, given y = A x½,

 we have:

 = A.½.x(½-1)
The exponential function: eAx
  
 We have:

 = A.eAt (A-9)

 With A set equal to 1, we have Eqn A-9 as the special case:

 = et (A-10)
The natural log function
  
 y = ln(x) + constant (A-11)

 implies the relation:

 = (A-12)
Break time
Function of a function
 We can extend the idea of differentiation to allow for the

concept of a “function of a function”.

 In simple terms, if John is working twice as fast as Peter,

who is working three times faster than Jonathan, it must be

that John is working 2 x 3 = 6 times faster than Jonathan.


Function of a function
  
 More generally, we can say that when y is a function

of g [which we may write as: y = f(g)] and g itself is a

function of x [g = g(x)]:

(A-13)

 we can determine

 (A-14)
Function of a function
  
 As an example, suppose, we have:

 y = (x+3)2 = x2 + 6x + 9

 so that (with Eqns A-3-A-6) 2x + 6.

 We could alternatively express the differentiation dy/dx of y = (x+3)2 in

relation to x as the differentiation of y with respect to (x + 3):

 = 2(x + 3),

 and the differentiation of (x + 3) with respect to x: = 1,

 so that = x = 2(x+3) x 1 = 2x + 6, as above.


Function of a function
  
 An alternative way to envisage the above differentiation of

 y = (x+3)2

 with respect to x is to make the substitution z = x+3,

 so that the above is expressed:

 y = z2

 We can then say: = 2z = 2(x+3)

 The relation z = x+3 implies: = 1

 so that = x = 2(x+3) x 1 = 2x + 6, again, as above.


Function of a function
  
 As another example, suppose we have:

 y = ln(x10)

 and we wish to determine dy/dx.

 With Eqns A-11 and A-12, we can say that y is

changing with respect to x10 at the rate


Function of a function
  
 And (with Eqns A-7 and A-8), we can say that

x10 is changing with respect to x at the rate

 10

 Thus given y = ln(x10), we have

 10x9 =
Function of a function
  
 Alternatively,

substituting z = x10, we have

y = ln(z), and hence

 and = 10x9

 giving = x = 10x9 =

 as above.
Minimum and maximum of a function
 A particularly useful application of differentiation is that it

allows us to determine when a function is either maximized or

minimized. For example, suppose we have

 y = 1 + 2x – x2
 and we wish to determine x to maximize y as a function of x.

 The following figure depicts the graph of the relation between


y and x.
Graph of y = 1 + 2x -x2.
Minimum and maximum of a function
y = 1 + 2x – x2
  
 We can immediately see that the maximum value of y is

achieved at the point that the gradient of the curve is flat, which

is to say, at the point that dy/dx = 0.

 In this case, dy/dx is determined (with Eqns A-3-A6) as

 = 2 – 2x
 which (by inspection) = 0 when x = 1 (as depicted in Fig. A-2).
Minimum and maximum of a function
 Thus, the maximum value of y (on substitution of x = 1 (from the

previous slide) back into

 y = 1 + 2x – x2 (with x = 1)

 is y = 2.

 By inspection of the function (in the above figure), we can see that

this is indeed the case (no other value of x provides a value of y

greater than 2).


Again: Graph of y = 1 + 2x -x2.

You might also like