# How do you integrate int cossqrtx using integration by parts?

Oct 27, 2016

$\int \cos \left(\sqrt{x}\right) \mathrm{dx} = 2 \sqrt{x} \sin \left(\sqrt{x}\right) + 2 \cos \left(\sqrt{x}\right) + C$

#### Explanation:

$I = \int \cos \left(\sqrt{x}\right) \mathrm{dx}$

We will first use the substitution $t = \sqrt{x}$. This implies that ${t}^{2} = x$, which we differentiate to see that $2 t \mathrm{dt} = \mathrm{dx}$. Thus:

$I = \int \cos \left(t\right) \left(2 t \mathrm{dt}\right) = 2 \int t \cos \left(t\right) \mathrm{dt}$

We should now use integration by parts, which takes the form $\int u \mathrm{dv} = u v - \int v \mathrm{du}$. For the integral $\int t \cos \left(t\right) \mathrm{dt}$, let:

$\left\{\begin{matrix}u = t \text{ "=>" "du=dt \\ dv=cos(t)dt" "=>" } v = \sin \left(t\right)\end{matrix}\right.$

So:

$I = 2 \left[t \sin \left(t\right) - \int \sin \left(t\right) \mathrm{dt}\right]$

Since $\int \sin \left(t\right) = - \cos \left(t\right) + C$:

$I = 2 \left[t \sin \left(t\right) + \cos \left(t\right)\right] + C$

Since $t = \sqrt{x}$:

$I = 2 \sqrt{x} \sin \left(\sqrt{x}\right) + 2 \cos \left(\sqrt{x}\right) + C$