Chapter 6


Knowledge of the calculus is often regarded as the dividing line between amateur and professional scientists. Calculus is regarded, in its own right, as one of the most beautiful creations of the human mind, comparable in its magnificence with the masterworks of Shakespeare, Mozart, Rembrandt, and Michelangelo. The invention of calculus is usually credited to Isaac Newton and Gottfried Wilhelm Leibniz in the 17th century. Some of the germinal ideas can, however, be traced back to Archimedes in the third century BC. Archimedes exploited the notion of adding up an infinite number of infinitesimal elements in order to determine areas and volumes of geometrical figures. We have already mentioned how he calculated the value of image by repeatedly doubling the number of sides of a polygon inscribed in a circle. The prototype problem in differential calculus is to determine the slope of a function image at each point x. As we have seen, this is easy for a straight line. The challenge comes when the function has a more complicated dependence on x. A further elaboration concerns the curvature of a function, describing how the slope changes with x. Newton’s motivation for inventing differential calculus was to formulate the laws of motion—to determine how the planets move under the gravitational attraction of the Sun, how the Moon moves around the Earth, and how fast an apple falls to the ground from a tree. Thus Newton was most directly concerned with how quantities change as functions of time, thereby involving quantities such as velocity and acceleration.

6.1 A Little Road Trip


What does it mean when the speedometer on your car reads 35 miles/hr at some particular instant? It doesn’t mean, you will readily agree, that you have come exactly 35 miles in the last hour or that you can expect to travel 35 miles in the next hour. You will almost certainly slow down and speed up during different parts of your trip and your speedometer will respond accordingly. You can certainly calculate your averagespeed for the entire journey by dividing the number of miles by the number of hours, but your speedometer readings will have been sometimes slower, sometimes faster, than this average value.

Let the variable r represent the distance you have traveled from your starting point, and let t represent the elapsed time. Figure 6.1 is a plot of your progress, distance traveled as a function of time, as represented by the function image. Your stops for red lights show up as horizontal segments, where t continues to increase but r stands still. Suppose, at the beginning of your trip, your watch reads image and your odometer reads image, while, at the end, your watch and odometer read image and image, respectively. Your average speed—we’ll call it image for velocity—for the whole trip is given by

image (6.1)

You might have noted that the later part of your trip, after odometer reading image at time image, was somewhat faster than the earlier part. You could thereby calculate your speeds for the separate legs of the trip

image (6.2)

You might continue dividing your trip into smaller and smaller increments, and calculate your average speed for each increment. Eventually, you should be able to match the actual readings on your speedometer!


Figure 6.1 Plot of road trip. Speedometer reading gives image.

To do this more systematically, let us calculate the average speed over a small time interval image around some time t, say between image and image. We wind up with the same result somewhat more neatly by considering the time interval between t and image. Let the corresponding odometer readings be designated image and image and their difference by image. The average speed in this interval is given by

image (6.3)

and is represented by the slope of the chord intersecting the curve at the two points image and image. As we make image and image smaller and smaller, the secant will approach the tangent to the curve at the point image. The slope of this tangent then represents the instantaneous speed—as shown by the speedometer reading—at time t. This can be expressed mathematically as

image (6.4)

In the notation of differential calculus, this limit is written

image (6.5)

verbalized as “the derivative of r with respect to t” or more briefly as “DRDT.” Alternative ways of writing the derivative are image, and image. For the special case when the independent variable is time, its derivative, the velocity, is written image. This was Newton’s original notation for the quantity he called a “fluxion.”

You’ve possibly heard about a hot new Porsche that can “accelerate from 0 to 60 mph in 3.8 seconds.” Just as velocity is the time derivative of distance, acceleration is the time derivative of velocity:

image (6.6)

It thus represents the second derivative of distance, written

image (6.7)

Alternative notations for image are image and image. Newton’s second law of motion states that the force F on a body of mass m causes an acceleration given by

image (6.8)

6.2 A Speedboat Ride

