2

I want to solve this indefinite integral: $$\int \cos^2(x)dx$$

I tried doing integration by parts with $u=\cos x$ and $dv=\cos xdx$, and again with $u=\cos^2x$ and $dv=dx$, but with no luck either way. No obvious substitutions to be made, either- what do I do?

dustin
  • 8,241
Asker
  • 1,327

2 Answers2

6

Use that $$\cos^2x=\frac{1+\cos(2x)}{2}.$$

Spenser
  • 19,469
3

Using the half-angle formula for the cosine gives the easiest way to do this, but using integration by parts will also work:

With $u=\cos x$ and $dv=\cos x dx$, you get

$\int\cos^{2}x dx=\cos x\sin x-\int(-\sin^2 x) dx=\cos x\sin x+\int(1-\cos^{2}x) dx$

$\hspace{.7 in}=\cos x\sin x+x-\int\cos^2 xdx$, so

$2\int\cos^2 xdx=\cos x\sin x+x+C$ and so $\int\cos^2 x dx=\frac{1}{2}(x+\cos x\sin x)+C$

user84413
  • 27,211