# Solve the following indefinite integrals. \int (\cos \frac{x}{2}-\sin \frac{x}{2})^{2}dx

Solve the following indefinite integrals.
$$\displaystyle\int{\left({\cos{{\frac{{{x}}}{{{2}}}}}}-{\sin{{\frac{{{x}}}{{{2}}}}}}\right)}^{{{2}}}{\left.{d}{x}\right.}$$

• Questions are typically answered in as fast as 30 minutes

### Plainmath recommends

• Get a detailed answer even on the hardest topics.
• Ask an expert for a step-by-step guidance to learn to do it yourself.

likvau
To find:
The indefinite integral of $$\displaystyle\int{\left({\cos{{\left({\frac{{{x}}}{{{2}}}}\right)}}}-{\sin{{\left({\frac{{{x}}}{{{2}}}}\right)}}}\right)}^{{{2}}}{\left.{d}{x}\right.}$$.
Calculation:
The indefinite integral of $$\displaystyle\int{\left({\cos{{\left({\frac{{{x}}}{{{2}}}}\right)}}}-{\sin{{\left({\frac{{{x}}}{{{2}}}}\right)}}}\right)}^{{{2}}}{\left.{d}{x}\right.}$$ can be obtained as,
$$\displaystyle\int{\left({\cos{{\left({\frac{{{x}}}{{{2}}}}\right)}}}-{\sin{{\left({\frac{{{x}}}{{{2}}}}\right)}}}\right)}^{{{2}}}{\left.{d}{x}\right.}=\int{{\sin}^{{{2}}}{\left({\frac{{{x}}}{{{2}}}}\right)}}+{{\cos}^{{{2}}}{\left({\frac{{{x}}}{{{2}}}}\right)}}-{2}{\sin{{\left({\frac{{{x}}}{{{2}}}}\right)}}}{\cos{{\left({\frac{{{x}}}{{{2}}}}\right)}}}{\left.{d}{x}\right.}$$
$$\displaystyle=\int{1}-{\sin{{x}}}{\left.{d}{x}\right.}$$
$$\displaystyle={x}+{\cos{{x}}}+{C}$$
Thus, the integral of $$\displaystyle\int{\left({\cos{{\left({\frac{{{x}}}{{{2}}}}\right)}}}-{\sin{{\left({\frac{{{x}}}{{{2}}}}\right)}}}\right)}^{{{2}}}{\left.{d}{x}\right.}\ {i}{s}\ {x}+{\cos{{x}}}+{C}$$.