Doing trig integrals is usually pretty simple. This is because of the cyclic nature of the derivatives of trig functions. Let’s recall that:

{d/dx}sin x ~= ~cos x

{d/dx}cos x ~= ~-sin x

From here we can write down their anti-derivatives:

int{}{}{ sin(x) dx}~=~-cos(x)~=~C

The minus sign comes about because we integrated the derivative of cos x to get this result. That is

int{}{}{{d/dx}cos (x) dx}~=~cos(x) ~+~C

but this was equal to minus sin x. The other antiderivative is

int{}{}{ cos (x) dx}~=~sin(x)~+~C

Where trig integrals get complicated is when they include products or powers of trig functions. But once again, due to the relationship among derivatives of trig functions, integrating their products is usually fairly easy and only looks complicated at first glance. Let’s consider an example:

int{}{}{cos^2(x) sin(x) dx}

This is actually a simple u substitution integral. Let’s take:

u ~=~ cos(x) ~doubleright~du~=~-sin(x)dx

Hence the integral becomes:

int{}{}{cos^2(x) sin(x) dx}~=~-int{}{}{u^2 du} ~=~-{1/3}u^3~+~C

Replacing u we find that:

int{}{}{cos^2(x) sin(x) dx}~=~-{1/3}cos^3(x)~+~C

The cyclic nature of the derivatives of trig functions also plays a role when doing integration by parts with trig integrals. See the entry on integration by parts with trig functions for an example. In that case you will notice that by parts integration has to be applied twice in order to get the final answer.

Trig integrals involving ratios of trig functions are no different than those involving products. The simplest example is the integral of the tangent function, which can be approached using u substitution. First we write the tangent as the ratio of sin to cosine:

int{}{}{tan(x) dx}~=~int{}{}{{{sin x}/{cos x}} dx}

Now we take:

u~=~cos x~doubleright~du~=~-sin x dx

This yields:

int{}{}{{{sin x}/{cos x}} dx}~=~-int{}{}{{1/u}du}~=~ -ln delim{|}{u}{|}~+~C

Hence:

int{}{}{tan(x) dx}~=~-ln delim{|}{cos x}{|}~+~C

Now we can use the properties of the natural logarithm to write this in a form usually seen in integral tables, which will get rid of the minus sign for us:

-ln delim{|}{cos x}{|}~+~C~=~ln delim{|}{1/{cos x}}{|}~+~C

And of course this is just the secant function:

int{}{}{tan(x) dx}~=~ln delim{|}{sec x}{|}~+~C