#### Provide Solution For  R.D.Sharma Maths Class 12 Chapter 18  Indefinite Integrals Exercise 18.25 Question 13 Maths Textbook Solution.

Answer: $\frac{x^{2}}{4}+\frac{x \sin (2 x)}{4}+\frac{\cos (2 x)}{8}+c$

Hint:Using integration by parts

$\int a b d x=a \int b d x-\int\left[\frac{d}{d x} a \int b d x\right] d x$

Given: $I=\int x \cos ^{2} x d x$

Solution: $\int x \cos ^{2} x d x=\int x \cdot \frac{1+\cos 2 x}{2} d x$

Break this integral apart now

\begin{aligned} &=\int x \cdot\left(\frac{1+\cos 2 x}{2}\right) d x \\ &=\int \frac{x}{2} d x+\int \frac{x \cos (2 x)}{2} d x \end{aligned}

Evaluate the integral part by part

\begin{aligned} &\int \frac{x}{2} d x=\frac{x^{2}}{4}+c \\ &\int \frac{x \cos (2 x)}{2} d x \end{aligned}

Integration by parts

Let $u=\frac{\cos (2 x)}{2}$

$\int u d x=\frac{\sin 2 x}{4}$

$\int \frac{x \cos (2 x)}{2} d x=\frac{x \cdot \sin (2 x)}{4}-\int \frac{\sin 2 x}{4} d x$

Now

$\int \frac{-\sin (2 x)}{4} d x=\frac{\cos (2 x)}{8}+c$

Combining all,

$\int x \cos ^{2}(x) d x=\frac{x^{2}}{4}+\frac{x \cdot \sin (2 x)}{4}+\frac{\cos (2 x)}{8}+c$