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. All exponential and logarithmic differentiations can be solved using a clever trick in the limit definition.
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.
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.
For a>0 with a=1, define
Fa(x)=xlogax,x>0.
(A) Use the change-of-base identity to find Fa′(x).
(B) Find the point where the graph of Fa has a horizontal tangent, and write the equation of that tangent line in terms of a.
(C) The tangent line at x=1 intersects the horizontal tangent from part (B). Find their intersection point in terms of a.
(D) Suppose the intersection point from part (C) lies on the line y=1/2. Find a exactly and write the equations of both tangent lines.
By the change-of-base identity,
Fa(x)=xlnalnx.
Since lna is a nonzero constant, the quotient rule gives
Fa′(x)=x2lnax(1/x)−lnx=x2lna1−lnx.
The tangent is horizontal when Fa′(x)=0. The denominator is nonzero on the domain, so
1−lnx=0,
which gives x=e. At this input,
Fa(e)=elna1.
Thus the horizontal tangent line is
y=elna1.
At x=1,
Fa(1)=0andFa′(1)=lna1,
so the other tangent line is
y=lnax−1.
At the intersection of the two tangent lines,
lnax−1=elna1.
Multiplying by the nonzero quantity lna gives
x=1+e1.
Therefore, the intersection point is
(1+e1,elna1).
If its y-coordinate is 1/2, then
elna1=21.
It follows that
lna=e2⟹a=e2/e.
For this value of a, 1/lna=e/2. The two tangent lines are therefore
y=2e(x−1)andy=21.
Define
p(x)=(x−1)∣x∣2/3.
(A) Show that p is continuous at x=0.
(B) Use the derivative definition to determine whether p′(0) exists. Describe the behavior of the difference quotient from the left and from the right.
(C) Find p′(x) separately for x<0 and x>0. Then find every point on the graph where the tangent line is horizontal.
(D) Write the equation of each horizontal tangent line and explain what the results from parts (A) and (B) reveal about the graph at x=0.
The functions x−1 and ∣x∣2/3 are continuous for every real input. Their product is therefore continuous, and
p(0)=(−1)(0)=0.
To test differentiability at 0, use the definition:
p′(0)=h→0limhp(h)−p(0)=h→0limh(h−1)∣h∣2/3.
For h>0, the difference quotient becomes
h−1/3(h−1),
which approaches −∞ as h→0+. For h<0, write h=−t with t>0. Then the quotient is
−t(−t−1)t2/3=(t+1)t−1/3,
which approaches +∞ as t→0+. The one-sided difference quotients do not approach the same finite value, so p′(0) does not exist.
For x>0, ∣x∣2/3=x2/3. The product rule gives
p′(x)=x2/3+32(x−1)x−1/3=3x1/35x−2.
For x<0, the derivative of ∣x∣2/3 is −(2/3)∣x∣−1/3. Therefore,
p′(x)=∣x∣2/3−32(x−1)∣x∣−1/3=3∣x∣1/32−5x.
When x<0, both 2−5x and the denominator are positive, so there are no horizontal tangents on that interval. When x>0,
5x−2=0⟹x=52.
The corresponding point is
(52,−53(52)2/3).
Because the slope is zero there, the horizontal tangent line is
y=−53(52)2/3.
The graph is continuous at x=0, but its one-sided slopes become unbounded with opposite signs. Thus the graph has a cusp at (0,0) rather than a differentiable point.
For a>0, let f(x)=ax. The tangent line to the graph of f at x=0 passes through the point (2,5).
(A) Find a exactly.
(B) Write equations of the tangent and normal lines at x=0.
(C) Find the x-intercept of the normal line.
Since
f′(x)=axlna,
the point of tangency is (0,1) and the tangent slope is
f′(0)=lna.
The tangent line is
y−1=(lna)x.
It passes through (2,5), so
5−1=2lna.
Thus lna=2 and
a=e2.
The tangent line is y=2x+1. Its normal slope is −1/2, so the normal line is
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=0, f(0)=0, and f′(0)=L. Define
g(x)={f(x)sin(1/x),0,x=0,x=0.
(A) Prove that g is continuous at x=0 for every finite value of L.
(B) Prove that if L=0, then g is differentiable at x=0 and find g′(0).
(C) Prove that if L=0, then g′(0) does not exist. Use two sequences approaching 0 along which sin(1/x) equals 1 and −1.
(D) Give one explicit function f for the case L=0 and one for the case L=0.
Since f is differentiable at 0,
x→0limx−0f(x)−f(0)=x→0limxf(x)=L.
The quotient f(x)/x is therefore bounded near 0. Write
f(x)=xxf(x).
The factor x approaches 0 while the quotient remains bounded, so f(x)→0. Since
∣g(x)∣=∣f(x)sin(1/x)∣≤∣f(x)∣,
the Squeeze Theorem gives
x→0limg(x)=0=g(0).
Thus g is continuous at 0.
For differentiability, use the definition:
g′(0)=h→0limhg(h)−g(0)=h→0limhf(h)sin(1/h).
If L=0, then f(h)/h→0. Because ∣sin(1/h)∣≤1, the Squeeze Theorem gives
g′(0)=0.
Now suppose L=0. Choose
hn=π/2+2πn1andkn=3π/2+2πn1.
Both sequences approach 0+, but
sin(1/hn)=1andsin(1/kn)=−1.
Along the first sequence, the difference quotient approaches
n→∞limhnf(hn)sin(1/hn)=L.
Along the second, it approaches
n→∞limknf(kn)sin(1/kn)=−L.
Since L=0, these limits differ, so g′(0) does not exist.
For explicit examples, f(x)=x2 has L=f′(0)=0, while f(x)=x has L=f′(0)=1. Therefore,
g is always continuous at 0,g′(0) exists exactly when L=0,g′(0)=0 in that case.
(Bonus, A geometric property of a parabola)
Let A=(a,a2) and B=(b,b2) be distinct points on the parabola y=x2. Their tangent lines intersect at T, and M is the midpoint of the chord joining A and B. Prove that the midpoint of the segment TM lies on the parabola.
The derivative of y=x2 is 2x. The tangent lines at A and B therefore have equations
y−a2=2a(x−a),y−b2=2b(x−b),
or
y=2ax−a2,y=2bx−b2.
At their intersection T, the two expressions for y are equal:
2(a−b)x=a2−b2=(a−b)(a+b).
Because A and B are distinct, a=b. Dividing by 2(a−b) gives x=(a+b)/2. Substitution into either tangent line then gives
T=(2a+b,ab).
The midpoint of the chord AB is
M=(2a+b,2a2+b2).
The points T and M have the same x-coordinate. Their midpoint has coordinates
(2a+b,21[ab+2a2+b2])=(2a+b,4(a+b)2).
Its second coordinate is the square of its first coordinate, so
the midpoint of TM lies on y=x2.
The derivative finds the tangent lines; the midpoint calculation then reveals a geometric property that holds for every pair of distinct points on the parabola.