Technology & Engineering

Numerical Differentiation

Numerical differentiation is a method of approximating the derivative of a function using numerical techniques. It involves computing the slope of a tangent line to the function at a given point using finite differences. This technique is commonly used in engineering and scientific applications where analytical solutions are not feasible.

Written by Perlego with AI-assistance

3 Key excerpts on "Numerical Differentiation"

  • Book cover image for: Numerical Methods for Engineers and Scientists
    eBook - PDF

    Numerical Methods for Engineers and Scientists

    An Introduction with Applications Using MATLAB

    • Amos Gilat, Vish Subramaniam(Authors)
    • 2013(Publication Date)
    • Wiley
      (Publisher)
    303 Chapter 8 Numerical Differentiation 8.1 BACKGROUND Differentiation gives a measure of the rate at which a quantity changes. Rates of change of quantities appear in many disciplines, especially sci- ence and engineering. One of the more fundamental of these rates is the relationship between position, velocity, and acceleration. If the position, x of an object that is moving along a straight line is known as a function of time, t, (the top curve in Fig. 8-1): (8.1) the object’s velocity, , is the derivative of the position with respect to time (the middle curve in Fig. 8-1): (8.2) The velocity v is the slope of the position–time curve. Similarly, the object’s acceleration, , is the derivative of the velocity with respect to time (the bottom curve in Fig. 8-1): (8.3) The acceleration a is the slope of the velocity–time curve. Many models in physics and engineering are expressed in terms of rates. In an electrical circuit, the current in a capacitor is related to the time derivative of the voltage. In analyzing conduction of heat, the amount of heat flow is determined from the derivative of the tempera- x f t   = v t   v df t   dt ----------- = Figure 8-1: Position, velocity, and acceleration as a function of time. a t   a dv t   dt ----------- = Core T opics Finite difference approximation of the derivative (8.2). Finite difference formulas using Taylor series expansion (8.3). Summary of finite difference formulas for Numerical Differentiation (8.4). Differentiation formulas using Lagrange polynomi- als (8.5). Differentiation using curve fitting (8.6). Use of MATLAB built-in functions for numerical dif- ferentiation (8.7). Complementary T opics Richardson’s extrapolation (8.8). Error in Numerical Differentiation (8.9). Numerical partial differentiation (8.10). 304 Chapter 8 Numerical Differentiation ture. Differentiation is also used for finding the maximum and mini- mum values of functions.
  • Book cover image for: An Introduction to Computational Physics
    Chapter 3 Numerical calculus Calculus is at the heart of describing physical phenomena. As soon as we talk about motion, we must invoke differentiation and integration. For example, the velocity and the acceleration of a particle are the first-order and second-order time derivatives of the corresponding position vector, and the distance traveled by a particle is the integral of the corresponding speed over the elapsed time. In this chapter, we introduce some basic computational methods for dealing with Numerical Differentiation and integration, and numerical schemes for search-ing for the roots of an equation and the extremes of a function. We stay at a basic level, using the simple but practical schemes frequently employed in computa-tional physics and scientific computing. Some of the subjects will be reexamined later in other chapters to a greater depth. Some problems introduced here, such as searching for the global minimum or maximum of a multivariable function, are considered unsolved and are still under intensive research. Several interesting examples are given to illustrate how to apply these methods in studying important problems in physics and related fields. 3.1 Numerical Differentiation One basic tool that we will often use in this book is the Taylor expansion of a function f ( x ) around a point x 0 : f ( x ) = f ( x 0 ) + ( x − x 0 ) f ( x 0 ) + ( x − x 0 ) 2 2! f ( x 0 ) + · · · + ( x − x 0 ) n n ! f ( n ) ( x 0 ) + · · · . (3.1) The above expansion can be generalized to describe a multivariable function f ( x , y , . . . ) around the point ( x 0 , y 0 , . . . ): f ( x , y , . . . ) = f ( x 0 , y 0 , . . . ) + ( x − x 0 ) f x ( x 0 , y 0 , . . . ) + ( y − y 0 ) f y ( x 0 , y 0 , . . . ) + ( x − x 0 ) 2 2! f xx ( x 0 , y 0 , . . . ) + ( y − y 0 ) 2 2! f yy ( x 0 , y 0 , . . . ) + 2( x − x 0 )( y − y 0 ) 2! f xy ( x 0 , y 0 , . . . ) + · · · , (3.2) 49
  • Book cover image for: Fundamentals of Engineering Numerical Analysis
    2 Numerical Differentiation – Finite Differences In the next two chapters we develop a set of tools for discrete calculus. This chapter deals with the technique of finite differences for numerical differen-tiation of discrete data. We develop and discuss formulas for calculating the derivative of a smooth function, but only as defined on a discrete set of grid points x 0 , x 1 , . . . , x N . The data may already be tabulated or a table may have been generated from a complicated function or a process. We will focus on finite difference techniques for obtaining numerical values of the derivatives at the grid points. In Chapter 6 another more elaborate technique for Numerical Differentiation is introduced. Since we have learned from calculus how to differ-entiate any function, no matter how complicated, finite differences are seldom used for approximating the derivatives of explicit functions. This is in contrast to integration, where we frequently have to look up integrals in tables, and often solutions are not known. As will be seen in Chapters 4 and 5, the main appli-cation of finite differences is for obtaining numerical solution of differential equations. 2.1 Construction of Difference Formulas Using Taylor Series Finite difference formulas can be easily derived from Taylor series expansions. Let us begin with the simplest approximation for the derivative of f ( x ) at the point x j , we use the Taylor series: f ( x j + 1 ) = f ( x j ) + ( x j + 1 − x j ) f ( x j ) + ( x j + 1 − x j ) 2 2 f ( x j ) + ··· . (2.1) Rearrangement leads to f ( x j ) = f ( x j + 1 ) − f ( x j ) x j − x j 2 f ( x j ) + ··· (2.2) where x j = x j + 1 − x j is the mesh size. The first term on the right-hand side of (2.2) is a finite difference approximation to the derivative. The next term is 13 14 Numerical Differentiation – FINITE DIFFERENCES the leading error term. In this book, we also use h to indicate the mesh size.
Index pages curate the most relevant extracts from our library of academic textbooks. They’ve been created using an in-house natural language model (NLM), each adding context and meaning to key research topics.