Loading [MathJax]/jax/element/mml/optable/BasicLatin.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Mathematics LibreTexts

2.01: Prerequisites to Numerical Differentiation

( \newcommand{\kernel}{\mathrm{null}\,}\)

Lesson 1: Prerequisites to Numerical Differentiation

Learning Objectives

After successful completion of this lesson, you should be able to:

1) recall the exact definition of differentiation

2) derive exact derivatives of a few functions

Introduction

In this lesson, we will review the necessary concepts of differential calculus to learn numerical differentiation. These include the concepts of finding exact derivatives of functions.

The derivative of a function represents the rate of change of a variable with respect to another variable. For example, the velocity of a body is defined as the rate of change of the location of the body with respect to time. The location is the dependent variable, while time is the independent variable. Now, if we measure the rate of change of velocity with respect to time, we get the acceleration of the body. In this case, velocity is the dependent variable, while time is the independent variable.

Whenever differentiation is introduced to a student, the two concepts of the secant line and tangent line (Figure 2.1.1.1) are revisited.

Function curve with tangent and secant lines.
Figure 2.1.1.1. Function curve with tangent and secant lines.

Let P and Q be two points on the curve, as shown in Figure 1. The secant line is the straight line drawn through P and Q.

Curve of a function f(x) with secant line drawn through points P and Q on the curve, which are located at x-values of a and a+h respectively.
Figure 2.1.1.2. Calculation of the secant line.

The slope of the secant line (Figure 2.1.1.2) is then given as

mPQ,secant=f(a+h)f(a)(a+h)a=f(a+h)f(a)h(2.1.1.1)

As Q moves closer and closer to P, the limiting portion is called the tangent line. The slope of the tangent line mPQ,tangent then is the limiting value of mPQ,secant from Equation (2.1.1.1) as h0.

mPQ,tangent=lim

Example \PageIndex{1.1}

Find the slope of the secant line of the curve y = 4x^{2} between points (3,36) and (5,100).

Solution

The slope of the secant line between (3,36) and (5,100) from Equation (\PageIndex{1.1}) is

\begin{split} m &=\frac{f(5) - f(3)}{5 - 3}\\ &=\frac{100 - 36}{5 - 3}\\ &= 32\end{split} \nonumber

Example \PageIndex{1.2}

Find the slope of the tangent line of the curve y = 4x^{2} at point (3,36).

Solution

The slope of the tangent line at (3,36) from Equation (\PageIndex{1.2}) is \begin{split} m &= \lim_{h \rightarrow 0}\frac{f(3 + h) - f(3)}{h}\\ &= \lim_{h \rightarrow 0}\frac{4(3 + h)^{2} - 4(3)^{2}}{h}\\ &= \lim_{h \rightarrow 0}\frac{4(9 + h^{2} + 6h) - 36}{h}\\ &= \lim_{h \rightarrow 0}\frac{36 + 4h^{2} + 24h - 36}{h}\\ &= \lim_{h \rightarrow 0}\frac{h(4h + 24)}{h}\\ &= \lim_{h \rightarrow 0}(4h + 24)\\ &= 24\end{split} \nonumber

Secant line for the function y=4x^2, drawn through the points (3, 36) and (5, 100).
Figure \PageIndex{1.3}. Calculation of the secant line for the function {y} = {4}{x}^{2}.

Derivative of a Function

Recall from calculus, the derivative of a function f(x) at x = a is defined as the slope of the tangent line at x = a

f^{\prime}(a) = \lim_{h \rightarrow 0}\frac{f(a + h) - f(a)}{h} \;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{1.3}) \nonumber

Example \PageIndex{1.3}

Find f^{\prime}(3) if f(x) = 4x^{2}.

Solution

\begin{split} f^{\prime}(x) &= 4(2x)\\ &= 8x\\ &=24 \end{split} \nonumber

Graph of the function y = 4x^2 and the tangent line to the function at x=3.
Figure \PageIndex{1.4}. Calculation of the tangent line in the function {y} = 4x^{2}.