After your drive to your lakeside destination, you might want to take a spin in your new speedboat. Speedboats are likely to have speedometers but not odometers. Suppose, given your newfound appreciation of calculus, you would like to somehow apply calculus to your speedboat ride. It turns out that using data from your speedometer and wristwatch, you can determine the distance your boat has traveled. Dimensionally, distance = speed image time, or, expressed in the style of factor-label analysis,

image (6.9)

During a short interval of time image around a time image, your velocity might be practically constant, say, image mph. The distance you covered during this time would then be given by image. If you start at time image, the distance you cover by time image, namely image, can be approximated by the sum of n individual contributions:

image (6.10)

imageThis can be represented, as shown in Figure 6.2, as the sum of areas of a series of vertical strips of height image and width image. In concept, your computation of distance can be made exact by making the time intervals shorter and shorter (image for all i) and letting the number of intervals approach infinity image. Graphically, this is equivalent to finding the area under a smooth curve representing image between the times image and image. This defines the definite integral of the function image, written

image (6.11)


Figure 6.2 Plot of velocity vs. time. Distance traveled is approximated by summing over rectangular strips.

6.3 Differential and Integral Calculus

Let us reiterate the results of the last two sections using more standard notation. Expressed in the starkest terms, the two fundamental operations of calculus have the objective of either (i) determining the slope of a function at a given point or (ii) determining the area under a curve. The first is the subject of differential calculus, the second, of integral calculus.

Consider a function image, which is graphed in Figure 6.3. The slope of the function at the point x can be determined by a limiting process in which a small chord through the points image and image is made to approach the tangent at image. The slope of this tangent is understood to represent the slope of the function image at the point x. Its value is given by the derivative

image (6.12)

which can also be written image, or image. When image, a small increment of x, approaches zero, it is conventionally written dx, called the differential of x. Symbolically:

image (6.13)

Note that the limit in Eq. (6.12) involves the ratio of two quantities both of which approach zero. It is an article of faith to accept that their ratio can still approach a finite limit while both numerator and denominator vanish. In the words of Bishop Berkeley, a contemporary of Newton, “May we not call them ghosts of departed quantities?”


Figure 6.3 Graph of the function image. The ratio image approximates the slope at the point image.

The prototype problem in integral calculus is to determine the area under a curve representing a function image between the two values image and image, as shown in Figure 6.4. The strategy again is to approximate the area by an array of rectangular strips. It is most convenient to divide the range image into n strips of equal width image. We use the convention that the ith strip lies between the values labeled image and image. Consistent with this notation, image and image. Also note that image for all i. The area of the n strips adds up to

image (6.14)

In mathematical jargon, this is called a Riemann sum. As we divide the area into a greater and greater number of narrower strips, image and image. The limiting process defines the definite integral (also called a Riemann integral):

image (6.15)

Note that when the function image is negative, it subtracts from the sum (6.14). Thus the integral (6.15) represents the net area above the x-axis, with regions below the axis making negative contributions.


Figure 6.4 Evaluation of the definite integral image. The areas of the rectangles above the x-axis are added, those below the x-axis are subtracted. The integral equals the limit as image and image.

Suppose now that the function image has the property that image, where the function image is called the antiderivative of image. Accordingly, image in Eq. (6.14) can be approximated by

image (6.16)

Noting that image, Eq. (6.14) can be written

image (6.17)

Note that every intermediate value image is canceled out in successive terms.

In the limit as image and image, we arrive at the fundamental theorem of calculus:

image (6.18)

This connects differentiation with integration and shows them to be essentially inverse operations.

In our definitions of derivatives and integrals, we have been carefree in assuming that the functions image and image were appropriately well behaved. For functions which correspond to physical variables, this is almost always the case. But just to placate any horrified mathematicians who might be reading this, there are certain conditions which must be fulfilled for functions to be differentiable and/or integrable. A necessary condition for image to exist is that the function be continuous. Figure 6.5 shows an example of a function image with a discontinuity at image. The derivative cannot be defined at that point. (Actually, for a finite-jump discontinuity, mathematical physicists regard image as proportional to the deltafunction, image, which has the remarkable property of being infinite at the point image, but zero everywhere else.) Even a continuous function can be nondifferentiable, for example, the function image, which oscillates so rapidly as image that its derivative at image, is undefined. Such pathological behavior is, as we have noted, rare in physical applications. We might also have to contend with functions which are continuous but not smooth. In such cases, the derivative image at a point is discontinuous, depending on which direction it is evaluated. The prototype example is the absolute value function image. For image, while for image, thus the derivative is discontinuous at image.


