Problem 93
Medium Exponential and Logarithmic

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.

  1. Rewrite $\tan x$ as $\dfrac{\sin x}{\cos x}$.
  2. Substitute $u=\cos x$.
  3. Integrate using the standard logarithmic antiderivative.
  4. 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

Result

The solution to the integral is:

$$ I = -\ln|\cos x| + C. $$