Antiderivatives
So far, we started with a function and found its derivative. Now we go the other way: we know the derivative, and we want the function. For example, if we know the velocity of a car at every moment, can we find where it is? This reverse process leads to integrals.
What is an antiderivative?
A function $F$ is an antiderivative of $f$ on an interval if
$F'(x)=f(x)$
for every $x$ in the interval.
For example, $F(x)=x^2$ is an antiderivative of $f(x)=2x$, because the derivative of $x^2$ is $2x$.
But $x^2$ is not the only one. The functions $x^2+5$ and $x^2-\pi$ also have derivative $2x$, because the derivative of a constant is $0$.
A function is always an antiderivative of its own derivative. So:
- $f$ is an antiderivative of $f'$.
- $f'$ is an antiderivative of $f''$, and so on.
So if we know $f''$, we can go back one step at a time: from $f''$ to $f'$, then from $f'$ to $f$ (see Example 4 below).
All antiderivatives differ by a constant
In the Mean Value Theorem, we saw that two functions with the same derivative on an interval differ by a constant. So we get every antiderivative from one of them.
Theorem: If $F$ is an antiderivative of $f$ on an interval, then every antiderivative of $f$ on that interval has the form
$F(x)+C$,
where $C$ is a constant.
We call $F(x)+C$ the general antiderivative of $f$. For example, the general antiderivative of $2x$ is $x^2+C$.
On a graph, the antiderivatives form a family of curves. Each curve is the same curve shifted up or down.
Antiderivative formulas
Each derivative formula, read backward, gives an antiderivative formula. Here $F$ and $G$ are antiderivatives of $f$ and $g$:
| Function | General antiderivative |
|---|---|
| $x^n$ ($n\ne -1$) | $\dfrac{x^{n+1}}{n+1}+C$ |
| $\dfrac{1}{x}$ | $\ln|x|+C$ |
| $e^x$ | $e^x+C$ |
| $\cos x$ | $\sin x+C$ |
| $\sin x$ | $-\cos x+C$ |
| $\sec^2 x$ | $\tan x+C$ |
| $\sec x\tan x$ | $\sec x+C$ |
| $c\,f(x)$ | $c\,F(x)+C$ |
| $f(x)+g(x)$ | $F(x)+G(x)+C$ |
The first formula is the power rule backward: add $1$ to the exponent, then divide by the new exponent. It does not work for $n=-1$, because that would divide by $0$. The antiderivative of $x^{-1}=1/x$ is $\ln|x|$ instead (see derivatives of exponential and logarithmic functions).
Always check your answer by differentiating it. You should get back the original function.
Example 1: Find the general antiderivative of each function.
(a) $f(x)=x^3$
(b) $f(x)=\dfrac{1}{x^2}$
(c) $f(x)=\sqrt{x}$
Solution:
(a) Add $1$ to the exponent, and divide by the new exponent:
$F(x)=\dfrac{x^{3+1}}{3+1}+C=\dfrac{x^4}{4}+C$
(b) Write $\dfrac{1}{x^2}=x^{-2}$. Add $1$ to the exponent, and divide by the new exponent:
$\begin{align*}&F(x)\\&=\dfrac{x^{-2+1}}{-2+1}+C\\&=\dfrac{x^{-1}}{-1}+C\\&=-\dfrac{1}{x}+C\end{align*}$
(c) Write $\sqrt{x}=x^{1/2}$. Add $1$ to the exponent, and divide by the new exponent:
$\begin{align*}&F(x)\\&=\dfrac{x^{1/2+1}}{1/2+1}+C\\&=\dfrac{x^{3/2}}{3/2}+C\\&=\dfrac{2}{3}x^{3/2}+C\end{align*}$
Check (c):
$\begin{align*}&\dfrac{d}{dx}\left(\dfrac{2}{3}x^{3/2}\right)\\&=\dfrac{2}{3}\cdot\dfrac{3}{2}x^{1/2}\\&=\sqrt{x}\end{align*}$
Example 2: Find the general antiderivative of each function.
(a) $f(x)=3x^2-4x+5$
(b) $g(x)=2\cos x-\dfrac{3}{x}+e^x$
Solution:
Find an antiderivative of each term. One constant $C$ at the end is enough.
(a)
$\begin{align*}&F(x)\\&=3\cdot\dfrac{x^{2+1}}{2+1}-4\cdot\dfrac{x^{1+1}}{1+1}+5x+C\\&=3\cdot\dfrac{x^3}{3}-4\cdot\dfrac{x^2}{2}+5x+C\\&=x^3-2x^2+5x+C\end{align*}$
(b)
$G(x)=2\sin x-3\ln|x|+e^x+C$
(This works on any interval that does not contain $0$.)
Finding one particular antiderivative
Sometimes we know one value of the function, too. Then we can find the constant $C$. A problem like this is called an initial value problem.
Example 3: Find $f(x)$ if
$f'(x)=6x^2-2x$ and $f(1)=4$.
Solution:
The general antiderivative:
$\begin{align*}&f(x)\\&=6\cdot\dfrac{x^{2+1}}{2+1}-2\cdot\dfrac{x^{1+1}}{1+1}+C\\&=6\cdot\dfrac{x^3}{3}-2\cdot\dfrac{x^2}{2}+C\\&=2x^3-x^2+C\end{align*}$
Use $f(1)=4$ to find $C$:
$\begin{align*}2(1)^3-(1)^2+C&=4\\1+C&=4\\C&=3\end{align*}$
So $f(x)=2x^3-x^2+3$.
Example 4: Find $f(x)$ if
$f''(x)=12x-4$,
$f'(0)=1$, and $f(0)=2$.
Solution:
Go back one step at a time. First, find $f'$:
$\begin{align*}&f'(x)\\&=12\cdot\dfrac{x^{1+1}}{1+1}-4x+C_1\\&=12\cdot\dfrac{x^2}{2}-4x+C_1\\&=6x^2-4x+C_1\end{align*}$
Since $f'(0)=1$, we get $C_1=1$. So $f'(x)=6x^2-4x+1$.
Now find $f$:
$\begin{align*}&f(x)\\&=6\cdot\dfrac{x^{2+1}}{2+1}-4\cdot\dfrac{x^{1+1}}{1+1}+x+C_2\\&=6\cdot\dfrac{x^3}{3}-4\cdot\dfrac{x^2}{2}+x+C_2\\&=2x^3-2x^2+x+C_2\end{align*}$
Since $f(0)=2$, we get $C_2=2$. So
$f(x)=2x^3-2x^2+x+2$.
Each step back brings a new constant. So we need two known values to find $f$ from $f''$.
Motion
Velocity is the derivative of position, and acceleration is the derivative of velocity. So going backward:
- Position $s(t)$ is an antiderivative of velocity $v(t)$.
- Velocity $v(t)$ is an antiderivative of acceleration $a(t)$.
Example 5: A ball is thrown straight up from $2$ m above the ground, with a speed of $19.6$ m/s. Gravity gives it a constant acceleration of $-9.8$ m/s$^2$ (negative because it points down). Find its height $s(t)$. When does it hit the ground?
Solution:
First, let us picture what happens.
The ball leaves the hand $2$ m above the ground. It moves up, but gravity slows it down. At the top, it stops for a moment. Then it falls back down, faster and faster, until it hits the ground.
Time $t$ is in seconds. We start the clock when the ball leaves the hand, so $t=0$ is the moment of the throw.
$s(t)$ is the height of the ball above the ground, in meters (m). At the start, the height is $2$ m.
Velocity is speed with a sign: $+$ for up, $-$ for down. The ball starts moving up at $19.6$ m/s (meters per second), so its starting velocity is $+19.6$ m/s.
Acceleration tells how fast the velocity changes. Gravity makes the velocity go down by $9.8$ m/s every second. So the acceleration is $-9.8$ m/s$^2$ (meters per second, per second).
Start with acceleration, $a(t)=-9.8$.
The velocity is an antiderivative of acceleration:
$v(t)=-9.8t+C_1$
At $t=0$, the velocity is $19.6$:
$\begin{align*}v(0)&=19.6\\-9.8(0)+C_1&=19.6\\C_1&=19.6\end{align*}$
So
$v(t)=-9.8t+19.6$.
The position is an antiderivative of the velocity:
$\begin{align*}&s(t)\\&=-9.8\cdot\dfrac{t^{1+1}}{1+1}+19.6t+C_2\\&=-9.8\cdot\dfrac{t^2}{2}+19.6t+C_2\\&=-4.9t^2+19.6t+C_2\end{align*}$
At $t=0$, the height is $2$:
$\begin{align*}s(0)&=2\\-4.9(0)^2+19.6(0)+C_2&=2\\C_2&=2\end{align*}$
So
$\boxed{s(t)=-4.9t^2+19.6t+2}$.
We used this same ball in Example 5 of maximum and minimum values. There, the formula for its height was given. Here, we found that formula ourselves, starting from gravity.
When the ball hits the ground, its height is $0$. So $s(t)=0$.
To find the time, set $s(t)=0$, and solve for $t$:
$-4.9t^2+19.6t+2=0$
This is a quadratic equation of the form
$at^2+bt+c=0$,
where
$a=-4.9,\quad b=19.6,\quad c=2$.
Use the quadratic formula:
$t=\dfrac{-b\pm\sqrt{b^2-4ac}}{2a}$
Put in the values of $a$, $b$, and $c$:
$\begin{align*}&t\\&=\dfrac{-19.6\pm\sqrt{19.6^2-4(-4.9)(2)}}{2(-4.9)}\\&=\dfrac{-19.6\pm\sqrt{384.16+39.2}}{-9.8}\\&=\dfrac{-19.6\pm\sqrt{423.36}}{-9.8}\\&\approx\dfrac{-19.6\pm 20.58}{-9.8}\end{align*}$
The $\pm$ sign gives two times.
First, with $+$:
$\begin{align*}t&\approx\dfrac{-19.6+20.58}{-9.8}\\&=\dfrac{0.98}{-9.8}\\&\approx -0.10\ \text{s}\end{align*}$
Next, with $-$:
$\begin{align*}t&\approx\dfrac{-19.6-20.58}{-9.8}\\&=\dfrac{-40.18}{-9.8}\\&\approx 4.10\ \text{s}\end{align*}$
The ball is thrown at $t=0$, so the time must be positive. The negative time is before the throw, so we drop it. The ball hits the ground at
$t\approx\boxed{4.10\ \text{s}}$.
Summary
- $F$ is an antiderivative of $f$ if $F'=f$.
- The general antiderivative is $F(x)+C$. All antiderivatives differ by a constant.
- Read the derivative formulas backward. For powers: add $1$ to the exponent, and divide by the new exponent ($n\ne -1$).
- Check an antiderivative by differentiating it.
- A known value of the function lets you find $C$.