Figure 6.5 Three functions with pathologies in their derivatives. Left: image is discontinuous at image. Center: image has discontinuous derivative at image. Right: image has undefined derivative as image.

Generally, the definite integral exists for functions that have at most a finite number of finite discontinuities—classified as piecewise continuous. Most often an integral “does not exist” if it blows up to an infinite value, for example, image. These are also known as improper integrals.

6.4 Basic Formulas of Differential Calculus

The terms “differentiating” and “finding the derivative” are synonymous. A few simple rules suffice to determine the derivatives of most functions you will encounter. These can usually be deduced from the definition of derivative in Eq. (6.12). Consider first the function image, where a is a constant. We will need

image (6.19)

from the binomial expansion (3.92). It follows then that

image (6.20)

Finally, taking the limit image, we find

image (6.21)

For the cases image:

image (6.22)

The first formula means that the derivative of a constant is zero. Equation (6.21) is also valid for fractional or negative values of n. Thus we find

image (6.23)

For the exponential function image, we find

image (6.24)

In the limit image, we find

image (6.25)

Thus the exponential function equals its own derivative! This result also follows from term-by-term differentiation of the series (3.104). The result (6.25) is easy generalized to give

image (6.26)

For the natural logarithm image, we find

image (6.27)

having used several properties of logarithms and the definition of the exponential function. Therefore

image (6.28)

For logarithm to the base b

image (6.29)

We can thus show

image (6.30)

Don’t confuse this with the result image.

Derivatives of the trigonometric functions can be readily found using Euler’s theorem (4.57):

image (6.31)


image (6.32)

and equating the separate real and imaginary parts, we find

image (6.33)

The other trigonometric derivatives can be found from these and we simply list the results:

image (6.34)

The derivatives of the hyperbolic functions are easily found from their exponential forms (4.66). These are analogous to the trigonometric results, except that there is no minus sign:

image (6.35)

6.5 More on Derivatives

Techniques which enable us to find derivatives of more complicated functions can be based on the chain rule. Suppose we are given what can be called a “function of a function of x,” say image. For example, the Gaussian function image represents an exponential of the square of x. The derivative of a composite function involves the limit of the quantity


The function image can be considered a variable itself, in the sense that image. We can therefore write

image (6.36)

For example,

image (6.37)

In effect, we have evaluated this derivative by a change of variables from x to image.

The derivatives of the inverse trigonometric functions, such as image, can be evaluated using the chain rule. If image, then image. Taking image of both sides in the last form, we find

image (6.38)


image (6.39)

so that

image (6.40)

We can show analogously that

image (6.41)


image (6.42)

Implicit differentiation is a method of finding image for a functional relation which cannot be easily solved for image. Suppose, for example, we have y and x related by image. This cannot be solved for y in closed form. However, taking image of both sides and solving for image, we obtain

image (6.43)

Implicit differentiation can be applied more generally to any functional relation of the form image.

We have already used the fact that the derivative of a sum or difference equals the sum or difference of the derivatives. More generally

image (6.44)

The derivative of a product of two functions is given by

image (6.45)

while for a quotient

image (6.46)

Problem 6.5.1

Hermite polynomials can be defined in terms of multiple derivatives as follows:


Calculate image for n = 0, 1, and 2 (image means no differentiation).

Problem 6.5.2

Analogously, Legendre polynomials can be defined by


Calculate image for n = 0, 1, and 2.

6.6 Indefinite Integrals

We had earlier introduced the antiderivativeimage of a function image, meaning that image. Since image gives image, the inverse would imply that image must be the derivative of image. More generally, we could say that the antiderivative of image equals image since the constant will disappear upon taking the derivative.

