The Derivative as a Function
On a road trip across Texas, the odometer tells you where you are, and the speedometer tells you how fast the odometer is changing at this very instant. The speedometer reading is a new function built from the odometer function, one value for every moment of the trip. That is the derivative function $f'(x)$. By the end of this page you will know how to build it from a limit, from rules, and from curves that are not even solved for $y$.
The Derivative Defined by a Limit
The slope of a line through two points on a curve is a difference quotient. Slide the second point closer and closer to the first, and the secant line turns into the tangent line.
Why a limit? The difference quotient is an average rate of change over an interval of width $h$. Letting $h\to 0$ squeezes the interval to a single instant and gives the instantaneous rate of change, the slope of the tangent line.
Direct substitution always gives $\tfrac{0}{0}$, so the algebra must cancel the $h$ in the denominator first.
To get the derivative at one point, such as $f'(3)$ for $f(x)=x^2$, you can plug into $f'(x)=2x$, or use the point form directly: $\displaystyle\lim_{x\to3}\frac{x^2-9}{x-3}=\lim_{x\to3}(x+3)=6$.
With a square root, the trick is to multiply by the conjugate.
A skater moves along a track following a trajectory whose position (in feet) is given by the function $s(t) = t^2 + 3t$, where $t$ is the time in seconds. Calculate,…
A skater moves along a track following a trajectory whose position (in feet) is given by the function $s(t) = t^2 + 3t$, where $t$ is the time in seconds. Calculate, using the definition of the derivative as a limit, the instantaneous velocity of the skater at the instant $t = 2$ seconds.
Making exclusive use of the definition of the derivative as a limit (difference quotient), calculate the derivative function of $f(x) = \sqrt{2x^2 + 1}$. Subsequently,…
Making exclusive use of the definition of the derivative as a limit (difference quotient), calculate the derivative function of $f(x) = \sqrt{2x^2 + 1}$. Subsequently, use the result obtained to find the equation of the tangent line to the curve at the point with x-coordinate $x = 2$.
Differentiation Rules
Taking a limit every time is slow. These rules, each of which can be proved from the limit definition, do the work for you.
| $f(x)$ | $f'(x)$ |
|---|---|
| $c$ (constant) | $0$ |
| $x^n$ (any real $n$) | $nx^{n-1}$ |
| $e^x$ | $e^x$ |
| $a^x$ | $a^x\ln a$ |
| $\ln x$ | $\dfrac1x$ |
| $\sin x$ | $\cos x$ |
| $\cos x$ | $-\sin x$ |
| $\tan x$ | $\sec^2 x$ |
Constants come out front and sums split: $(cf\pm g)'=cf'\pm g'$. Rewrite roots and reciprocals as powers first: $\sqrt{x}=x^{1/2}$ and $\dfrac1{x^3}=x^{-3}$.
For example, $(x^2\sin x)'=2x\sin x+x^2\cos x$. The graph shows $f$ and its derivative $f'$; notice that $f'$ is zero exactly where $f$ has a horizontal tangent.
Calculate the derivative function of the following elementary functions using the rules of differentiation: a) $f(x) = 5x^4 - 3x^2 + 7x - 1$ b)…
Calculate the derivative function of the following elementary functions using the rules of differentiation:
- a) $f(x) = 5x^4 - 3x^2 + 7x - 1$
- b) $g(x) = \frac{1}{x^3} + \sqrt{x}$
- c) $h(x) = 3e^x - 2\cos(x)$
Given the function $f(x) = x \cdot \ln(x)$, calculate its derivative $f'(x)$ applying the product rule and determine the value of the slope of the curve at the point…
Given the function $f(x) = x \cdot \ln(x)$, calculate its derivative $f'(x)$ applying the product rule and determine the value of the slope of the curve at the point where $x = e$.
An access ramp for a skatepark is being designed. The side profile of the first section follows the function $f(x) = \frac{x^2+4}{x+1}$. Calculate the derivative…
An access ramp for a skatepark is being designed. The side profile of the first section follows the function $f(x) = \frac{x^2+4}{x+1}$. Calculate the derivative function $f'(x)$ to find out how the incline of the ramp varies at any point in that section.
The Chain Rule
Most functions you meet are layers: an outside function applied to an inside function, like $\sin(5x+2)$ or $e^{x^2}$.
A very useful special case: $\dfrac{d}{dx}\ln u=\dfrac{u'}{u}$.
When a logarithm contains a quotient or product, simplify with log properties first; it is usually much easier.
Apply the chain rule to find the derivative of the following composite functions: a) $f(x) = (3x^2 - 5)^4$ b) $g(x) = \sin(5x + 2)$ c) $h(x) = e^{x^2}$
Apply the chain rule to find the derivative of the following composite functions:
- a) $f(x) = (3x^2 - 5)^4$
- b) $g(x) = \sin(5x + 2)$
- c) $h(x) = e^{x^2}$
Calculate the derivative function of the following composite function, simplifying the result as much as possible:…
Calculate the derivative function of the following composite function, simplifying the result as much as possible:
$f(x) = \ln\left(\frac{1 + \sin(x)}{1 - \sin(x)}\right)$
Tangent Lines and Normal Lines
Since $f'(a)$ is the slope of the tangent line at $x=a$, you can write that line with point-slope form. The normal line is perpendicular to the tangent line at the same point.
Find the equation of the tangent line to the graph of the function $f(x) = x^2 - 4x + 1$ at the point with x-coordinate $x = 3$.
Find the equation of the tangent line to the graph of the function $f(x) = x^2 - 4x + 1$ at the point with x-coordinate $x = 3$.
Find the equation of the tangent line to the curve $f(x) = \frac{x^2 - 1}{x + 2}$ at the point where the function intersects the y-axis ($OY$).
Find the equation of the tangent line to the curve $f(x) = \frac{x^2 - 1}{x + 2}$ at the point where the function intersects the y-axis ($OY$).
Higher-Order Derivatives and Patterns
You can differentiate a derivative. The result is the second derivative, and so on.
For functions like $\dfrac1x$, $e^{2x}$, or $\ln x$, the derivatives follow a pattern, and you can write $f^{(n)}(x)$ without differentiating $n$ times.
The chain rule adds one factor each time. For a linear inside, $\dfrac{d^n}{dx^n}\,(ax+b)^{-1}=\dfrac{(-1)^n\,n!\,a^n}{(ax+b)^{n+1}}$: every derivative picks up one more factor $a$.
Rational functions with a factored denominator become easy after partial fractions.
How do you know a pattern is true for every $n$, not only for the first few? Use mathematical induction on the pattern for $(x-c)^{-1}$:
Calculate the second derivative of the function $f(x) = x^3 - 6x^2 + 9x - 2$. For what value of $x$ is this second derivative zero? (This point is important for studying…
Calculate the second derivative of the function $f(x) = x^3 - 6x^2 + 9x - 2$. For what value of $x$ is this second derivative zero? (This point is important for studying concavity, which you will see later.)
Given the function $f(x) = \ln(2x - 3)$, find the general expression for its n-th derivative $f^{(n)}(x)$ and use it to calculate the value of the fourth derivative at…
Given the function $f(x) = \ln(2x - 3)$, find the general expression for its n-th derivative $f^{(n)}(x)$ and use it to calculate the value of the fourth derivative at the point $x = 2$.
Consider the function $f(x) = \frac{1}{x^2 - 3x + 2}$. a) Decompose the function into partial fractions. b) Using the previous decomposition, find a general formula for…
Consider the function $f(x) = \frac{1}{x^2 - 3x + 2}$.
- a) Decompose the function into partial fractions.
- b) Using the previous decomposition, find a general formula for the $n$-th derivative, $f^{(n)}(x)$, for any $n \in \mathbb{N}$.
- c) Prove the validity of your formula for every $n \in \mathbb{N}$ by mathematical induction, explicitly checking the first three orders of differentiation.
Velocity and Acceleration
If $s(t)$ is the position of an object moving along a line, then:
-
velocity $v(t)=s'(t)$ (negative means moving in the negative direction),
-
acceleration $a(t)=v'(t)=s''(t)$,
-
speed $=|v(t)|$.
The object is momentarily at rest when $v(t)=0$. It changes direction only when $v$ changes sign. The speed is increasing when $v$ and $a$ have the same sign and decreasing when they have opposite signs.
In the graph above, $x$ plays the role of $t$: the first curve is $s(t)$ and the second is $v(t)$.
With exponentials, factor out the exponential before analyzing signs.
A surveillance drone follows a trajectory whose height in feet is given by the function $h(t) = \frac{1}{3}t^3 - 4t^2 + 11t + 5$, where $t$ is the time in seconds (…
A surveillance drone follows a trajectory whose height in feet is given by the function $h(t) = \frac{1}{3}t^3 - 4t^2 + 11t + 5$, where $t$ is the time in seconds ($0 \leq t \leq 10$).
-
a) Calculate the velocity function $v(t)$ and the acceleration function $a(t)$.
-
b) At what instants of time is the drone momentarily stationary (velocity equal to zero)?
A surveillance drone follows a flight path along a straight axis. Its position (in feet) with respect to the control center is given by the function…
A surveillance drone follows a flight path along a straight axis. Its position (in feet) with respect to the control center is given by the function $s(t) = t^2 \cdot e^{-t/4}$, where $t$ is the time in minutes since take-off ($t \ge 0$).
- a) Determine the velocity function $v(t)$ and the acceleration function $a(t)$ of the drone.
- b) At what instant does the drone change its direction of motion?
- c) Calculate the exact moment when the acceleration is zero. What physical interpretation does this point have with respect to the drone's velocity?
Reading $f'$ and $f''$
The derivative tells the story of the original function.
The graph above shows $f(x)=x^3-3x$ and $f'(x)=3x^2-3$. Where does $f'$ cross the $x$-axis? Where does $f'$ have its minimum?
A different kind of problem gives you conditions about $f$, $f'$, and $f''$ and asks you to find the function. Translate each condition into an equation.
The following graph corresponds to the derivative function, $f'(x)$, of a function $f(x)$ which is continuous throughout its domain $\mathbb{R}$. Based on the graph of…
The following graph corresponds to the derivative function, $f'(x)$, of a function $f(x)$ which is continuous throughout its domain $\mathbb{R}$.
Based on the graph of $f'(x)$, answer the following questions about the original function $f(x)$, giving reasons:
- a) State the intervals of increase and decrease of $f(x)$.
- b) Determine the x-coordinates of the relative extrema of $f(x)$ and classify them as maxima or minima.
- c) At what value of $x$ does $f(x)$ have a point of inflection? Justify your answer based on the relationship between $f''(x)$ and the slope of $f'(x)$.
Consider the function $f(x) = x^4 + ax^3 + bx^2 + cx + d$. Determine the coefficients $a, b, c$ and $d$ knowing that the following conditions are simultaneously met: 1.…
Consider the function $f(x) = x^4 + ax^3 + bx^2 + cx + d$. Determine the coefficients $a, b, c$ and $d$ knowing that the following conditions are simultaneously met:
-
The graph of $f(x)$ passes through the origin.
-
The function has a point of inflection at $x = 1$.
-
The tangent line to the curve at the point with x-coordinate $x = 0$ is parallel to the line $y = -2x + 5$.
-
The value of the second derivative at $x = 0$ is $f''(0) = 6$.
Differentiability and Continuity
A function is differentiable at $a$ if $f'(a)$ exists, that is, if the two one-sided limits of the difference quotient exist and are equal:
$$\lim_{h\to0^-}\frac{f(a+h)-f(a)}{h}=\lim_{h\to0^+}\frac{f(a+h)-f(a)}{h}.$$So a function can fail to be differentiable at a point in four common ways.
At a corner, the left and right slopes are different numbers. At a cusp or vertical tangent, the slope is $\pm\infty$. At a jump, the function is not even continuous. For example, $f(x)=\sqrt[3]{x}$ at $0$ has $\dfrac{f(h)-f(0)}{h}=h^{-2/3}\to\infty$, a vertical tangent.
Absolute value always makes corners at its zeros. Here is a shortcut with a reason.
For example, take $f(x)=|x^2-4|$ at $x=2$. Here $g(x)=x^2-4$ has $g(2)=0$ and $g'(2)=4\neq0$, so the one-sided derivatives are $-4$ and $4$, and there is a corner at $x=2$ (but $f$ is continuous there).
Determine the differentiability of the following function at the point $x = 2$, first checking if it is continuous at that point: $$f(x) = \begin{cases} x^2 & \text{if }…
Determine the differentiability of the following function at the point $x = 2$, first checking if it is continuous at that point:
$$f(x) = \begin{cases} x^2 & \text{if } x \leq 2 \\ 4x - 4 & \text{if } x > 2 \end{cases}$$Study the differentiability of the function $f(x) = |x^2 - 4x + 3|$ at the points $x = 1$ and $x = 3$. State whether one-sided derivatives exist at these points and…
Study the differentiability of the function $f(x) = |x^2 - 4x + 3|$ at the points $x = 1$ and $x = 3$. State whether one-sided derivatives exist at these points and whether the function is continuous.
Making a Piecewise Function Differentiable
When a piecewise function has unknown constants, you choose them so the two pieces join smoothly. A smooth join needs two things at the junction $x=c$.
Once the one-sided derivatives agree at $c$, you can ask a follow-up: is $f'$ itself continuous at $c$? If both pieces are built from ordinary functions (polynomials, exponentials, logs on their domains), their derivative formulas are continuous. So the left limit and right limit of $f'$ at $c$ equal the matching one-sided derivatives, and $f'$ is continuous at $c$. In the example, $4x+3$ and $3x^2+4$ both equal $7$ at $x=1$.
Determine the values of the parameters $a$ and $b$ so that the following function is differentiable throughout its domain, paying special attention to the joining point…
Determine the values of the parameters $a$ and $b$ so that the following function is differentiable throughout its domain, paying special attention to the joining point $x = 0$:
$f(x) = \begin{cases} e^{ax} & \text{if } x \leq 0 \\ x^2 + bx + 1 & \text{if } x > 0 \end{cases}$
Consider the piecewise function $f: \mathbb{R} \to \mathbb{R}$ given by the following expression: $$f(x) = \begin{cases} a \cdot e^{x-2} + b \cdot x & \text{if } x \le 2…
Consider the piecewise function $f: \mathbb{R} \to \mathbb{R}$ given by the following expression:
$$f(x) = \begin{cases} a \cdot e^{x-2} + b \cdot x & \text{if } x \le 2 \\ \ln(x^2 - 3) + x^2 & \text{if } x > 2 \end{cases}$$Determine the values of the parameters $a, b \in \mathbb{R}$ so that the function is differentiable throughout its domain. Once found, discuss whether the derivative function $f'(x)$ is, in turn, continuous at $x = 2$.
Implicit Differentiation
Some curves are not written as $y=f(x)$, such as the circle $x^2+y^2=25$ or the Folium of Descartes $x^3+y^3-3xy=0$. They still have a tangent slope at each point. Near a point, $y$ is secretly a function of $x$, so differentiate both sides with respect to $x$ and treat $y$ as $y(x)$.
For the circle: $2x+2y\,y'=0$, so $y'=-\dfrac{x}{y}$. At $(3,4)$ the slope is $-\dfrac34$, which matches the figure (the tangent is perpendicular to the radius).
Notice the pattern: horizontal tangent means numerator $=0$; vertical tangent means denominator $=0$ (provided the numerator is not also zero).
Given the equation of the implicitly defined curve $x^3 + y^3 - 3xy = 0$ (known as the Folium of Descartes), calculate the value of the slope of the tangent line to the…
Given the equation of the implicitly defined curve $x^3 + y^3 - 3xy = 0$ (known as the Folium of Descartes), calculate the value of the slope of the tangent line to the curve at the point $( \frac{3}{2}, \frac{3}{2} )$.
Given the curve defined by the implicit equation $x^3 + y^3 - 3xy = 0$ (known as the Folium of Descartes): a) Obtain the expression for the derivative $y'$ in terms of…
Given the curve defined by the implicit equation $x^3 + y^3 - 3xy = 0$ (known as the Folium of Descartes):
- a) Obtain the expression for the derivative $y'$ in terms of $x$ and $y$ using implicit differentiation.
- b) Find the points on the curve where the tangent line is horizontal.
- c) Determine the equation of the normal line to the curve at the point $( \frac{3}{2}, \frac{3}{2} )$.
Logarithmic Differentiation
How do you differentiate $x^x$? The power rule needs a constant exponent, and the exponential rule needs a constant base. When both the base and the exponent vary, take the natural log first.
Two practical details:
-
Domain. For a real function $u^v$ with a variable exponent, you need $u>0$ (and $v$ defined). Find the domain of $f$ by requiring that, and the domain of $f'$ from the final formula.
-
Zero slope. Since $y=u^v>0$, the factor outside the bracket is never zero. So $y'=0$ exactly when the bracket equals $0$. To show that the bracket has a zero, check its sign at two test points and use the Intermediate Value Theorem.
Use the technique of logarithmic differentiation to find the derivative of the following power-exponential function: $f(x) = (x^2 + 1)^{\cos(x)}$
Use the technique of logarithmic differentiation to find the derivative of the following power-exponential function:
$f(x) = (x^2 + 1)^{\cos(x)}$
Use the technique of logarithmic differentiation to calculate the derivative function of: $$f(x) = \left( \cos(x) \right)^{\ln(x)}$$ State, with justification, the…
Use the technique of logarithmic differentiation to calculate the derivative function of:
$$f(x) = \left( \cos(x) \right)^{\ln(x)}$$State, with justification, the domain of definition of the function $f(x)$ and that of its derivative function $f'(x)$. Is there any point in the interval $(0, \pi/2)$ where the slope of the tangent line is zero?
Summary
Back to the start: the speedometer is the derivative of the odometer. $f'(x)$ is a new function that gives the slope, and the instantaneous rate of change, at every $x$. You can build it from the limit definition or from the rules.