Answer
$$\frac{1}{2}x\cos \left( {\ln x} \right) + \frac{1}{2}x\sin \left( {\ln x} \right) + C$$
Work Step by Step
$$\eqalign{
& \int {\cos \left( {\ln x} \right)} dx \cr
& {\text{substitute }}u = \cos \left( {\ln x} \right),{\text{ }} \cr
& du = - \sin \left( {\ln x} \right)\left( {\frac{1}{x}} \right)dx \cr
& du = - \frac{{\sin \left( {\ln x} \right)}}{x}dx \cr
& dv = dx \cr
& v = x \cr
& \cr
& {\text{use integration by parts }} \cr
& uv - \int v du \cr
& = x\cos \left( {\ln x} \right) + \int {\frac{{x\sin \left( {\ln x} \right)}}{x}dx} \cr
& = x\cos \left( {\ln x} \right) + \int {\sin \left( {\ln x} \right)dx} \cr
& \cr
& {\text{substitute }}u = \sin \left( {\ln x} \right),{\text{ }} \cr
& du = \cos \left( {\ln x} \right)\left( {\frac{1}{x}} \right)dx \cr
& du = \frac{{\cos \left( {\ln x} \right)}}{x}dx \cr
& dv = dx \cr
& v = x \cr
& \cr
& {\text{use integration by parts }} \cr
& = x\cos \left( {\ln x} \right) + \left( {x\sin \left( {\ln x} \right) - \int {\frac{{x\cos \left( {\ln x} \right)}}{x}dx} } \right) \cr
& = x\cos \left( {\ln x} \right) + \left( {x\sin \left( {\ln x} \right) - \int {\cos \left( {\ln x} \right)dx} } \right) \cr
& \int {\cos \left( {\ln x} \right)dx} = x\cos \left( {\ln x} \right) + x\sin \left( {\ln x} \right) - \int {\cos \left( {\ln x} \right)dx} \cr
& {\text{solving for }}\int {\cos \left( {\ln x} \right)dx} \cr
& 2\int {\cos \left( {\ln x} \right)dx} = x\cos \left( {\ln x} \right) + x\sin \left( {\ln x} \right) \cr
& \int {\cos \left( {\ln x} \right)dx} = \frac{1}{2}x\cos \left( {\ln x} \right) + \frac{1}{2}x\sin \left( {\ln x} \right) + C \cr} $$