Evaluate the integral: I = integral cos(ln x) dx
Evaluate the integral: $$ I = \int \cos(\ln x)\,dx. $$
Explanation of Method
Substituting $t=\ln x$ (so $x=e^t$) converts the integral into $\int e^t\cos t\,dt$, resolved by the same self-referential integration-by-parts technique used in Problem 162.
- Substitute $t=\ln x$.
- Apply integration by parts twice to $\int e^t\cos t\,dt$.
- Solve algebraically for the integral.
- Substitute back and simplify.
Step 1 · Substitution
Let $t=\ln x$, so $x=e^t$ and $dx=e^t\,dt$:
$$ I = \int \cos(\ln x)\,dx = \int \cos t\cdot e^t\,dt. $$
Step 2 · First integration by parts
Let $u=\cos t$, $dv=e^t dt$, so $du=-\sin t\,dt$, $v=e^t$:
$$ \int e^t\cos t\,dt = e^t\cos t + \int e^t\sin t\,dt. $$
Step 3 · Second integration by parts
For $\displaystyle\int e^t\sin t\,dt$, let $u=\sin t$, $dv=e^t dt$, so $du=\cos t\,dt$, $v=e^t$:
$$ \int e^t\sin t\,dt = e^t\sin t - \int e^t\cos t\,dt. $$
Step 4 · Solve for the integral
Substituting back, and writing $I$ for $\int e^t\cos t\,dt$:
$$ I = e^t\cos t + \left(e^t\sin t - I\right) \quad \Rightarrow \quad 2I = e^t(\sin t+\cos t). $$
So:
$$ I = \frac{e^t}{2}(\sin t+\cos t) + C. $$
Substituting back $t=\ln x$, $e^t=x$:
$$ I = \frac{x}{2}\left(\sin(\ln x)+\cos(\ln x)\right) + C. $$
Summary Table
| Quantity | Value |
|---|---|
| Substitution | $t=\ln x,\;x=e^t$ |
| Reduced integral | $\int e^t\cos t\,dt$ |
| Antiderivative (in $t$) | $\tfrac{e^t}{2}(\sin t+\cos t)$ |
Additional Notes
- The domain requires $x>0$.
- Comparing to Problem 162: swapping $\sin\leftrightarrow\cos$ in the integrand flips the sign between the two terms of the final answer, since the self-referential IBP produces a $+$ combination here versus a $-$ combination there.
- The result can be checked by differentiating $\tfrac{x}{2}(\sin(\ln x)+\cos(\ln x))$ and confirming it returns $\cos(\ln x)$.
Result
The solution to the integral is: