Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Derivative rules.docx
1. Derivative
Learning Objectives
A student will be able to:
● Use various techniques of differentiations to find the derivatives of various functions.
● Compute derivatives of higher orders.
Up to now, we have been calculating derivatives by using the definition. In this section, we will develop
formulas and theorems that will calculate derivatives in more efficient and quick ways. It is highly
recommended that you become very familiar with all of these techniques.
Definition: The derivative of a function f at a point a, denoted by f ′(a), is
provided that the limit exists.
If we denote y = f (x), then f ′(a) is called the derivative of f, with respect to (the independent variable)
x, at the point x = a.
Recall that the value of this limit is, if it exists, is the slope of the line tangent to the curve y = f (x) at the
point x = a. As well, it also represents the instantaneous rate of change, with respect to x, of the
function f at a. Therefore, a positive f ′(a) means that the function f is increasing at a, while a negative f
′(a) means that f is decreasing at a. If f ′(a) = 0, then f is neither increasing nor decreasing at a.
Finding Derivatives Using the Limit Definition
For the definition of the derivative, we will focus mainly on the second of these two expressions. Before
moving on to derivatives, let’s get some practice working with the difference quotient.
The main difficulty is evaluating the expression f (x + h), which seems to throw people off a bit.
Consider the function f (x ) = x 2
− 4x . Let’s evaluate this function at a few values.
f (2) = (2)2
− 4(2)
f (0) = (0)2
− 4(0)
f (−3) = (−3)2
− 4(−3)
f (a) = (a)2
− 4(a)
Note that we are just replacing the independent variable on each side of the equation with a particular
value. So we should be able to do the same thing for f (x + h): f (x + h) = (x + h)2
− 4(x + h)
Now let’s apply this to finding some difference quotients.
2. Example: Evaluate the difference quotient for the function f (x ) = x
2
− 4x .
𝑓(𝑥+ℎ)−𝑓(𝑥)
ℎ
Now =
𝑓(𝑥+ℎ)−𝑓(𝑥)
ℎ
[(𝑥 + ℎ) 2 − 4(𝑥 + ℎ)] −[𝑥
2
− 4𝑥 ]
ℎ
Simplifying, = 2x + h − 4 .
𝑥
2
+ 2𝑥ℎ + ℎ
2
− 4𝑥 − 4ℎ − 𝑥
2
+ 4𝑥
ℎ
=
2𝑥ℎ + ℎ
2
− 4ℎ
ℎ
=
ℎ(2𝑥ℎ + ℎ − 4)
ℎ
Example : Let f (t) = t5
+ 6t , find f ′(a).
Example : Let , find f ′(a). Write an equation of the line tangent to y = f (x)
when a = 1.
3. At a = 1, the point on the curve, (a, f (a)) is (1, 3), and the slope of the tangent line is .
The equation of the line is, in point-slope form, therefore
or, in slope-intercept form,
Example : Let , find f ′(a).
4.
5. The Derivative as a Function
The derivative of a function of x is another function of x.
In this point, derivatives of functions were calculated at some arbitrary, but fixed, point a. Notice from
the previous examples that the expressions obtained can be evaluated at different values of a. Indeed,
we can replace the number a in a derivative by the variable x in the expression, and represent the
derivative as a function of x.
Definition: The derivative of a function f is the function f ′, defined by
for all x for which this limit exists.
The domain of f ′ is the set of all values from the domain of f where the above limit exists. The
process of finding the derivative of f is called differentiation of f. Geometrically, the value of f ′(x)
represents the slope of the line tangent to the curve y = f (x) at the point (x, f (x)).
If a is a number in the domain of f where the derivative exists, then f is said to be differentiable at a.
A function is said to be differentiable on an open interval (a, b) if it is differentiable at every point in the
interval. For closed intervals, the limit definition of differentiability at an endpoint is replaced by the
appropriate one-sided limit.
Notations: Suppose y = f (x), then its derivative with respect to x, is commonly denoted by
f ′(x) = y′ = D f (x) = Dx f (x)
6. Basic Differentiation Rules
Before we start to study the rules of differentiation, we need to introduce alternate ways to represent the
derivative.
Table 5.1 Alternative Notations for the Derivative
For , all of the following may be used to represent the derivative:
The process of finding the derivative of a function is called differentiation. A function is differentiable
at x if its derivative exists at x. The following table lists the basic differentiation rules.
Table 1 Basic Differentiation Rules
Let C, a, and n be real numbers with . Let f(x) and g(x) be differentiable functions.
Rules Examples
1. Constant rule: If , then . If , then .
2. Power rule: If , then . If , then .
3. If , then . If , then .
4. Sum and Difference rule:
If , then
If , then .
5. If , then . If , then .
6. If , then . If , then
7. If , then . If , then .
8. If , then . If , then .
Example 1 Find the derivatives:
(a) (b)
7. (c)
Solutions (a)
(b) If a power function involves negative powers, we must rewrite the function in the form of . Then,
we apply the power rule. Recall that . Hence,
(c) If a power function involves radicals, we must rewrite each radical as a fractional power. Again, we
then apply the power rule. Recall that . Hence,
The Derivative of a Constant
If where is a constant, then .
In other words, the derivative or slope of any constant function is zero.
8. Proof:
Example 2:
If for all , then for all . We can also write .
Example 3:
If , then
and
The Power Rule and a Constant
If is a constant and is differentiable at all , then
In simpler notation,
In other words, the derivative of a constant times a function is equal to the constant times the derivative
of the function.
Example 4:
9. Example 5:
The Product Rule
If and are differentiable at , then
In a simpler notation,
The derivative of the product of two functions is equal to the first times the derivative of the second plus
the second times the derivative of the first.
Keep in mind that
Example 6:
Find for
Solution:
There are two methods to solve this problem. One is to multiply the product and then use the derivative
of the sum rule. The second is to directly use the product rule. Either rule will produce the same answer.
We begin with the sum rule.
Taking the derivative of the sum yields
Now we use the product rule,
10. which is the same answer.
The Quotient Rule
If and are differentiable functions at and , then
In simpler notation,
The derivative of a quotient of two functions is the bottom times the derivative of the top minus the top
times the derivative of the bottom all over the bottom squared.
Keep in mind that the order of operations is important (because of the minus sign in the numerator) and
Example 7 : Find for
Solution:
11. Example 8:
At which point(s) does the graph of have a horizontal tangent line?
Solution:
Since the slope of a horizontal line is zero, and since the derivative of a function signifies the slope of the
tangent line, then taking the derivative and equating it to zero will enable us to find the points at which
the slope of the tangent line equals to zero, i.e., the locations of the horizontal tangents.
Multiplying by the denominator and solving for ,
Therefore the tangent line is horizontal at
Example 9:
Show that satisfies the differential equation
Solution:
We need to obtain the first, second, and third derivatives and substitute them into the differential
equation.
Substituting,
which satisfies the equation.
12. Example 10 : Differentiate
This would be easier to do if we first rewrite s(t) in terms of powers of x.
, then
Example 11. Differentiate
Example 12. Differentiate
The easiest way to do this is to rewrite g(x) as
, then
Example 13. Differentiate
Simplify first: y = x5/2
− 5x3/2
+ 2x1/2
.
13. The longer way to do this is by using the product rule:
Applications
Since the slope of a line tangent to a curve is given by the derivative, differentiation rules can be used to
find the equation of the tangent line. The steps for deriving a tangent line from a function f(x) at x = a
are summarized in the following table.
Table 5.2 How to Find a Tangent Line
Assuming that f(x) is differentiable at x = a.
Step 1. Find the y coordinate of the point at x = a: (x and y are both given
sometimes.)
Step 2. Find the slope of the tangent line at x = a:
Step 3. Use the point-slope formula to find the equation of the tangent line:
Example Find the equation of the line tangent to the graph of at x = 1. Sketch
the graph of f(x) and the tangent line on the same axes.
Solutions When x = 1, we can get the y coordinate by finding f(1):
.
By taking the derivative, we can find a formula for the slope of a line tangent to any point of f :
14. In particular, the slope of the tangent line of f at x = 1 is
By using the point-slope formula of the line equation with slope 2 and the point (1, 1), we have
The graph of and the tangent line at x = 1 can be seen in Figure 5.1.
Figure 5.1 Graph of Example 5.2
The derivative of a function can also be interpreted as the instantaneous rate of change of f(x).
Hence, we can use the derivative to study rates of change.
Example 14. The population of a fire ant colony is growing according to the function
, where t is time measured in days. What is the rate of change of the population
with respect to time when t = 4? Give units and interpret the answer.
Solutions The rate of change of the population with respect to time is given by . Therefore,
15. When t = 4, the rate is
If , also can be written as in what is called Leibniz’s notation. Leibniz’s
notation is useful for determining the units of the derivative:
Since N is measured in number of the fire ants and t is measured in days, must be measured in
number of fire ants per day. The statement means that on the fourth day,
the colony is increasing in size at the rate of 200 fire ants per day. This is an instantaneous rate of
change, meaning that if the rate were remaining 200 fire ants increasing per day for a whole day on forth
day, there would be extra 200 fire ants on the fifth day.
Example 15. Suppose the curves y1 = x2
+ ax + b and y2 = cx − x2
have a common tangent line at
the point (1, 0). Find the constants a, b, and c.
Both curves have a common point at (1, 0). Therefore, when x = 1, both y-values are 0. Hence, 0 = 1
+ a + band 0 = c − 1. Hence c = 1 and a + b = −1.
Sharing a tangent line at (1, 0) means that both curves have the same instantaneous rate of change
when x = 1, i.e., y1′(1) = y2′(1).
y1′ = 2x + a → y1′(1) = a + 2
y2′ = c − 2x → y2′(1) = c − 2
Substitute in c = 1 and equate y1′(1) = y2′(1):
y1′(1) = a + 2 = y2′(1) = c − 2 = −1
Hence a = −3, and b = −1 − a = 2.
16. Higher-Order Derivatives
The derivative of a function f is also a function; hence, where it exists, we can also find the derivative
of . We call the first order derivative of f , and the derivative of , denoted as , as the
second order derivative of f. Continuing in this manner, we are led to consider the third, fourth, and
higher order derivatives of f whenever they exist. The following table represents the notations for the
higher order derivatives.
Table 5.7 Notations for the Higher-Order Derivatives
Name Notation
The First-Order Derivative
The Second-Order Derivative
The Third-Order Derivative
The -Order Derivative ( )
Assume and exist.
Example 16. Find all derivatives of all orders of the function .
Solution We have
In fact , for all .
Example 17. Find the fourth derivative of the function .
Solution We have
17. Application
What exactly does the second derivative tell us? Just as the first derivative measures the
instantaneous rate of change of the function f , the second derivative of f measures the rate of change of
the first derivative of the function f; in other words, the rate of change of the rate of change of f.
Acceleration
In physics, the second derivative can be interpreted as acceleration. Recall that if is the
position function of an object that moves in a straight line, then the instantaneous rate of change of the
position of the object is called the velocity of the object at time t:
The instantaneous rate of change of velocity with respect to time is called the acceleration a(t) of the
object. Thus, the acceleration function is the derivative of the velocity function, and hence, is the second
derivative of the position function:
Example 18 The vertical position of a ball thrown from the top of a lighthouse is given by
where s is measured in feet and t is measured in seconds. Find the velocity and acceleration of the ball 5
seconds after it is thrown.
18. Solution The velocity v and acceleration a of the ball at any time t are given by
and
Therefore, the velocity and the acceleration of the ball 5 seconds after it is thrown is
This means that after 5 seconds the ball is falling at a speed of 64 ft/sec and the acceleration of the ball
is a constant . The negative sign indicates that the acceleration is also directed downward.
We should not be surprised by the constant acceleration since we know there is only one force acting on
such a following object, gravity, which is constant.
Concavity
The second derivative can be used to study the shape of the graph of a function. For example both
and are increasing in the interval (0, ∞), but there is a fundamental difference in the
way they are increasing. The slopes of the lines tangent to the graph of are increasing as we move
from left to right. Meanwhile, the slopes of lines tangent to the graph are decreasing as we move
from left to right. See the following graphs.
Figure 5.2 Graphs of and
The word concavity is used to describe the shape of a function. From the above graphs, we have the
following definition of concavity.
19. Table 5.8 Definition of Concavity
We say that the graph of f is concave up on the interval (a, b), if is increasing on (a, b).
We say that the graph of f is concave down on the interval (a, b), if is decreasing on (a,
b).
A point where the graph of f changes concavity is called a point of inflection.
Recall that tells us where f is increasing and where it is decreasing. The derivative of , which is
, tells us where is increasing and where it is decreasing. We can use the following second
derivative test for concavity.
Table 5.9 Test for Concavity
If on the interval (a, b) ( is increasing) , then f is concave up on (a, b).
If on the interval (a, b) ( is decreasing) , then f is concave down on (a,
b).
Concavity is very important for sketching the graph of a function, which we discussed it in Chapter 6.
Here we will concentrate on its application to economics problems.
Example 19. The total sales (in thousands) of a new video game is given by
where t is the time in months. Where is the graph of concave up and where is it concave down?
Are there any inflection points of ? Explain what this means.
Solution
The given expression s(t) is called the logistic function. A logistic function is always increasing. Its graph
is concave up at first, then concave down, and finally levels off at a horizontal asymptote. (See Figure
5.3). In this case, the point of inflection (also called the point of diminishing), where the concavity
changes, is somewhere around 10 weeks. To find out exactly where the curve change the concavity, we
need the second derivative of s(t).
20. Figure 5.3 Graph of the logistic function
When the curve is concave up, we know ( is increasing), and when the curve is concave down,
( is decreasing). Therefore, the curve changes concavity when or when does not
exist. Since
We can use the chain rule or quotient rule to find the first derivative of s(t):
Using the quotient rule and the chain rule, we have
The denominator in is never zero, so there is no point at which is undefined. To find where the
, we only need to set the numerator equals to zero:
21. The factor can never be equal to zero, so we have . Now, solve for t:
Thus, the curve of the sales function changes the concavity around 10.4 months. This means when the
new game just appears on the market, the sales increase rapidly, more units are sold each month than
the previous month until the middle of the 11th
month. Then the sales slow down and fewer units are sold
each month than the previous month. The inflection point is the time when the rate of sales stops
increasing. Eventually, most people who want the new game have already bought it, the sales will stop
and the 59 million units should be the maximum potential sales of the new game.
Exercise 1.
a. Use the limit definition to find if .
b. Use the limit definition and your basic derivative rules to evaluate the following:
c. Find derivatives for problems 1- 7:
1.
2.
3.
4.
5.
6.
7.