Integral of $$$\cos{\left(\ln\left(x\right) \right)}$$$
Related calculator: Definite and Improper Integral Calculator
Your Input
Find $$$\int \cos{\left(\ln\left(x\right) \right)}\, dx$$$.
Solution
For the integral $$$\int{\cos{\left(\ln{\left(x \right)} \right)} d x}$$$, use integration by parts $$$\int \operatorname{u} \operatorname{dv} = \operatorname{u}\operatorname{v} - \int \operatorname{v} \operatorname{du}$$$.
Let $$$\operatorname{u}=\cos{\left(\ln{\left(x \right)} \right)}$$$ and $$$\operatorname{dv}=dx$$$.
Then $$$\operatorname{du}=\left(\cos{\left(\ln{\left(x \right)} \right)}\right)^{\prime }dx=- \frac{\sin{\left(\ln{\left(x \right)} \right)}}{x} dx$$$ (steps can be seen ») and $$$\operatorname{v}=\int{1 d x}=x$$$ (steps can be seen »).
Thus,
$${\color{red}{\int{\cos{\left(\ln{\left(x \right)} \right)} d x}}}={\color{red}{\left(\cos{\left(\ln{\left(x \right)} \right)} \cdot x-\int{x \cdot \left(- \frac{\sin{\left(\ln{\left(x \right)} \right)}}{x}\right) d x}\right)}}={\color{red}{\left(x \cos{\left(\ln{\left(x \right)} \right)} - \int{\left(- \sin{\left(\ln{\left(x \right)} \right)}\right)d x}\right)}}$$
Apply the constant multiple rule $$$\int c f{\left(x \right)}\, dx = c \int f{\left(x \right)}\, dx$$$ with $$$c=-1$$$ and $$$f{\left(x \right)} = \sin{\left(\ln{\left(x \right)} \right)}$$$:
$$x \cos{\left(\ln{\left(x \right)} \right)} - {\color{red}{\int{\left(- \sin{\left(\ln{\left(x \right)} \right)}\right)d x}}} = x \cos{\left(\ln{\left(x \right)} \right)} - {\color{red}{\left(- \int{\sin{\left(\ln{\left(x \right)} \right)} d x}\right)}}$$
For the integral $$$\int{\sin{\left(\ln{\left(x \right)} \right)} d x}$$$, use integration by parts $$$\int \operatorname{u} \operatorname{dv} = \operatorname{u}\operatorname{v} - \int \operatorname{v} \operatorname{du}$$$.
Let $$$\operatorname{u}=\sin{\left(\ln{\left(x \right)} \right)}$$$ and $$$\operatorname{dv}=dx$$$.
Then $$$\operatorname{du}=\left(\sin{\left(\ln{\left(x \right)} \right)}\right)^{\prime }dx=\frac{\cos{\left(\ln{\left(x \right)} \right)}}{x} dx$$$ (steps can be seen ») and $$$\operatorname{v}=\int{1 d x}=x$$$ (steps can be seen »).
The integral becomes
$$x \cos{\left(\ln{\left(x \right)} \right)} + {\color{red}{\int{\sin{\left(\ln{\left(x \right)} \right)} d x}}}=x \cos{\left(\ln{\left(x \right)} \right)} + {\color{red}{\left(\sin{\left(\ln{\left(x \right)} \right)} \cdot x-\int{x \cdot \frac{\cos{\left(\ln{\left(x \right)} \right)}}{x} d x}\right)}}=x \cos{\left(\ln{\left(x \right)} \right)} + {\color{red}{\left(x \sin{\left(\ln{\left(x \right)} \right)} - \int{\cos{\left(\ln{\left(x \right)} \right)} d x}\right)}}$$
We've arrived to an integral that we already saw.
Thus, we've obtained the following simple equation with respect to the integral:
$$\int{\cos{\left(\ln{\left(x \right)} \right)} d x} = x \sin{\left(\ln{\left(x \right)} \right)} + x \cos{\left(\ln{\left(x \right)} \right)} - \int{\cos{\left(\ln{\left(x \right)} \right)} d x}$$
Solving it, we get that
$$\int{\cos{\left(\ln{\left(x \right)} \right)} d x} = \frac{x \left(\sin{\left(\ln{\left(x \right)} \right)} + \cos{\left(\ln{\left(x \right)} \right)}\right)}{2}$$
Therefore,
$$\int{\cos{\left(\ln{\left(x \right)} \right)} d x} = \frac{x \left(\sin{\left(\ln{\left(x \right)} \right)} + \cos{\left(\ln{\left(x \right)} \right)}\right)}{2}$$
Simplify:
$$\int{\cos{\left(\ln{\left(x \right)} \right)} d x} = \frac{\sqrt{2} x \sin{\left(\ln{\left(x \right)} + \frac{\pi}{4} \right)}}{2}$$
Add the constant of integration:
$$\int{\cos{\left(\ln{\left(x \right)} \right)} d x} = \frac{\sqrt{2} x \sin{\left(\ln{\left(x \right)} + \frac{\pi}{4} \right)}}{2}+C$$
Answer
$$$\int \cos{\left(\ln\left(x\right) \right)}\, dx = \frac{\sqrt{2} x \sin{\left(\ln\left(x\right) + \frac{\pi}{4} \right)}}{2} + C$$$A