The fundamental theorem (6.18) can be rewritten with image replacing x as the integration variable and x replacing the limiting value b. This gives

image (6.47)

This will be expressed in the form

image (6.48)

The antiderivative of a function image will hereafter be called the indefinite integral and be designated image. Thus the result derived in the last paragraph can now be written

image (6.49)

All the derivatives we obtained in Sections 6.4 and 6.5 can now be “turned inside out” to give the following integral formulas; in all cases a constant is to be added to the right-hand side:

image (6.50)

image (6.51)

image (6.52)

image (6.53)

image (6.54)

image (6.55)

image (6.56)

For all the above integrals, the constant drops out if we put in limits of integration, for example

image (6.57)

You can find many Tables of Integrals which list hundreds of other functions. A very valuable resource is the Mathematica integration website: For example, you can easily find that

image (6.58)

You do have to use the Mathematica conventions for the integrand, in this case “x/Sqrt[aˆ2 - xˆ2].”

From a fundamental point of view, integration is less demanding than differentiation, as far as the conditions imposed on the class of functions. As a consequence, numerical integration is a lot easier to carry out than numerical differentiation. If we seek explicit functional forms (sometimes referred to closed forms) for the two operations of calculus, the situation is reversed. You can find a closed form for the derivative of almost any function. But, even some simple functional forms cannot be integrated explicitly, at least not in terms of elementary functions. For example, there are no simple formulas for the indefinite integrals image or image. These can, however, be used to definite new functions, namely, the error function and the exponential integral for the two examples just given.

6.7 Techniques of Integration

There are a number of standard procedures which can enable a large number of common integrals to be evaluated explicitly. The simplest strategy is integration by substitution, which means changing of the variable of integration. Consider, for example, the integral image. The integral can be evaluated in closed form even though image cannot. The trick is to define a new variable image, so that image. We have then that image. The integral becomes tractable in terms of y:

image (6.59)

The result can be checked by taking the derivative of image.

As a second example consider the integral (6.58) above, which we found using the Mathematica computer program. A first simplification would be to write image so that

image (6.60)

Next we note the tantalizing resemblance of image to image. This suggests a second variable transformation image, with image. The integral becomes

image (6.61)

in agreement with the result obtained earlier.

Trigonometric identities suggest that integrals containing the forms image can sometimes be evaluated using a substitution image or image. Likewise forms containing image suggest a possible transformation such as image or image. Forms containing image suggest possibilities such as image or image.

Integration by parts is another method suggested by the formula for the derivative of a product, Eq. (6.45). In differential form, this can be expressed

image (6.62)

where u and v are understood to be functions of x. Integrating (6.62). we obtain the well-known formula for integration by parts

image (6.63)

This is useful whenever image is easier to evaluate than image. As an example, consider image, another case of a very elementary function which doesn’t have an easy integral. But if we set image and image, then image and we find using (6.63) that

image (6.64)

An integral of the type


can often be evaluated by the method of partial fractions. We can always find constants A and B such that

image (6.65)

Therefore the integral can be reduced to

image (6.66)

which might be easier to solve. In the event that the denominator contains factors raised to powers, the procedure must be generalized. For example,

image (6.67)

and more generally,

image (6.68)

Problem 6.7.1

Evaluate the integral


Problem 6.7.2

Evaluate the integral image using integration by parts.

Problem 6.7.3

Evaluate the integral image. This will involve integration by parts twice.

Problem 6.7.4

Evaluate the integral


using the method of partial fractions.

6.8 Curvature, Maxima and Minima

The second derivative of a function image is the derivative of image, defined by

image (6.69)

Putting in the definition (6.12) of the first derivative, this can also be written

image (6.70)

This formula is convenient for numerical evaluation of second derivatives. For analytical purposes, we can simply apply all the derivative techniques of Sections 6.4 and 6.5 to the function image. Higher derivatives can be defined analogously

image (6.71)

These will be used in the following chapter to obtain power-series representations for functions.

Recall that the first derivative image is a measure of the instantaneous slope of the function image at x. When image, the function is increasing with x, that is, it slopes upward. Conversely, when image, the function decreases with x and slopes downward. At points x where image the function is instantaneously horizontal. This is called a stationary point and may represent a local maximum or minimum, depending on the sign of image at that point.

