<<

Calculus/Differentiation

Introduction

We can use some procedures included in what is termed to find the of any . Why do we care about of functions? Because many decisions are based on the slopes of functions (i.e., their marginal values) rather than the values of the functions themselves.

For example, recall the resource allocation problem where there are three users having benefit functions of 6X-X2, 7Y -1.5Y2, and 8Z-0.5Z2 respectively. These functions are all concave, having the shape of the figure shown below, and have unique maximum values at X=3, Y=7/3, and Z=8.

Obviously, if we can find the value on the horizontal axis where the slope of the function is 0, it will be the value where the function reaches a maximum. If these functions were convex (turned upside down) their slopes are 0 at their minimum values.

Finding the slope

Differentiation is a method of calculus that lets us find the slope of a function, say f(x), at any value of x. Conversely, if we are interested in finding a ’s maximum value, we know that happens when the slope is 0, so we can use differentiation to find the value of x where the slope of f(x) = 0. This is where the black dot is in the above figure. At the top of this function the slope is 0. Slopes define the rate of change of one variable (on the vertical axis) with respect to another variable (on the horizontal axis).

The easiest way to find slopes for any is by differentiation. Differentiation results in another function whose value for any value x is the slope of the original function at x. This function is known as the of the original function, and is denoted by either a prime sign, as in f’(x) (read "f prime of x"), or the notation, df/dx. The operator ‘d’ replaces the change notation ‘’ as inf(x) /x and signifies what the change in f(x) is asx goes to 0.

Definition of Slope The slope of any continuous function f(x) at any x is a line to it at that value of x. The slope of the tangent line is the same as the slope of the function at that value of x.

The equation of a straight line is ‘a + mx’ where m is the slope of the line and ‘a’ is the value of the function when x = 0.

f(x)

x

By definition, if the function is concave, as shown in the figure above, its slope decreases as x increases. The slope of a convex function, e.g., x2, increases as x increases.

The slope of a line, also called the of the line, tells us how steep the line is. A line that is horizontal has slope 0, a line from the bottom left to the top right has a positive slope, a line from the top left to the bottom right has a negative slope.

The value of f(x) on the vertical axis can also be called ‘y’. The definition of slope between two points (x1,y1) and (x2,y2) is.

This is the approximate slope at a value of x between x1 and x2. As x approaches 0, the slope gets less approximate.

Given that y2 is f(x+x) and y1 is f(x), the slope m of the function at any single point x is the

Maxima and Minima

Finding the value of x of a function f(x) that results in a 0 slope does not always guarantee a maximum or minimum of the function. The function may have multiple values of x that result in slopes of 0. For now, this is just a warning that calculus doesn’t always tell us what we want to know, without some additional tests to be sure the solutions are indeed global, rather than relative, maxima or minima.

A graph illustrating local min/max and global min/max points

One way to know if a point on a function is a true maxima/minima is to just graph the function and see if it looks like a maxima or minima. A more practical method is to plug x values slightly left and right into the derivative of the function. If the results have opposite signs then it is a true maxima/minima. You can also use these slopes to figure out if it is a maxima or a minima. Simply, the left side slope will be positive for a maxima and negative for a minima.

Finding slopes using differentiation.

A derivative of a function is its slope. Finding the derivative of a function defines another function that is the slope of the original function. For example consider the function 5x2. Its slope at any value of x is found by differentiating it, i.e., by finding d(5x2)/dx. Most of the functions we will be working with in this class are power functions having terms of the form aXb where the exponent is not -1. .

Consider the function Y(X) = aXb . The slope of this power function is found in two steps:

(1) Multiply the term by its exponent b. (2) Subtract 1 from the exponent.

In this example dY/dX = abXb-1.

The slope of this ‘slope function’ can be found using the same two-step procedure: d2Y/dx2 = d [(dY/dX)/dX ]/dX = a(b)(b-1)Xb-2. This is called the of the function Y(X).

And so on. Some other examples include:

1) The constant 35. Its plot on a graph would be a horizontal line at Y=35 for all values of X. The slope of any horizontal line is 0. Note this constant can also be expressed as a power function = 35X0. Differentiating to find it’s slope results in 35(0)X-1. This clearly equals 0 for all values of X.

2) The function 5 + 4X0.5. Differentiating each term results in 2X-0.5. The initial value of 5 when X = 0 does not affect the value of the slope of the function.

3) The function Y = 6X – X2. Differentiating each term results in 6-2X. Equating this to 0 tells us that when X = 6/2 = 3, the function is a maximum at Y = 9.

4) Assume a benefit function of 8X0.9 and a cost function of 2X1.4. Differentiating each results in 7.2X-0.1 and 2.8X 0.4. When these two slopes are equal, the net benefits (benefits less costs) are a maximum. This happens when X = (7.2/2.8)2 or at about X=6.6.

Differentiation rules

For any fixed real constant c, dc/dx = 0.

For the function f(x) = x, d(f(x))/dx = 1 since any function or variable raised to the power of 0 = 1.

For any a + mx, d(a+mx)/dx = m

For any fixed real number c, d(c f(x))/dx = c d(f(x))/dx

For any multiple function expression such as f(x) + or – g(x),

d[ f(x) + or – g(x)]/dx = df(x)/dx + or – dg(x)/dx

You can break a function up into terms, figure out the derivative individually for each term and build the answer back up,

For any multiple function expression such as Y(x) = f(x)g(x), d(Y)/dx = g(x) d(f(x))/dx + f(x) d(g(x))/dx.

For example consider Y(x) = (3x2 + 5x + 2)(2x3 – x).

dY/dx = ((3x2 + 5x + 2)(6x2 – 1) + (6x + 5 )(2x3 – x) =

(18x4 + 30x3 + 12x2 – 3x2 – 5x -2) + (12x4 + 10x3 – 6x2 – 5x) =

( 30x4 + 40x3 + 3x2 – 10x – 2 )

Multiplying the two terms together and differentiating should result in the same expression for the slope.

Y(x) = 6x5 + 10x4 + 4x3 – 3x3 -5x2 – 2x

dY/dx = ( 30x4 + 40x3 +3x2 – 10x – 2 )

Partial differentiation

For multivariate functions having more than one unknown variable in them, one can find the slopes associated with each variable independently of the value of the other. For example consider the function F(x,y) = 5+3(xy). The of F(x,y) with respect to x (assuming y is a constant) is

F/x = 3y.

The partial derivative of F(x,y) with respect to y (assuming x is constant) is

F/y = 3x

Note we replace the differential operator d with to indicate that it is a partial differentiation. 

For a review, consider F(x,y) = 5+3(xy)2.

F/x = 3 ( 2xy2 ) = 6xy2.

F/y = 3 (2x2y) = 6x2y.

Finally consider F(x,y) = 5 + 3(x+y)2

F/x = 3(2)(x+y)(1) = 6(x+y)

F/y = 3(2)(x+y)(1) = 6(x+y)