Problem 93
Evaluate the integral: I = integral tan x dx
Evaluate the integral: $$ I = \int \tan x \, dx. $$
Explanation of Method
Writing $\tan x = \dfrac{\sin x}{\cos x}$ exposes a numerator-equals-derivative-of-denominator pattern (up to sign): the derivative of $\cos x$ is $-\sin x$, so substituting $u=\cos x$ reduces the integral directly to a logarithmic form.
- Rewrite $\tan x$ as $\dfrac{\sin x}{\cos x}$.
- Substitute $u=\cos x$.
- Integrate using the standard logarithmic antiderivative.
- Substitute back and add the constant of integration.
Step 1 · Rewrite in terms of sine and cosine
We recall that the tangent function can be rewritten as:
$$ \tan x = \frac{\sin x}{\cos x}. $$
Step 2 · Substitution
Using the substitution:
$$ u = \cos x, \quad du = -\sin x\,dx, $$
we rewrite the integral as:
$$ I = \int \frac{-du}{u}. $$
Step 3 · Integrate
The integral of $\dfrac{1}{u}$ is:
$$ I = -\ln|u| + C. $$
Step 4 · Substitute back
Substituting back $u = \cos x$:
$$ I = -\ln|\cos x| + C. $$
Summary Table
| Quantity | Value |
|---|---|
| Substitution | $u = \cos x$ |
| $\sin x\,dx$ in terms of $du$ | $-du$ |
| Antiderivative | $-\ln|u|$ |
Additional Notes
- The domain of $I$ excludes $x = \tfrac\pi2+k\pi$ for integer $k$, where $\cos x = 0$.
- An equivalent common form of the answer is $\ln|\sec x|+C$, since $-\ln|\cos x| = \ln|1/\cos x| = \ln|\sec x|$.
- The result can be checked by differentiating $-\ln|\cos x|$ with the chain rule and confirming it returns $\tan x$.
Result
The solution to the integral is:
$$
I = -\ln|\cos x| + C.
$$