$\frac{x}{2}(\sin (\log x)-\cos (\log x))+\mathrm{c}$,
(where c is a constant of integration)
$\quad x(\cos (\log x)-\sin (\log x))+\mathrm{c}$,
(where c is a constant of integration)
$\frac{x}{2}(\cos (\log x)+\sin (\log x))+\mathrm{c}$,
(where c is a constant of integration)
$\quad x(\cos (\log x)+\sin (\log x))+\mathrm{c}$,
(where c is a constant of integration)
Solution
Let $\mathrm{I}=\int \cos (\log x) \mathrm{d} x$
Put $\log _{\mathrm{e}} x=\mathrm{t} \Rightarrow x=\mathrm{e}^{\mathrm{t}} \Rightarrow \mathrm{d} x=\mathrm{e}^{\mathrm{t}} \mathrm{dt}$
$\begin{aligned}
\therefore \quad I & =\int \cos t \cdot e^t d t \\
& =\cos t \cdot e^t-\int(-\sin t) \cdot e^t d t \\
& =\cos t \cdot e^t+\left[\sin t \cdot e^t-\int \cos t \cdot e^t d t\right] \\
\therefore \quad I & =\cos t \cdot e^t+\sin t \cdot e^t-I+c_1 \\
& \Rightarrow 2 I=\cos t \cdot e^t+\sin t \cdot e^t+c_1 \\
& \Rightarrow I=\frac{x}{2}\left[\cos \left(\log _e x\right)+\sin \left(\log _e x\right)\right]+c, \text { where } c=\frac{c_1}{2}
\end{aligned}$