You are on page 1of 15

BACS 1263 Mathematics for Computer Science II Faculty of Information and Communications & Technology

CHAPTER 2: THE DERIVATIVE

2.1 The Slope of a Straight Line This section is devoted to a discussion of the geometric and algebraic properties of straight lines Equation of Nonvertical Lines A nonvertical line L has an equation of the form y = mx + b (1)

The number m is called the slope of L and the point (0,b) is called the y-intercept. The equation (1) is called the slope-intercept equation of L. If we set x = 0, we see that y = b, so that (0,b) is on the line L. Thus the y intercept tells us where the line L crosses the y-axis. The slope measures the steepness of the line. Properties of The Slope of a Line Slope Property 1 Suppose that we start at a point on a line of slope m and move one unit to the right. Then we must move m units in the y-direction in order to return to the line.
Starting point m starting point 1 m positive m negative m 1 starting point 1 m zero

BACS 1263 Mathematics for Computer Science II Faculty of Information and Communications & Technology

Slope Property 2 We can compute the slope of a line by knowing two points on the line. If (x1, y1) and (x2, y2) are on the line, then the slope of the line is
y y2 y1 (x1,y1) x2 x1 x1 x2 (x2,y2) y2 y1 x

y y x x
2 2

We can state Slope Property 2 in a form that will prepare us for the introduction of the derivative in the next section. Suppose that we move from point (x1, y1) [the initial point] to point (x2, y2) [ the terminal point]. Using the delta notation, the change in x is x = [terminal value of x] [initial value of x] = x2x1. Similarly, the change in y is given by y = [terminal value of y] [initial value of y] = y2y1. In the formula for slope given in Slope Property 2, the numerator is y and the denominator x. So, Slope Property 2 may be expressed in delta notation as follows: The slope m of a nonvertical line is given by the formula y = m (3) x

BACS 1263 Mathematics for Computer Science II Faculty of Information and Communications & Technology

Slope Property 3 The equation of a line can be obtained if we know the slope and one point on the line. If the slope is m if (x1, y1) is on the line, then the equation of the line is y y1 = m( x x1) This equation is called the point-slope form of the equation of the line. Slope Property 4 Distinct lines of the same slope are parallel. Conversely, if two lines are parallel, they have the same slope. Slope Property 5 When two lines are perpendicular, the product of their slopes is 1. Finding a Linear Function from Data - Suppose that we are given a table of data. How can we know if the data comes from a linear function?. If so, how can we find the linear function? The key to answering both questions is to use equation (3), which says that the quotient y is always the slope m, independent of the
x

initial and terminal points. As a test for linearity, we can compute the preceding quotient for each pair of consecutive data points. In order for the data to come from the linear function, the quotients y must have the same value.
x

1.2 The Slope of a Curve at a Point In order to extend the concept of slope from straight lines to more general curves, we must first discuss the notion of the tangent line to a curve at a point. We have a clear idea of what is meant by the tangent line to a circle at a point P. It is the straight line that touches the circle at just the one point P. Similar reasoning lead us to a suitable definition of slope for an arbitrary curve at a point P. This straight line is called the tangent line to the curve at P. This line best
3

BACS 1263 Mathematics for Computer Science II Faculty of Information and Communications & Technology

approximates the curve near P. We define the slope of a curve at a point P to be the slope of the tangent line to the curve at P. The portion of the curve near P can be, at least within an approximately replaced by the tangent line at P. Therefore, the slope of the curve at P that is, the slope of the tangent line at Pmeasures the rate of increase or decrease of the curve as it passes through P. 1.3 The Derivative Suppose that a curve is the graph of a function f (x). It is usually possible to obtain a formula that gives the slope of the curve y = f(x) at any point. This slope formula is called the derivative of f(x) and is written f (x). For each value of x, f (x) gives the slope of the curve y = f(x) at the point with first coordinate x. y y = f(x) Slope is f (x)
x x

