Problem 166
Evaluate the integral: I = integral x/(cos²x) dx
Evaluate the integral: $$ I = \int \frac{x}{\cos^2x}\,dx. $$
Explanation of Method
Rewriting $1/\cos^2x=\sec^2x$ and applying integration by parts with $u=x$, $dv=\sec^2x\,dx$ leaves a leftover integral of $\tan x$ alone, which is a standard logarithmic result.
- Choose $u=x$, $dv=\sec^2x\,dx$.
- Differentiate $u$ and integrate $dv$.
- Apply the integration by parts formula and integrate the remainder.
Step 1 · Set up integration by parts
Let:
$$ u = x \quad \Rightarrow \quad du = dx, \qquad dv = \sec^2x\,dx \quad \Rightarrow \quad v = \tan x. $$
Step 2 · Apply the formula
$$ I = x\tan x - \int \tan x\,dx. $$
Step 3 · Integrate
Recall the standard result $\int \tan x\,dx = -\ln|\cos x|$:
$$ I = x\tan x - \left(-\ln|\cos x|\right) + C = x\tan x + \ln|\cos x| + C. $$
Summary Table
| Quantity | Value |
|---|---|
| $u$ | $x$ |
| $dv$ | $\sec^2x\,dx$ |
| Antiderivative | $x\tan x+\ln|\cos x|$ |
Additional Notes
- The domain excludes $x=\tfrac\pi2+k\pi$ for integer $k$, where $\cos x=0$.
- A common sign slip here is recalling $\int\tan x\,dx=\ln|\cos x|$ instead of the correct $-\ln|\cos x|$; differentiating $\ln|\cos x|$ gives $-\tan x$, the negative of the integrand, which is a quick way to catch the error.
- The result can be checked by differentiating $x\tan x+\ln|\cos x|$: this gives $\tan x+x\sec^2x-\tan x=x\sec^2x=x/\cos^2x$, matching the integrand.
Result
The solution to the integral is:
$$
I = x\tan x + \ln|\cos x| + C.
$$