How do we measure the slope of a tangent line? Before talking about tangent lines, start with something we already know how to measure: the slope of a secant line. If a curve y=f(x) passes through the points x=a and x=b, then the secant slope is
b−af(b)−f(a).
This is the average rate of change on [a,b]. Geometrically, it is the slope of the line connecting two points on the graph.
To get the slope of the tangent line at x=a, move the second point closer and closer to a. Suppose that we want the tangent slope at point P=(a,f(a)) on f(x). Define a point Q=(x,f(x)) also on f(x) and connect the secant line PQ. The secant line rotates toward the tangent line, so the tangent slope is the limiting value of those secant slopes:
mtangent=Q→PlimmPQ.
The slope of the secant line through P and Q is
mPQ=x−af(x)−f(a).
When Q→P along the graph, its x-coordinate approaches the x-coordinate of P. In other words, x→a. Therefore,
mtangent at x=a=x→alimx−af(x)−f(a).
The denominator measures horizontal change (the “run” of the slope formula), and the numerator measures vertical change (the “rise” of the slope formula). The limit asks what that ratio becomes when the two points collapse into one point.
Equivalently, instead of naming the nearby input x, write it as a+h, where h is the horizontal change from a. Then the secant slope becomes
hf(a+h)−f(a).
This is known as the difference quotient. As the second point moves toward a, the horizontal change h moves toward 0, so the tangent slope is
h→0limhf(a+h)−f(a).
The two formulas are equivalent because x=a+h, so h=x−a.
Example. For f(x)=x2+1, find the slope of the tangent line at x=3 using the first method.
Use a=3:
x→3limx−3f(x)−f(3).
Since f(3)=10,
x→3limx−3x2+1−10=x→3limx−3x2−9.
Factor and cancel:
x→3limx−3(x−3)(x+3)=x→3lim(x+3)=6.
So the tangent slope at x=3 is 6.
Example. For f(x)=2x2−x, find the slope of the tangent line at x=1 using the second method.
There exists many different notations for derivatives, but the most common ones are:
f′(x),y′,dxdy,dxd[f(x)].
They all refer to rate of change, but they emphasize different things. The notation f′(a) is a number. The notation f′(x) is a function (as long as x is the variable). The notation dy/dx emphasizes that the derivative compares a tiny change in y to a tiny change in x.
When a problem asks for “the derivative at x=a,” give a value. When it asks for “the derivative of f,” give a formula.
If f(x) has units of output and x has units of input, then f′(x)
has units
input unitsoutput units.
For instance, if position is measured in feet and time in seconds, velocity is measured in feet per second. The sign tells direction; the magnitude tells how fast the position is changing.
The Leibniz Notation (dxdy) is especially useful for problems that require context. For example, if s(t) is position, then s′(t) and ds/dt both describe velocity. The notation ds/dt makes units especially clear because it literally compares a change in position to a change in time.
For a quantity Q depending on another quantity x: dxdQ has units of Q-units per x-unit. This unit check is one of the fastest ways to catch an interpretation error.
Definition. A function is said to be differentiable on an interval [a,b] if it’s derivative exists in all of its domain.
The domain of f′ can be smaller than the domain of f. Even if f(a) exists, the derivative at a may fail to exist because the nearby slopes do not settle into one finite value or diverge to infinity.
When finding a derivative formula, always ask where that formula is valid. For example,
f(x)=x
has domain [0,∞), but it’s derivative
f′(x)=2x1
is valid only for x>0. The original function exists at x=0, but the tangent there is vertical, so the ordinary derivative is not finite.
From a graph, differentiability fails at places where the tangent slope is not a single finite number.
Theorem. If f is differentiable at x=a, then f is continuous at x=a.
Proof (Differentiability implies continuity). Suppose f′(a) exists. For x=a, rewrite the change in the function as
f(x)−f(a)=x−af(x)−f(a)(x−a).
As x→a, the first factor approaches f′(a) and the second factor approaches 0. Therefore,
x→alim(f(x)−f(a))=f′(a)⋅0=0.
It follows that
x→alimf(x)=f(a),
which is exactly the definition of continuity at a.
The contrapositive is often more useful: if f is not continuous at a, then it cannot be differentiable there. The converse is false. A function may be continuous at a point without being differentiable at that point.
The most common continuous-but-nondifferentiable behaviors are:
Corner: the one-sided derivatives are finite but unequal, as with f(x)=∣x∣ at x=0.
Cusp: the one-sided slopes become infinite with opposite signs, as with f(x)=x2/3 at x=0.
Vertical tangent: the slopes become infinite with the same sign, as with f(x)=x1/3 at x=0.
All three graphs remain unbroken at the point, so continuity alone does not guarantee differentiability.
Because f is differentiable at x, it is also continuous at x. Therefore
h→0limf(x+h)=f(x).
Substitute these limits back in:
dxdH(x)=f(x)g′(x)+g(x)f′(x).
Since multiplication is commutative, this is usually written as
dxd[f(x)g(x)]=f′(x)g(x)+f(x)g′(x).
Note that if you have more than two functions, the procedure is the same, giving you a result where you sum up the multiplicative terms between one derivative and the other functions for each derivative.
Example. Differentiate y=(x2+1)(x3−4x) using the product rule.
Let f(x)=x2+1 and g(x)=x3−4x, so f′(x)=2x and g′(x)=3x2−4. The product rule gives
y′=f′(x)g(x)+f(x)g′(x).
Substitute the pieces:
y′=2x(x3−4x)+(x2+1)(3x2−4).
Simplifying gives
y′=5x4−9x2−4.
Example. Differentiate y=x+1x2.
Let f(x)=x2 and g(x)=x+1, so f′(x)=2x and g′(x)=1. The quotient rule gives
Exponential functions are special because their rate of change is proportional to their current value. For ax, the derivative is some constant multiple of ax:
dxd(ax)=axlna.
The base e is the unique positive base where that constant is 1. In other words, ex is the exponential function whose derivative is exactly itself. Logarithm derivatives come from the fact that logarithms are inverse functions of exponentials.
The formulas for general exponential and logarithmic functions can be derived later using the chain rule and derivatives of inverse functions. The most important starting point is the derivative of ex.
Proof (Derivative of ex). Start from the derivative definition:
dxd(ex)=h→0limhex+h−ex.
Using ex+h=exeh, factor out the term that does not depend on h:
Since all of the hyperbolic functions can be defined in terms of exponentials, the derivative formula is just repeated derivatives of exponentials. The proofs are left to the reader as an exercise.
Example. Differentiate y=4ex−3cosx+2x5.
Differentiate each term separately using the sum rule. The exponential is its own derivative, the derivative of cosx is −sinx, and the power rule applies to x5:
dxd(4ex)=4ex,dxd(−3cosx)=3sinx,dxd(2x5)=10x4.
Combining the terms gives
y′=4ex+3sinx+10x4.
Example. Differentiate
y=5log2x⋅3secx+4sinhx.
This is a product plus one hyperbolic term. First rewrite the product with the constant out front:
Most derivative problems are not about one isolated rule. They are about choosing the order in which rules apply.
Example. Differentiate
y=x+1x2ex.
This can be treated as a quotient, but rewriting the radical as a power makes the product structure easier:
y=x2ex(x+1)−1/2.
This rewrite uses the exponent rule x+1=(x+1)1/2, so dividing by x+1 is the same as multiplying by (x+1)−1/2. Now the function is a product of three factors instead of a quotient with a radical.
This is a product of three factors. The expanded product rule says to differentiate one factor at a time and leave the other factors alone. For three factors,
This form shows the structure clearly. If desired, it can be combined into one rational expression, but the important part is choosing the rule order correctly.
Most derivative questions are rule-recognition questions with algebra mixed in. The safest way to work is to identify the outer structure before differentiating.
Interpret the limit as a derivative and then evaluate it exactly:
h→0limh(2+h)7/3−27/3.
State the function being differentiated and the input at which its derivative is evaluated.
The limit has the form
h→0limhf(2+h)−f(2)
for
f(x)=x7/3.
Therefore, the limit equals f′(2). By the power rule,
f′(x)=37x4/3.
Evaluating at x=2 gives
f′(2)=3724/3=31432.
Let
f(x)={ax2+b,3lnx+c,x<1,x≥1.
Given that f(0)=2, find a, b, and c so that f is differentiable at x=1. Then find f′(1).
Since 0<1,
f(0)=a(0)2+b=b.
Thus b=2. Continuity at x=1 requires the two branches to meet:
a+b=c.
For differentiability, the one-sided derivatives must also agree. The derivative of the left branch is 2ax, while the derivative of the right branch is 3/x. At x=1,
2a=3,
so
a=23.
Now use continuity:
c=a+b=23+2=27.
The common one-sided derivative is 3. Therefore,
a=23,b=2,c=27,f′(1)=3.
Define
f(x)=∣x2−4x+3∣.
(A) Find every input where f is not differentiable and justify each one using one-sided derivatives.
(B) Find the equation of the tangent line to f at x=2.
(C) Determine whether either nondifferentiable point can be repaired by changing only the value of f at that point. Explain.
Factor the expression inside the absolute value:
x2−4x+3=(x−1)(x−3).
It is nonnegative for x≤1 and x≥3, and negative for 1<x<3. Thus
Neither corner can be repaired by changing only the point value. Keeping the current value preserves continuity but leaves unequal one-sided slopes; changing the value makes the function discontinuous, which also prevents differentiability.
Nondifferentiable at x=1 and x=3;tangent at x=2:y=1.
Differentiable functions f and g satisfy
x2f(x)3f′(x)4g(x)−1g′(x)5
Let
H(x)=f(x)+g(x)f(x)g(x).
Find H(2) and H′(2). Then write an equation of the normal line to the graph of H at x=2.
The exponential and trigonometric factors are differentiable for every real number. The only restriction comes from the original denominator x3, so the function and its derivative are undefined at x=0.
y′=x4x(x2+1)(ex+cosx)−(x2+3)(ex+sinx),x=0.
Let
f(x)=x−1x2+1.
Find every point on the graph of f where the tangent line has slope −1. Write the equation of each tangent line and determine whether the corresponding normal lines are parallel.
Polynomial division gives
f(x)=x+1+x−12.
Therefore,
f′(x)=1−(x−1)22.
Set the derivative equal to −1:
1−(x−1)22=−1.
Then
(x−1)2=1,
so x=0 or x=2. The corresponding points are
f(0)=−1andf(2)=5.
The tangent lines with slope −1 are
y+1=−x⟹y=−x−1
and
y−5=−(x−2)⟹y=−x+7.
Both normal lines have slope 1. Their equations are y=x−1 and y=x+3, so they are parallel.
(0,−1) and (2,5);tangents y=−x−1 and y=−x+7;the normals are parallel.
Let f(x)=x2ex. Find f(12)(0) without differentiating the function twelve times one line at a time. Develop and justify a pattern for f(n)(x) that works for every positive integer n.
In the nth derivative of x2ex, the polynomial factor can be differentiated zero, one, or two times. The generalized product rule gives
prove that cosh2x−sinh2x is constant. Then determine the value of the constant by evaluating the expression at x=0.
Let
F(x)=cosh2x−sinh2x.
Using the product rule on each square,
F′(x)=2coshxsinhx−2sinhxcoshx=0.
A function whose derivative is zero on an interval is constant there. To identify the constant, evaluate at x=0:
F(0)=cosh2(0)−sinh2(0)=12−02=1.
Therefore,
cosh2x−sinh2x=1.
A particle moves along a line with position
s(t)=tlnt,t>0.
Find the exact time t∈(1,e) at which the instantaneous velocity equals the average velocity on the interval [1,e]. Verify directly that your answer lies in the required interval.
The instantaneous velocity is
v(t)=s′(t)=lnt+1.
The average velocity on [1,e] is
e−1s(e)−s(1)=e−1elne−1ln1=e−1e.
Set the two velocities equal:
lnt+1=e−1e.
Then
lnt=e−1e−1=e−11,
so
t=e1/(e−1).
Because e>2,
0<e−11<1.
Exponentiating gives
1<e1/(e−1)<e,
so the time lies in the required interval.
t=e1/(e−1).
Suppose f is differentiable at x=a.
(A) Rewrite f(x)−f(a) as a product involving the difference quotient x−af(x)−f(a).
(B) Use limit laws and the derivative definition to prove that f must be continuous at x=a.
(C) Give an example showing that the converse is false: a function can be continuous at a point without being differentiable there.
For x=a,
f(x)−f(a)=(x−a)x−af(x)−f(a).
Take the limit as x→a. Differentiability tells us that the difference quotient approaches the finite number f′(a):
The converse is false. For example, f(x)=∣x∣ is continuous at x=0, but its left-hand derivative is −1 and its right-hand derivative is 1. Therefore it is not differentiable there.
f differentiable at a⟹f continuous at a,but the converse is false.