Fig.1 Definition of f (x) The process of computing f (x) for a given function f (x) is called differentiation. The case of linear function f(x) = mx + b is particularly simple. The graph of y = mx + b is a straight line L of slope m. The tangent line to L(at any point) is just L itself, and so the slope of the graph is m at every point. In other words, the value of the derivative f (x) is always equal to m. If f(x) = mx + b, then we have f (x) = m (1)

BACS 1263 Mathematics for Computer Science II Faculty of Information and Communications & Technology

y y = mx + b Slope is m

y Slope is 0 y=b x x

L Figure 2. Derivative of a linear function

Figure 3. Derivative of a constant function

Set m = 0 in equation (1). Then the function becomes f(x) = b, which has the value b for each value of x. The graph is a horizontal line of slope 0, so f (x ) = 0 for all x. Thus we have
The derivative of a constant function f(x) = b is zero; that is, f (x) = 0 (2)

If f(x) = x2, then its derivative is the function 2x, That is, f (x) = 2x

(3)

If f(x) = x3, then the derivative is 3x2. That is, f (x) = 3x2

(4)

Figure 4 shows the graphs of x2 and x3 together with the interpretations of formulas (3) and (4) in terms of slope.
y y y = x2 Slope is 2x x x (a) x x y = x3

Slope in 3x2

Figure 4. Derivative s of x2 and x3

(b)

BACS 1263 Mathematics for Computer Science II Faculty of Information and Communications & Technology

Power Rule Let r be any number and let f(x) = x r. Then f (x) = rxr - 1

If f(x) = 1 , then f (x) =


x

1
x
2

(x 0)

(5)

Notation The operation of forming a derivative f (x) from a function f(x) is also indicated by the symbol d (read the
dx

derivative with respect to x). Thus


d f ( x) = f ' ( x) dx

The Secant Line Calculation of the Derivative

The fundamental idea for calculating the slope of the tangent line at a point P is to approximate the tangent line very closely by secant lines. A secant line at P is a straight line passing through P and a nearby point Q on the curve. By taking Q very close to P, we can make the slope of the secant line approximate the slope of the tangent line to any desired degree of accuracy. Suppose that the point P is (x, f(x)). Suppose also that Q is h horizontal units away from P. Then Q has x-coordinate x + h and y-coordinate f(x + h). The slope of the secant line through the points P = (x, f(x)) and Q =(x + h, f(x + h)) is simply

BACS 1263 Mathematics for Computer Science II Faculty of Information and Communications & Technology

[slope of secant line] =

f ( x + h) f ( x ) f ( x + h) f ( x ) = ( x + h) x h

In order to move Q close to P along the curve, we let h approach zero. Then the secant line approaches the tangent line, and so [slope of secant line] approaches[slope of tangent line]; that is, f ( x + h) f ( x ) approaches f (x). Thus we arrive at
h

the following method to compute the derivative f (x). To calculate f (x): 1. First calculate the quotient 2. 3.
f ( x + h) f ( x ) h

for h 0

Then let h approach zero The quantity f ( x + h) f ( x) will approach f (x).


h

Derivative Calculation in Delta Notation As x changes from x = a to x = a + h, then the change in x is given by x = (a + h) a = h and the change in y by y = f(a + h) f(a) Comparing the last two equations with out procedure for computing the derivative, we can reformulate that procedure using delta notation:
f (a) is obtained by computing
y and allowing x to approach 0 x

The quotient y gives the rate of change of f(x) over the interval from x = a to x = a + h = a + x. As x approaches 0, the quotient gives the rate of change over successively narrower intervals and eventually gives the rate of change of f(x) at the point x = a itself. That is, we have

BACS 1263 Mathematics for Computer Science II Faculty of Information and Communications & Technology

f (a) measures the instantaneous rate of change of f(x) when x = a

(6)

1.4 Limits and the Derivative The notion of a limit is one of the fundamental ideas of calculus. Using the geometric reasoning of he previous section, we have the following procedure for calculating the derivative of a function f(x) at x = a. First calculate the difference quotient f ( a + h) f ( a ) ,
h

