Use basic trig, exponential, and logarithmic antiderivatives
Which curve has the slope of the sine curve?
The top graph shows \(f(x) = \sin x\) from 0 to \(\pi\), with \(x\) in radians. You look for a curve whose slope at every \(x\) is the height of this curve.
The height is 0 at both ends and 1 at \(x = \tfrac{\pi}{2}\), and it is never negative, so the curve you look for never falls. The teal curve \(\cb{-\cos x}\) fits: it starts at \(-1\), rises most steeply in the middle and flattens at height 1. Its short dashes show the slope the top curve asks for, and they are orange because the curve runs along them.
Press "Try cos x". This curve starts at 1 and falls, so the dashes turn red where it cuts across them. The slope of \(\cos x\) is \(-\sin x\), the opposite sign, so the minus sign in \(-\cos x\) makes the slope \(\sin x\).
Every derivative fact, read backwards
The top graph shows a function f, and the teal curve below shows an antiderivative F. Press each button to see one function and its antiderivative.
The orange segments on the teal curve have the slopes that the top curve asks for, and they lie along the curve in every case. The slope of an antiderivative equals the height of f, so each case is a derivative fact read backwards.
For \(e^x\), the two curves are the same, because the slope of \(e^x\) at each point equals its height.
For \(\tfrac1x\), both curves break at 0 into two pieces. On the left the teal curve \(\ln|x|\) falls, because \(\tfrac1x\) is negative there.
Notation
The derivative of \(\cos x\) is \(-\sin x\), so \(-\cos x\) has derivative \(\sin x\).
\[\frac{d}{dx}\big(\cb{-\cos x}\big) = \cy{\sin x}\]The derivative of \(\sin x\) is \(\cos x\).
\[\frac{d}{dx}\big(\cb{\sin x}\big) = \cy{\cos x}\]The derivative of \(\tan x\) is \(\sec^2 x\). This holds on each interval where \(\tan x\) exists.
\[\frac{d}{dx}\big(\cb{\tan x}\big) = \cy{\sec^2 x}\]The function \(e^x\) is its own derivative, so it is its own antiderivative.
\[\frac{d}{dx}\big(\cb{e^x}\big) = \cy{e^x}\]The derivative of \(\ln|x|\) is \(\tfrac1x\) for every \(x\) except 0. Write \(\ln|x|\), not \(\ln x\), so that the antiderivative exists wherever \(\tfrac1x\) does.
\[\frac{d}{dx}\big(\cb{\ln|x|}\big) = \cy{\frac{1}{x}}\]
When it fails
The top graph shows \(\tfrac1x\) on both sides of 0. The curve \(\ln x\) exists only for \(x > 0\), so nothing is drawn on the left.
On the left, \(\tfrac1x\) is negative, so an antiderivative must fall there. For \(x < 0\), \(\ln|x|\) is \(\ln(-x)\), which is \(\ln x\) reflected to the left of 0, and it falls. By the chain rule its slope is \(\tfrac{-1}{-x} = \tfrac1x\), so the orange segments lie along it.
Example 1: Sine and the exponential
Find an antiderivative of \(f(x) = 2\sin x + 5e^x\).
Find an antiderivative of each term. Keep each constant factor.
The antiderivative of \(\sin x\) is \(-\cos x\). Multiply it by 2. The orange segments still cut across it, because the second term is missing.
\[2\cdot(-\cos x) = \cb{-2\cos x}\]The antiderivative of \(e^x\) is \(e^x\). Multiply it by 5. With both terms, every segment lies along the curve.
\[5\cdot e^x = \cb{5e^x}\]Add the results. Differentiate to check: the derivative of \(-2\cos x\) is \(+2\sin x\), so the signs match.
\[\begin{aligned} F(x) &= -2\cos x + 5e^x \\ F'(x) &= 2\sin x + 5e^x \end{aligned}\]
Example 2: A reciprocal on the negative side
Find an antiderivative of \(f(x) = \dfrac{6}{x} + 4\cos x\) for \(x < 0\).
Match each term to a basic antiderivative. The term \(\tfrac6x\) is 6 times \(\tfrac1x\), and \(4\cos x\) is 4 times cosine.
A tempting wrong move: Use \(\ln x\) for the term \(\tfrac6x\).
\[6\ln x + 4\sin x\]The interval is \(x < 0\), and \(\ln x\) does not exist for negative \(x\). This candidate has no graph where \(f\) does.
Use \(\ln|x|\), which exists for every \(x\) except 0.
\[6\cdot\ln|x| = \cb{6\ln|x|}\]The antiderivative of \(\cos x\) is \(\sin x\). Multiply it by 4. With both terms, every segment lies along the curve.
\[4\cdot\sin x = \cb{4\sin x}\]Add the terms. As a check at \(x = -2\), the term \(6\ln|x|\) has slope \(\tfrac{6}{-2} = -3\), which is the value of \(\tfrac6x\) there.
\[\begin{aligned} F(x) &= 6\ln|x| + 4\sin x \\ F'(x) &= \frac{6}{x} + 4\cos x \end{aligned}\]
Practice
Find an antiderivative of \(f(x) = \sec^2 x + 3\cos x - \dfrac{4}{x}\) for \(0 < x < \dfrac{\pi}{2}\).
Each term is a constant times one of the five basic functions. Slide the three coefficients until every orange segment lies along the teal curve.
Solution
The antiderivative of \(\sec^2 x\) is \(\tan x\), of \(3\cos x\) it is \(3\sin x\), and of \(-\tfrac4x\) it is \(-4\ln|x|\), with the minus sign kept in front.
Add the three results. On this interval \(x > 0\), so \(\ln|x| = \ln x\).
\[F(x) = \tan x + 3\sin x - 4\ln|x|\]Differentiate to check.
\[F'(x) = \sec^2 x + 3\cos x - \frac{4}{x}\]
Questions
Questions 1 and 2 use \(f(x) = \cos x\) from 0 to \(2\pi\), with \(x\) in radians. The teal curve below is a candidate for an antiderivative, and its dashes show the slope that the top curve asks for at each \(x\).
The teal curve is \(F(x) = \sin x\). At which \(x\) does it have slope \(-1\)?
- \(\pi\)
- \(\tfrac{\pi}{2}\)
- \(\tfrac{3\pi}{2}\)
- \(2\pi\)
Answer
\(\pi\)
The teal curve is \(F(x) = -\sin x\). Its dashes are red. What is wrong?
- Its slope is \(-\cos x\), the opposite of what the top curve asks
- It needs a constant added
- Nothing is wrong, because the slope of sine is cosine
Answer
Its slope is \(-\cos x\), the opposite of what the top curve asks
Which function is an antiderivative of \(f(x) = 4e^x + 2\sin x\)?
- \(4e^x - 2\cos x\)
- \(4e^x + 2\cos x\)
- \(\dfrac{4e^{x+1}}{x+1} - 2\cos x\)
Answer
\(4e^x - 2\cos x\)
Summary
You match each term to a basic antiderivative: \(-\cos x\) for \(\sin x\), \(\sin x\) for \(\cos x\), \(e^x\) for \(e^x\), \(\tan x\) for \(\sec^2 x\) and \(\ln|x|\) for \(\tfrac1x\).
This works because each antiderivative is a derivative fact read backwards, and you check it by differentiating.
You use it whenever a term is a constant times one of these five functions, with x in radians for the trigonometric ones.
This is one of five skills in topic 6.8 of Which & Why: AP Calculus.