It is given that
∫cos √x dx
Take √x = t
So we get
1/2√x dx = dt
By cross multiplication
dx = 2 √x dt
Here dx = 2t dt
It can be written as
∫cos √x dx = 2 ∫t cos t dt
Take first function as t and second function as cos t

By integrating w.r.t t
= 2(t sin t – ∫sin t dt)
We get
= 2t sin t + 2cos t + c
Now by substituting t as √x
= 2√x sin √x + 2 cos √x + c
Taking 2 as common
= 2(cos √x + √x sin √x) + c