We know that cosxdx=dsinx, so we can rewrite out integral as

(Eq’n 1)

We next subject the right side of that integral to the process of integration by parts and get

(Eq’n 2)

Combining that equation with Equation 1 then gives us

(Eq’n 3)

which gives us in turn

(Eq’n 4)

We then integrate the integral on the right side of that equation by parts. That integration and the subsequent algebraic manipulation gives us

(Eq’n 5)

Combining that equation with Equation 4 gives us a new equation that enables us the discern the pattern in this integration;

(Eq’n 6)

When we reach the end of that series we have two final integrals,

(Eq’n 7)

and

(Eq’n 8)

Thus we get two series, depending upon whether n represents an even or an odd number. If n represents an even number, then we have

(Eq’n 9)

and if n represents an odd number, then we have

(Eq’n 10)

Thus we have the means of integrating any power of a cosine.

Appendix: Volume of a Tubular Intersection

We have two cylindrical tubes of radius R that intersect each other at a right angle in such a way that their centerlines cross each other. We let the centerline of one tube lie on our z-axis and the centerline of the other tube lie on our y-axis. The points common to the interiors of both tubes make up the set that we call the tubular intersection: if we look along the z- or y-axis, we see the cross section of the tubular intersection in the form of a circle, but if we look along the x-axis, we see the cross section of the tubular intersection in the form of a square.

To describe the tubular intersection algebraically we look
along the z-axis at the x-y plane and imagine drawing a straight line from the
center of the grid to the wall of the intersection. That line has length R and
makes an angle θ
with the y-axis. At a given value of x the square defined above has sides of
length 2Rcosθ,
given that we have θ=0
when the radial line lies on the y-axis and
θ=±ð/2
when the radial line lies on the x-axis. In that system x=Rsinθ,
so we have the differential as dx=Rcosθdθ.
The differential element of the tubular intersection’s volume thus comes to us
as dV=4R^{3}cos^{3}θdθ,
so we get the total volume as

(Eq’n A-1)

Comparing that result with the volume of a sphere of equal radius shows that the tubular intersection encloses a greater volume. Even better, we can build a container in the form of a tubular intersection more easily than we can build a container in the form of a sphere: to build a tubular intersection we simply cut sheet metal into four sections that we then bend on circular forms and weld together. In fact, the design of the crew compartment on the Apollo Program’s Lunar Excursion Module began with a tubular intersection.

abefab