Content of PetroWiki is intended for personal use only and to supplement, not replace, engineering judgment. SPE disclaims any and all liability for your use of such content. More information

Differential calculus refresher

One of the first mathematical tools a neophyte engineer learns is calculus. The basics of limits, differentiation, and integration permeate all of engineering mathematics.

Many of the mathematical tools engineers use to evaluate and predict behavior, such as vibrations, require equations that have continuously varying terms. Often, there are many terms regarding the rate of change, or the rate of change of the rate of change, and so forth, with respect to some basis. For example, a velocity is the rate of change of distance with respect to time. Acceleration is the rate of change of the velocity, which makes it the rate of change of the rate of change of distance with respect to time. Determining the solutions to these types of equations is the basis of differential calculus.

An equation with continuously varying terms is a differential equation. If only one basis is changing, then it is an ordinary differential equation (ODE); however, if two or more bases are changing, then it is a partial differential equation (PDE). An ODE uses the notation "d" and a PDE uses ∂ to refer to change.

Understanding differentiation starts with an understanding of limits.

Limits

A graph is a useful method for determining how an equation behaves. The independent variable t in Eq. 1 determines how the dependent variable y behaves. The operators and constants in an equation specify this behavior. Fig. 1 shows the graph of Eq. 1, the distance of freefall over time with an initial velocity of zero. Down is considered negative in this equation: ....................(1)

The x-axis (abscissa) usually is the independent variable, and the y-axis (ordinate) usually is the dependent variable; however, many drilling charts hold an exception to this generality, in that their ordinate often is the independent variable, and their abscissa is the dependent one. An example of such a drilling chart is the depth vs. time graph.

In Fig. 1, at the time of 3 seconds, the distance is –96.522 ft. A tangent line to the graph at 3 seconds is known as the slope (A) of the graph at that point. To quickly estimate the slope of the tangent, divide the rise (Δy) by the run (Δt), as shown in Eq. 2: ....................(2)

In this case, the tangent y value at 2 seconds is –48.261 ft and at 4 seconds is –241.305 ft. The slope then is: ....................(3)

Because the units in this case are ft/sec, this slope gives the velocity at that point. It is the rate of change of the distance with respect to time.

A limit is defined as the value of a function at a given point as that point is approached from either higher or lower values (often referred to as approaching from the left or right, respectively). The limit (Y) of Eq. 1 at 3 seconds is: ....................(4)

Y is known as the limit of the function. In this simple case, Y is the same regardless of whether t approaches 3 from the left or the right. This is not true in all cases, however (e.g., with a discontinuous function). In these cases, the limit can be determined analytically. One can also determine the limit using a graph such as in Fig. 1.

Limits have the following properties: ....................(5) ....................(6) ....................(7)

and ....................(8)

Derivatives

As noted earlier, the slope of graph of Eq. 1 at 3 seconds = –96.522 ft/sec and is the velocity (v) of free-fall at 3 seconds from release. This value is known as the first derivative of Eq. 1 at the value of 3. It is written as: ....................(9)

and is defined as: ....................(10)

As the limit of the value of Δt approaches zero, the solution converges to the first derivative.

Derivatives have the following properties (r = constant). ....................(11) ....................(12) ....................(13) ....................(14) ....................(15) ....................(16)

In the case of Eq. 7, where Q = 0, L’Hopital’s rule can help find the limit. This is shown in Eq. 17: ....................(17)

Other rules regarding differentials are the following.

The linear superposition rule: ....................(18)

The product rule: ....................(19)

The quotient rule: ....................(20)

The chain rule (or function of a function): ....................(21)

Multiple differentiations can be shown by ....................(22)

and continued differentiations can be shown by ....................(23)

A useful point to recognize is where a slope equals zero, which can correspond to a maximum, a minimum, or an inflection. To determine these points, determine a first derivative of an equation. Then, set this first-derivative equation to equal zero and solve for the basis (the unknown). To determine whether this point is a maximum, a minimum, or an inflection, determine the second derivative of that equation. If that value is negative, the point is a maximum; if it is positive, the point is a minimum; and if it is zero, the point is an inflection.

The graph of Eq. 24 ( Fig. 2 ) is an example of this process: ....................(24)

The first derivative of Eq. 24 is: ....................(25)

which, when set equal to zero, is a quadratic equation with two roots, t = 3 and 1/3 . These two points correspond to the maximum and minimum points on the graph. To prove which is which, a second derivative is taken: ....................(26)

which at t = 3 and 1/3 is equal to 8 and –8, respectively. This means that at t = 3, the function is at a minimum and at t = 1/3, the function is at a maximum.

The first differentiation of the equation of the position of a free-falling object starting at rest (Eq. 1) gives the slope of the graph, which, as noted, is the velocity: ....................(27)

A second differentiation gives the change of the slope with respect to time (acceleration), and is: ....................(28)

which is the acceleration caused by Earth’s gravity.

Differential-equation solutions

Solutions to differential equations solved in closed form can range from trivial to impossible. Numerical methods often are required. Nevertheless, some general strategies have been developed to solve differential equations.

An ODE with only first derivatives is known as a first-order ODE. A second-order ODE has second and possibly first derivatives. The same reasoning applies to third order and beyond. Likewise, when a PDE has only first derivatives, it is a first-order PDE. The second and third orders and beyond are defined on the basis of their highest-order derivative.

This section has covered some of the basics of ODE and PDE mathematics. The reader is urged to review mathematical texts and handbooks for more details on this subject.

Nomenclature

 A = slope, dimensionless gc = gravitational constant, L/t2, 32.174 ft/sec2 P = generic value Q = generic value r = generic constant t = time, seconds y = dependent variable, various Δt = change in time, t, seconds v = velocity, L/t, ft/sec Δy = change in dependent variable, various