where h is a nonzero number. Next, allow h to approach zero by allowing it to assume both positive and negative numbers arbitrary close to zero but different from zero. In symbols, we write h 0. The values of the difference quotient then approach the value of the derivative f (a). We say that the number f (a) is the limit of the difference quotient as h approaches zero, and in symbols we write
f ' (a ) = lim
h 0

f ( a + h) f ( a ) h

(1)

Out discussion of the derivative has been based on an intuitive geometric concept of the tangent line. However, the limit on the right in (1) may be considered independently of its geometric interpretation. In fact, we may use (1) to define f (a). We say that f is differentiable at x = a if
f ( a + h) f ( a ) h

approaches some number as h 0, and we denote this limiting number by f (a). If the difference quotient
f ( a + h) f ( a ) h

does not approach any specific number as h 0,we say that f is nondifferentiable at x = a.
8

BACS 1263 Mathematics for Computer Science II Faculty of Information and Communications & Technology

The preceding discussion suggests the following definition: Let g(x) be a function, a a number. We say that the number L is the limit of g(x) as x approaches a provided that g(x) can be made arbitrary close to L by taking x sufficiently close (but not equal)to a. In this case we write
lim g ( x) = L
x a

If, as x approaches a, the values g(x) do not approach a specific number, then we say that the limit of g(x) as x approaches a does not exist. Limit Theorem - Suppose that
lim f ( x)
x a

and
x a

lim g ( x)
x a

both exist. Then


xa

we have the following result (i) If k is a constant, then (ii) (iii) (iv) (v)

lim k . f ( x) = k .lim f ( x)
r lim [ f ( x) ] = lim f ( x) xa xa r

If r is a positive constant, then


lim [ f ( x) + g ( x) ] = lim f ( x) + lim g ( x)
x a x a x a xa xa

lim [ f ( x) g ( x) ] = lim f ( x) lim g ( x)


xa xa

lim [ f ( x).g ( x) ] = lim f ( x).lim g ( x)


xa xa

(vi) If

lim g ( x) 0 ,
x a

then

lim
x a

f ( x) lim f ( x) = xa g ( x) lim g ( x)
x a

Limit of a Polynomial Function - Let p(x) be a polynomial function, a any number. Then
lim p( x) = p(a)
x a

Limit of a Rational Function Let r(x) = p(x)/q(x)be a rational function, where p(x) and q(x) are polynomials. Let a be a number such that q(a) 0, then
lim r ( x) = r (a)
x a

In other words, to determine a limit of a polynomial or a rational function, simply evaluate the function at x = a, provided, of course, that the function is defined at x = a.
9

BACS 1263 Mathematics for Computer Science II Faculty of Information and Communications & Technology

Using Limits to Calculate Derivative 1. Write the difference quotient f (a + h) f (a)


h

2. Simplify the difference quotient 3. Find the limit as h 0 Infinity and Limits Consider the function f (x) whose graph is sketched in Fig.2. As x grows large the value of f(x) approaches 2. In this circumstance, we say that 2 is the limit of f(x) as x approaches infinity. Infinity is denoted by the symbol . The preceding limit statement is expressed in the following notation:
lim f ( x) = 2
x

In a similar vein, consider the function whose graph is sketched in Fig.3. As x grows large in the negative direction, the value of f(x) approaches 0. In this circumstance, we say that 0 is the limit of f(x) as x approaches minus infinity. In symbols,
x

lim f ( x) = 0

y y y = f(x) y = f(x) 2 x
Fig.2 Function with a limit as x approaches infinity Fig.3 Functions with a limit as approaches minus

10

BACS 1263 Mathematics for Computer Science II Faculty of Information and Communications & Technology

1.5 Differentiability and Continuity Geometrically, the nondifferentiability of f(x) at x = a can manifest itself in several different ways. First of all, the graph of f(x) could have no tangent line at x = a. Second, the graph of f(x) could have a vertical tangent line at x = a. See Fig.1 y Graph of y =f(x) has no tangent line here y
Graph of y = f(x) has no tangent line here

x a y x y a x a x a
Graph of y = f(x) has a vertical tangent here

Graph of y = f(x) has no tangent line here