The second derivative image is analogously a measure of the increase or decrease in the slope image. When image, the slope is increasing with x and the function has an upward curvature. It is concave upward and would hold water if it were a cup. Conversely, when image, the function must have a downward curvature. It is concave downward and water would spill out. A point where image, where the curvature is zero, is known as an inflection point. Most often, for a continuous function, an inflection point represents a point of transition between positive and negative curvature.

Let us return to our consideration of stationary points, where image. If image, the curvature is downward and this must therefore represent a local maximum of the function image. The tangent at the maximum rests on top of the curve. We call this maximum “local” because there is no restriction on image having an even larger value somewhere else. The maximum possible value of a function in its entire domain is called its global maximum. Analogously, when image and image, we have a local minimum. In this case, the curve rests on its tangent. Three features described above are illustrated in Figure 6.6. A point where both image and image, assuming the function is not simply a constant, is known as a horizontal inflection point.


Figure 6.6 Maximum, minimum, and inflection points of function image.

6.9 The Gamma Function

The gamma function is one of a class of functions which is most conveniently defined by a definite integral. Consider first the following integral, which can be evaluated exactly:

image (6.72)

A very useful trick is to take the derivative of an integral with respect to one of its parameters (not the variable of integration). Suppose we know the definite integral

image (6.73)

where image is a parameter not involved in the integration. We can take image of both sides to give

image (6.74)

This operation is valid for all reasonably well-behaved functions. (For the derivative of a function of two variables with respect to one of these variables, we have written the partial derivativeimage in place of image. Partial derivatives will be dealt with more systematically in Chapter 10.) Applying this operation to the integral (6.72), we find

image (6.75)

We have therefore obtained a new definite integral:

image (6.76)

Taking image again we find

image (6.77)

Repeating the process n times

image (6.78)

Setting image, now that its job is done, we wind up a neat integral formula for image

image (6.79)

This is certainly not the most convenient way to evaluate image, but suppose we replace n by a nonintegerimage. In conventional notation, this defines the gamma function:

image (6.80)

When image is an integer, this reduces to the factorial by the relation

image (6.81)

Occasionally the notation image is used for image even for noninteger image.

For the case image

image (6.82)

The integral can be evaluated with a change of variables image giving

image (6.83)

where we have recalled Laplace’s famous result from Eq. (1.21)

image (6.84)


image (6.85)

the relation we had teased you with in Eq. (3.84).

Figure 6.7 shows a plot of the gamma function. For image, the function is a smooth interpolation between integer factorials. image becomes infinite for image


Figure 6.7 Plot of the gamma function.

6.10 Gaussian and Error Functions

An apocryphal story is told of a math major showing a psychology student the formula for the infamous Gaussian or bell-shaped curve, which purports to represent the distribution of human intelligence and such. The formula for a normalized Gaussian looks like this:

image (6.86)

and is graphed in Figure 6.8. The psychology student, unable to fathom the fact that this formula contained image, the ratio between the circumference and diameter of a circle, asked, “Whatever does image have to do with intelligence?” The math student is supposed to have replied, “If your IQ were high enough, you would understand!” The image comes, of course, from Laplace’s integral (1.21), slightly generalized to

image (6.87)

With the appropriate choice of variables, this gives the normalization condition for the Gaussian function

image (6.88)

The average value of the variable x is given by

image (6.89)

The standard deviation, image, commonly called “sigma,” parametrizes the half-width of the distribution. It is defined as the root mean square of the distribution. The mean square is given by

image (6.90)

To evaluate the integrals (6.89) and (6.90) for the Gaussian distribution, we need the additional integrals

image (6.91)

Since the integrand in the first integral is an odd function, contributions from image and image exactly cancel to give zero. The second integral can be found by taking image on both sides of (6.87), the same trick we used in Section 6.9. For the IQ distribution shown in Figure 6.8, the average IQ is 100 and sigma is approximately equal to 15 or 16 IQ points.


