# How do you integrate (sqrt x) * (cos sqrt x) ?

Apr 1, 2018

The answer is $= 2 x \sin \left(\sqrt{x}\right) + 4 \sqrt{x} \cos \left(\sqrt{x}\right) - 4 \sin \left(\sqrt{x}\right) + C$

#### Explanation:

Perform the substitution

Let $u = \sqrt{x}$, $\implies$, $\mathrm{du} = \frac{1}{2 \sqrt{x}} \mathrm{dx}$

The integral is

$I = \int \sqrt{x} \cos \left(\sqrt{x}\right) \mathrm{dx} = \int u \cdot \cos u 2 u \mathrm{du} = 2 \int {u}^{2} \cos u \mathrm{du}$

Perform the integration by parts

$\int f g ' = f g - \int f ' g$

$f = {u}^{2}$, $\implies$, $f ' = 2 u$

$g ' = \cos u$, $\implies$, $g = \sin u$

Therefore,

$I = 2 {u}^{2} \sin u - 4 \int u \sin u \mathrm{du}$

Perform the integration by parts once more,

$f = u$, $\implies$, $f ' = 1$

$g ' = \sin u$, $\implies$, $g = - \cos u$

$\int u \sin u \mathrm{du} = - u \cos u + \int \cos u \mathrm{du} = - u \cos u + \sin u$

And finally,

$I = 2 {u}^{2} \sin u - 4 \left(- u \cos u + \sin u\right) = 2 {u}^{2} \sin u + 4 u \cos u - 4 \sin u$

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

Apr 1, 2018

$\int \left(\sqrt{x}\right) \cdot \left(\cos \sqrt{x}\right) \mathrm{dx}$ color(white)(wwwwwwwww Let $\sqrt{x} = t = {x}^{\frac{1}{2}}$
$\int \frac{x}{\sqrt{x}} \cdot \cos \sqrt{x} \mathrm{dx}$color(white)(wwwwwwwhwwww$\implies \mathrm{dt} = \frac{1}{2} \cdot {x}^{- \frac{1}{2}} \mathrm{dx}$
color(white)(wwwwwwwwwwwwwwwwwwwwww$\implies \mathrm{dt} = \frac{1}{2 \sqrt{x}} \mathrm{dx}$
color(white)(wwwwwwwwwwwwwwwwwwwwww$\implies 2 \mathrm{dt} = \frac{1}{\sqrt{x}} \mathrm{dx}$

$\implies 2 \int {t}^{2} \cdot \cos t \mathrm{dt}$

color(white)(wwwwwwwwwwwwwwwwwwwwww

Here, we'll use Integration by parts,

i.e. $\int \left(u v\right) \mathrm{dx} = u \int v \mathrm{dx} - \int \left(\frac{\mathrm{du}}{\mathrm{dx}} \int v \mathrm{dx}\right) \mathrm{dx}$

color(white)(wwwwwwwwwwwwwwwwwwwwww

Integrating $\int {t}^{2} \cdot \cos t \mathrm{dt}$ by parts,

$\implies 2 \left[{t}^{2} \cdot \int \cos t \mathrm{dt} - \int \left({\mathrm{dt}}^{2} / \mathrm{dt} \cdot \int \cos t \mathrm{dt}\right) \mathrm{dt}\right]$

$\implies 2 \left[{t}^{2} \cdot \sin t - 2 \int \left(t \cdot \sin t\right) \mathrm{dt}\right]$

$\implies 2 {t}^{2} \cdot \sin t - 4 \int \left(t \cdot \sin t\right) \mathrm{dt}$

color(white)(wwwwwwwwwwwwwwwwwwwwww

Again integrating $\int \left(t \cdot \sin t\right) \mathrm{dt}$ by parts,

$\implies 2 {t}^{2} \cdot \sin t - 4 \left[t \cdot \int \sin t \mathrm{dt} - \int \left(\frac{\mathrm{dt}}{\mathrm{dt}} \cdot \int \sin t \mathrm{dt}\right) \mathrm{dt}\right]$

$\implies 2 {t}^{2} \cdot \sin t - 4 \left[t \left(- \cos t\right) - \int \left(- \cos t\right) \mathrm{dt}\right]$

$\implies 2 {t}^{2} \cdot \sin t + 4 t \cos t - 4 \sin t$

Replacing, $t = {x}^{\frac{1}{2}}$

$\implies 2 x \cdot \sin \sqrt{x} + 4 \sqrt{x} \cos \sqrt{x} - 4 \sin \sqrt{x} + C$

Apr 1, 2018

$I = 2 x \sin \sqrt{x} + 4 \sqrt{x} \cos \sqrt{x} - 4 \sin \sqrt{x} + C$,

#### Explanation:

We know that ,(Integration by Parts)

color(red)(int(u*v)dx=uintvdx-int(u^'intvdx)dx

Here,

$I = \int \sqrt{x} \cdot \cos \sqrt{x} \mathrm{dx}$

Let, $\sqrt{x} = t \implies x = {t}^{2} \implies \mathrm{dx} = 2 t \mathrm{dt}$

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

$= 2 \int {t}^{2} \cos t \mathrm{dt}$

Applying $\text{Integration by parts}$

$I = 2 \left[{t}^{2} \left(\sin t\right) - \int \left(2 t\right) \sin t \mathrm{dt}\right] + {c}_{1}$

$I = 2 {t}^{2} \sin t - 4 \int t \sin t \mathrm{dt} + {c}_{1}$

Again applying integration by parts

$I = 2 {t}^{2} \sin t - 4 \left[t \left(- \cos t\right) - \int 1 \left(- \cos t\right) \mathrm{dt} + {c}_{2}\right] + {c}_{1}$

$I = 2 {t}^{2} \sin t - 4 \left[t \left(- \cos t\right) + \sin t + {c}_{3} + {c}_{2}\right] + {c}_{1}$

$I = 2 {t}^{2} \sin t + 4 t \cos t - 4 \sin t - 4 {c}_{3} - 4 {c}_{2} + {c}_{1}$

$I = 2 x \sin \sqrt{x} + 4 \sqrt{x} \cos \sqrt{x} - 4 \sin \sqrt{x} + C$,

where,$C = {c}_{1} - 4 {c}_{2} - 4 {c}_{3}$