$\int \cos \sqrt{x} \mathrm{~d} x=$ (where $C$ is a constant of integration.)
$\int \cos \sqrt{x} \mathrm{~d} x=$
(where $C$ is a constant of integration.)
$2[\sqrt{x} \sin \sqrt{x}+\cos \sqrt{x}]+C$
$[\sqrt{x} \sin \sqrt{x}-\cos \sqrt{x}]+C$
$2[\sqrt{x} \sin \sqrt{x}-\cos \sqrt{x}]+C$
$[\sqrt{x} \sin \sqrt{x}+\cos \sqrt{x}]+C$
Solution
$\int \cos \sqrt{x} d x$ let $\sqrt{x}=t$ i.e. $\mathrm{d} x=2 t \mathrm{~d} t$
$=2 \int t \cos t \mathrm{~d} t=2\left[t \sin t-\int \sin t \mathrm{~d} t\right]$ [integrating by parts]
$=2[t \cdot \sin t+\cos t]+C=2[\sqrt{x} \sin \sqrt{x}+\cos \sqrt{x}]+C$