Figure 6.8 Normalized Gaussian applied to distribution of IQ’s.

A Gaussian distribution can also arise as a limiting case of a binomial distribution. A good illustration is the statistics of coin tossing. Suppose that the toss of a coin gives, with equal a priori probability, heads (H) or tails (T). A second toss will give four equally possible results: HH, HT, TH, and TT, with a 1 2 1 distribution for 0, 1, and 2 heads, respectively. Three tosses will give eight equal possibilities: HHH, HHT, HTH, THH, TTH, THT, HTT, and TTT, with a 1 3 3 1 distribution for 0, 1, 2, and 3 heads, respectively. Clearly we are generating a binomial distribution of the form (3.91):

image (6.92)

where r is the number of heads in n coin tosses. Figure 6.9 plots the binomial distribution for image. As image, the binomial distribution approaches a Gaussian (6.86), with image and image. Remarkably, sigma also increases with n but only as its square root. If we were to toss a coin one million times, the average number of heads would be 500,000 but the likely discrepancy would be around 500, one way or the other.


Figure 6.9 Binomial distribution for 10 coin tosses, shown as histogram. The distribution is well approximated by a Gaussian centered at image with image.

The percentage of a distribution between two finite values is obtained by integrating the Gaussian over this range:

image (6.93)

This cannot, in general, be expressed as a simple function. As in the case of the gamma function in the previous section, the error function can be defined by a definite integral

image (6.94)

The constant image is chosen so that image. Note also that image and that erf is an odd function. It is also useful to define the complementary error function

image (6.95)

These functions are graphed in Figure 6.10. The integral (6.93) reduces to

image (6.96)

In particular, the fraction of a Gaussian distribution beyond one standard deviation on either side is given by

image (6.97)

This means that about 68.3% of the probability lies between image.


Figure 6.10 Error function image and complementary error function image. The curve for image closely resembles image.

The average IQ of college graduates has been estimated to lie in the range 114–115, about one sigma above the average for the population as a whole. College professors allegedly have an average IQ around 132. Thus the chance is only about 15% that you are smarter than your Professor. But, although you can’t usually best him or her by raw brainpower, you can still do very well with “street smarts” which you are hopefully acquiring from this book.

Problem 6.10.1

Evaluate the definite integral image. You will need to look up or compute values of the error function.

6.11 Numerical Integration

It may be difficult or even impossible in some cases to express an indefinite integral image in analytic form. Or the function image might be in the form of numerical data with image. One can still find accurate numerical approximations for corresponding definite integrals image. The most elementary method is very nearly a restatement of the definition of a Riemann sum, Eq. 6.14, but uses a row of trapezoidal strips to approximate the integral, as shown in Figure 6.11According to the trapezoidal rule the integral is approximated by the sum of the areas of the pink trapezoids. Using the notation image, this can be written

image (6.98)

More generally, approximating the integral using n trapezoids,

image (6.99)

Clearly, the result will become more accurate as n is increased and image is decreased.


Figure 6.11 Trapezoidal rule for numerical integration.

A somewhat better numerical approximation can be obtained using Simpson’s rule. This requires an even value of n and can be expressed as a summation analogous to Eq. (6.99), but with modified values of the coefficients:

image (6.100)

Note that the first and last terms have coefficients 1, while the intermediate coefficients alternate between 4 and 2. The basis of Simpson’s rule is the replacement of the linear segments atop the trapezoidal strips by parabolic arcs over each pair of strips. The three y values associated with two adjacent strips can be fitted to a parabola image. Integration then gives

image (6.101)

and summation over image of such adjacent structures leads to Simpson’s rule.

There exist even more accurate formulas for numerical integration, but it is more convenient to turn the work over to a computer. In Mathematica, the command NIntegrate[f[x],{x,a,b}], with a specified function image and limits a and b, performs the integration using an appropriate algorithm, if necessary, with recursively varying subdivisions.

Problem 6.11.1

Evaluate the integral image using the trapezoidal rule and Simpson’s rule. Try subdivisions with image and image for each. Compare with the exact value calculated in Problem 6.10.1.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.