Fig.1 Functions that are nondifferentiable at x = a


Theorem 1 If F(x) = 0 for all x, then F(x) = C for some constant C

Limit Definition of Continuity A function f(x) is continuous at x = a provided the following limit relation holds: lim f ( x) = f (a) (1) x

11

BACS 1263 Mathematics for Computer Science II Faculty of Information and Communications & Technology

In order for (1) to hold, three conditions must be fulfilled. 1. f(x) must be defined at x = a 2. lim f ( x) must exist x a 3. The limit
lim f ( x) must
x a

have the value of a.

A function will fail to be continuous at x = a when any one of these conditions fails to hold. 1.6 Some Rules for Differentiation Three additional rules of differentiation greatly extend the number of functions that we can differentiate. 1. Constant Multiple Rule d d [k . f ( x)] = k . [ f ( x)] , k a constant
dx dx

2. 3.

Sum Rule
d d d [ f ( x) + g ( x)] = [ f ( x)] + [ g ( x)] dx dx dx

General Power Rule


d d ([ g ( x)]r ) = r.[ g ( x)]r 1. [ g ( x)] dx dx

1.7 More About Derivatives In many applications it is convenient to use variables other than x and y. When the independent variable is t instead of x, we write d in place of
d . dx

dt

The Second Derivative - If we differentiate the function of f (x), we obtain what is called the second derivative of f(x), denoted by f '' ( x) . That is,
d ' f ( x) = f '' ( x) dx

12

BACS 1263 Mathematics for Computer Science II Faculty of Information and Communications & Technology

Other Notation for Derivatives Prime Notation f (x) y


f '' ( x) y '' d dx

Notation
d f ( x) dx dy dx d2 f ( x) d 2x d2y dx 2 d2 dx 2

The notation

is purely symbolic. It reminds us that the second


d f ( x) ; dx

derivative is obtained by differentiating that is f (x) =


d f ( x) dx

f '' ( x) =

d d dx f ( x) dx

If we evaluate the derivative f (x) at a specific value of x, say x = a, we get a number f (a) that gives the slope of the curve y = f(x) at the point (a, f(a)). Another way of writing f (a) is dy |x = a
dx

If we have a second derivative written


f ( x)
''

f '' ( x) ,

then its value when x = a is

or

d2y dx 2

|x = a

13

BACS 1263 Mathematics for Computer Science II Faculty of Information and Communications & Technology

1.8 The Derivative as a Rate of Change An important interpretation of the slope of a function at a point is as a rate of change. The first step is to understand what is meant by average rate of change of a function f(x). Consider a function y = f(x) defined on the interval a x b. That is, average rate of change of f(x) over the interval a x b =
y f (b) f (a) = x ba

The derivative f (a) measures the rate of change of f (x) at x = a.

Velocity and Acceleration


If s(t) denotes the position function of an object moving in a straight line, then the velocity v(t) of the object at time t is given by: v(t) = s(t)

The derivative of the velocity function v(t) is called the acceleration function and is often written as a(t): a(t) = v(t)

Because v(t) measures the rate of change of the velocity v(t), this is use of the word acceleration agrees with our common usage in connection with automobiles. Note that since v(t) = s(t), the acceleration is actually the second derivative of the position a(t ) = s '' (t ) function s(t),

14

BACS 1263 Mathematics for Computer Science II Faculty of Information and Communications & Technology

Approximating the Change in a Function - Consider the function f(x) near x = a. For small value of h, f (a + h) f (a) f (a)
h

That is, for small value of h, the average rate of change over a small interval is approximately equal to the instantaneous change at endpoint of the interval. Multiplying both sides of this approximately by h, we have, (2) f(a + h) f(a) f (a).h If x changes from a to a + h, then the change is the value of the function f(x) is approximately f (a) times the change h in the value of x. This result holds for both positive and negative values of h. In applications, the right side of (2) is calculated and used to estimate the left side. Units for Rate of Change In general, [unit of measure for f (x)] =[unit of measure for f(x)] per [unit of measure for x]

15

You might also like