Second Definition of Derivatives

There is another form of the definition of the derivative of a function. The derivative of the function f(x) at x = a is defined as

f^{\prime}(a) = \lim_{x \rightarrow a}\frac{f(x) - f(a)}{x - a} \;\;\;\;\;\;\;\;\;\;\;\; (\PageIndex{1.4}) \nonumber

As x \rightarrow a, the definition is nothing but the slope of the tangent line at P.

Graph showing the second definition of the derivative.
Figure \PageIndex{1.5}. Graph showing the second definition of the derivative
Example \PageIndex{1.4}

Find f^{\prime}(3) if f(x) = 4x^{2} by using the form

f^{\prime}(a) = \lim_{x \rightarrow a}\frac{f(x) - f(a)}{x - a} \nonumber

of the definition of a derivative.

Solution

\begin{split} f^{\prime}(3) &= \lim_{x \rightarrow 3}\frac{f(x) - f(3)}{x - 3}\\ &= \lim_{x \rightarrow 3}\frac{4x^{2} - 4(3)^{2}}{x - 3}\\ &= \lim_{x \rightarrow 3}\frac{4x^{2} - 36}{x - 3}\\ &= \lim_{x \rightarrow 3}\frac{4(x^{2} - 9)}{x - 3}\\ &= \lim_{x \rightarrow 3}\frac{4(x - 3)(x + 3)}{x - 3}\\ &= \lim_{x \rightarrow 3}4(x + 3)\\ &= 4(3 + 3) \\ &= 24 \end{split} \nonumber

Higher-Order Derivatives

So far, we have limited our discussion to calculating the first derivative, f^{\prime}(x) of a function f(x). What if we are asked to calculate higher-order derivatives of f(x). A simple example of this is finding the acceleration of a body from a function that gives the location of the body as a function of time. The derivative of the location with respect to time is the velocity of the body, followed by the derivative of velocity with respect to time being the acceleration. Hence, the second derivative of the location function gives the acceleration function of the body.

Example \PageIndex{1.5}

Given f(x) = 3x^{3} - 2x - 7, find the second derivative, f^{\prime\prime}(x), and the third derivative, f^{\prime\prime\prime}(x). Also, find the value of f^{\prime\prime}(2) and f^{\prime\prime\prime}(2).

Solution

Given

f(x) = 3x^{3} - 2x - 7 \nonumber

we have

\begin{split} f^{\prime}(x) &= 3(3x^{2}) - 2\\ &= 9x^{2} - 2\end{split} \nonumber

\begin{split} f^{\prime\prime}(x) &= \frac{d}{dx}(f^{\prime}(x))\\ &= \frac{d}{dx}\left( 9x^{2} - 2 \right)\\ &= 9\left( 2x \right)\\ &= 18x\end{split}\nonumber

\begin{split} f\left( 2 \right) &= 18 \times 2\\ &= 36 \end{split} \nonumber

\begin{split} f^{\prime\prime\prime}(x) &= \frac{d}{dx}(f^{\prime\prime}(x))\\ &= \frac{d}{dx}(18x)\\ &= 18\end{split} \nonumber

f^{\prime\prime\prime}(2) = 18 \nonumber

Other Notations of Derivatives

Derivatives can be denoted in several ways. For the first derivative, the notations include

f^{\prime}(x),\ \frac{d}{dx}f(x),\ y^{\prime}, \dot{y},\ \text{and}\ \frac{dy}{dx} \nonumber

For the second derivative, the notations include

f^{\prime\prime}(x),\ \frac{d^{2}}{dx^{2}}f(x),\ y^{\prime\prime},\ \ddot{y},\ \text{and}\ \frac{d^{2}y}{dx^{2}} \nonumber

For the n^{th} derivative, the notations include

f^{(n)}(x),\ \frac{d^{n}}{dx^{n}}f(x),\ y^{(n)},\ \text{and}\ \frac{d^{n}y}{dx^{n}} \nonumber

