What is a derivative, and how can we calculate it? In this article, we’ll discuss the definition of a derivative and 3 steps to differentiate functions. Then, you can test your knowledge with some examples.
Derivatives measure the instantaneous rate of change of a function. When we talk about rates of change, we’re talking about slopes.
The instantaneous rate of change of a function at a point is equal to the slope of the function at that point. When we find the slope of a curve at a single point, we find the slope of the tangent line. The tangent line to a function at a point is a line that just barely touches the function at that point.
So, the derivative of a function at a single point is equal to the slope of the tangent line at that point.
To visualize the tangent line, let’s look at an example where the equation for the tangent line has already been calculated. Consider the function f(x)=ln(x), indicated by the blue line.
Suppose we want to find the derivative of f(x) at the point (1,0). The tangent line to the curve f(x) at (1,0) is represented by the red line, f(x)=x−1. Notice how this line touches f(x)=ln(x) at just one point, (1,0).
The tangent line f(x)=x−1 is given in the slope-intercept form f(x)=mx+b, where m is the slope. So, we can easily see that the slope of f(x)=x−1 is 1.
This means that the instantaneous rate of change, or derivative, of the function f(x)=ln(x) at the point (0,1) is 1.
The instantaneous rate of change of f at a, or the derivative of fat a, is represented by the notation f’(a). We read aloud the symbol f’(a) as either “the derivative of f evaluated at a” or “f prime at a.”
The general derivative function of y=f(x) is usually represented by either f’(x) or dxdy. (You can read more about the meaning of dy/dx if needed.) This function tells us the instantaneous rate of change of f with respect to x at any point on the curve.
You can watch Dr. Hannah Fry explain more about what a derivative is below.
3 Steps to Find Derivatives
Next, we’ll learn exactly how to find the derivative of a function. So far, we’ve learned that the slope at a point on a curve is called the slope of the tangent line or the instantaneous rate of change.
By contrast, the slope between two separate points on a curve is called the slope of the secant line. This slope value is also referred to as the average rate of change. The average rate of change will help us calculate the derivative of a function.
To find the average rate of change, we divide the change in the output values (y-values) by the change in the input values (x-values). The delta symbol Δx represents the "change in x," which is the value that x is changing by. The average rate of change of the function f over the interval [a,b] is:
Average Rate of Change=ΔxΔy=x2−x1y2−y1=b−af(b)−f(a)
By making Δx approach 0, we can find the instantaneous rate of change. Take a look at the limit definition of a derivative below.
The derivative of f at x is equal to the limit of the average rate of change of f over the interval [x,x+Δx] as Δx approaches 0. This limit is given by:
f’(x)=Δx→0limΔxΔy=Δx→0limΔxf(x+Δx)−f(x)=L
If this limit exists, then f(x) is differentiable, and the derivative of the function f at x is L. For a brief review of limits, read What Are Limits? and How to Find Limits.
Here are 3 simple steps to calculating a derivative:
Substitute your function into the limit definition formula.
Simplify as needed.
Evaluate the limit.
Let’s walk through these steps using an example. Suppose we want to find the derivative of f(x)=2x2.
Step 1
First, we need to substitute our function f(x)=2x2 into the limit definition of a derivative. Substituting the first term of the limit definition’s numerator correctly can be tricky at first. The key is to simply substitute x with (x+Δx) wherever x appears in the function.
f’(x)=Δx→0limΔxf(x+Δx)−f(x)
=Δx→0limΔx2(x+Δx)2−2x2
Step 2
Next, we simplify our function as much as we can. First, we’ll expand the term 2(x+Δx)2, and then combine like terms. Then, since Δx is present in all terms of the numerator and denominator, we can divide by Δx.
f’(x)=Δx→0limΔx2(x2+2xΔx+Δx2)−2x2
=Δx→0limΔx2x2+4xΔx+2Δx2−2x2
=Δx→0limΔx4xΔx+2Δx2
=Δx→0lim4x+2Δx
Step 3
Finally, we can evaluate the limit as Δx approaches 0. Since we’re left with a polynomial function and polynomials are always continuous, we can simply substitute Δx=0 into the function we’re left with.
f’(x)=Δx→0lim4x+2Δx
=4x+2(0)
=4x
Thus, the general derivative formula of f(x)=2x2 is 4x. If you want to find the derivative at a single point, you can simply plug x=a into f’(x)=4x. For example:
f’(1)=4(1)=4. This value represents the slope of the tangent line at x=1.
f’(2)=4(2)=8. This value represents the slope of the tangent line at x=2.
f’(100)=4(100)=400. This value represents the slope of the tangent line at x=100.
Standard Derivative Rules
Now that you’re familiar with the limit definition of a derivative, you can begin to memorize the standard derivative rules below. These derivative rules are derived from the limit definition of a derivative. They allow us to evaluate derivatives much faster.
Here are some of the most common derivative rules to know:
Constant Rule
dxdc=0
Power Rule
dxd(xn)=nxn−1
Special Case of the Power Rule (where n=1): dxd(x)=1
Constant Multiple Rule
dxd(c⋅f(x))=c⋅f′(x)
Chain Rule
dxdf(g(x))=f’(g(x))g’(x)
Product Rule
dxd[f(x)⋅g(x)]=f’(x)⋅g(x)+f(x)⋅g’(x)
Quotient Rule
dxd[g(x)f(x)]=(g(x))2g(x)f’(x)−f(x)g’(x)
Sum/Difference Rule
dxd[f(x)±g(x)]=f’(x)±g’(x)
Trigonometry Rules
dxd(sin(x))=cos(x)
dxd(cos(x))=−sin(x)
dxd(tan(x))=sec2(x)
Logarithmic and Exponential Rules
dxd(lnx)=x1
dxd(ex)=ex
Dr. Tim Chartier explains more about the Product and Quotient derivative rules.
4 Practice Exercises
Exercise 1
Let f(x)=7x−1. Using the limit definition of a derivative, find f’(x).
Solution
Substituting your function into the limit definition can be the hardest step for functions with multiple terms. Remember to double-check your answer, use parentheses where necessary, and distribute negative signs appropriately.
f’(x)=Δx→0limΔxf(x+Δx)−f(x)
=Δx→0limΔx7(x+Δx)−1−(7x−1)
=Δx→0limΔx7x+7Δx−1−7x+1
=Δx→0limΔx7Δx
=Δx→0lim7
=7
So f’(x)=7.
Exercise 2
Let f(x)=x1. Using the limit definition of a derivative, find f’(x).
Solution
After substituting our function into the limit definition, we’ll need to combine the two fractions in the numerator by finding a common denominator and then multiplying appropriately.
f’(x)=Δx→0limΔxf(x+Δx)−f(x)
=Δx→0limΔxx+Δx1−x1
=Δx→0limΔxx(x+Δx)x−x(x+Δx)(x+Δx)
=Δx→0limΔxx(x+Δx)x−x−Δx
=Δx→0limx(x+Δx)−Δx⋅Δx1
=Δx→0limx(x+Δx)−1
=x(x+0)−1
=x⋅x−1
=−x21
So, f’(x)=−x21.
Exercise 3
Let f(x)=3x2+ecos(x). Using the derivative rules, find f’(x).
Solution
For this problem, we’ll need to use the Sum Rule. The Sum Rule states that the derivative of a sum of functions is equal to the sum of their derivatives. To find the derivative of each separate function, we can use the Power Rule and the Constant Multiple Rule for the first term, and the Chain Rule, trigonometry rules, and the exponential rule for the second term.
For the first term, we use the Power Rule with n=2, combining that with the Constant Multiple Rule where c=3. Using these, we see that the derivative of the first term is f′(x)=3⋅2x2−1=3⋅2x=6x.
For the second term, we also have a composition of functions with ecos(x). The Chain Rule says that the derivative of a composition of functions is found by first taking the derivative of the "outside" function and leaving the “inside” unchanged, and then multiplying by the derivative of the "inside" function.
So, to find the derivative of ecos(x), we can simply use the exponential rule and then multiply by −sin(x), which is the derivative of the inside function cos(x).
f’(x)=6x+ecos(x)⋅(−sin(x))
f’(x)=6x−sin(x)ecos(x)
So, f’(x)=6x−sin(x)ecos(x).
Exercise 4
Let f(x)=2xsin(5x). Using the derivative rules, find f’(x).
Solution
For this problem, we’ll need to use the Product Rule. The product rule states that the derivative of a product of functions is the sum of the first function times the derivative of the second and the second function times the derivative of the first.
The first function in our product is 2x. To find the derivative of this we use the special case of the Product Rule with n=1 as well as the Constant Multiple Rule with c=2. Applying these rules, we find that the derivative of 2x is
dxd(2x)=2⋅1=2
For the second function in our product, we have a composition of functions with sin(5x). The Chain Rule says that the derivative of a composition of functions is found by first taking the derivative of the "outside" function and leaving the “inside” unchanged, and then multiplying by the derivative of the "inside" function.
So, to find the derivative of sin(5x), we can simply use the trigonometry rules for sin and then multiply by 5, which is the derivative of the inside function 5x. The derivative of the inside function is found by using the special case of the Power Rule for n=1 and the Constant Multiple Rule.
Plugging the derivatives we found into the Product Rule, we get:
Outlier (from the co-founder of MasterClass) has brought together some of the world's best instructors, game designers, and filmmakers to create the future of online college.