Lesson 2: Equation of a Tangent Line

Learning Objectives

After successful completion of this lesson, you should be able to:

1) find the equation of the tangent line to a function.

Finding equations of a tangent line

One of the numerical methods used to solve a nonlinear equation is called the Newton-Raphson method. This method is based on the prerequisite knowledge of finding the tangent line to a curve at a point. Let us look at an example to illustrate finding the equation of the tangent line to a curve.

Example \PageIndex{2.1}

Find the equation of the line tangent to the function

f(x) = x^{3} - 0.165x + 3.993 \times 10^{- 4} \nonumber

at x = 0.05.

Solution

The line tangent is a straight line of the form

y = mx + c \nonumber

To find the equation of the tangent line, let us first find the slope m of the straight line.

f^{\prime}(x) = 3x^{2} - 0.165 \nonumber

At x=0.05\begin{split} f^{\prime}(0.05) &= 3(0.05)^{2} - 0.165\\ &= - 0.1575 \end{split} \nonumber

Hencem = - 0.1575 \nonumber

To find the value of the y-intercept c of the straight line, we first find the value of the function at x = 0.05.

\begin{split} f(0.05) &= (0.05)^{3} - 0.165(0.05) + 3.993 \times 10^{- 4}\\ &= - 0.0077257 \end{split} \nonumber

The tangent line passes through the point (0.05, - 0.0077257), so

- 0.0077257 = m(0.05) + c \nonumber

- 0.0077257 = - 0.1575(0.05) + c \nonumber

c = 0.0001493 \nonumber

Graph of function f (x) and the tangent line at x = 0.05.
Figure \PageIndex{2.1}. Graph of function f(x) and the tangent line at x = 0.05.

Hence,

\begin{split} y &= mx + c\\ &= - 0.1575x + 0.0001493 \end{split} \nonumber

is the equation of the tangent line.

Multiple Choice Test

(1). The definition of the first derivative of a function f(x) is

(A) \displaystyle f^{\prime}(x) = \frac{f(x + \Delta x) + f(x)}{\Delta x}

(B) \displaystyle f^{\prime}(x) = \frac{f(x + \Delta x) - f(x)}{\Delta x}

(C) \displaystyle f^{\prime}(x) = \lim_{\Delta x \rightarrow 0} \frac{f(x + \Delta x) + f(x)}{\Delta x}

(D) \displaystyle f^{\prime}(x) = \lim_{\Delta x \rightarrow 0}\frac{f(x + \Delta x) - f(x)}{\Delta x}

(2). Given y = 5e^{3x} + \sin x, \displaystyle \frac{dy}{dx} is

(A) 5e^{3x} + \cos x

(B) 15e^{3x} + \cos x

(C) 15e^{3x} - \cos x

(D) 2.666e^{3x} - \cos x

(3). Given y = \sin 2x, \displaystyle \frac{dy}{dx} at x = 3 is most nearly

(A) 0.9600

(B) 0.9945

(C) 1.920

(D) 1.989

(4). Given y = x^{3}\ln x, \displaystyle \frac{dy}{dx} is

(A) 3x^{2}\ln x

(B) 3x^{2}\ln x + x^{2}

(C) x^{2}

(D) 3x

(5). The velocity of a body as a function of time is given as v\left( t \right) = 5e^{- 2t} + 4, where t is in seconds, and v is in m/s. The acceleration in \text{m} / \text{s}^{2} at t = 0.6 \ \text{s} is

(A) -3.012

(B) 5.506

(C) 4.147

(D) -10.00

(6). If x^{2} + 2xy = y^{2}, then \displaystyle \frac{dy}{dx} is

(A) \displaystyle \frac{x + y}{y - x}

(B) 2x + 2y

(C) \displaystyle \frac{x + 1}{y}

(D) - x

For complete solution, go to

http://nm.mathforcollege.com/mcquizzes/02dif/quiz_02dif_background_solution.pdf


This page titled 2.01: Prerequisites to Numerical Differentiation is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Autar Kaw via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?