Integral of Trigonometric Functions

Copy Markdown View Source

Source: algebrica.org - CC BY-NC 4.0 https://algebrica.org/integral-of-trigonometric-functions/ Fetched from algebrica.org post 21621; source modified 2026-02-25T18:56:48.

Integrals of the fundamental trigonometric functions

In the section on functions, you’ll find the integrals of the main trigonometric functions (for example sine, cosine, tangent, cotangent, and the others. These integrals are easy to compute and worth keeping in mind, as they often appear when solving problems. Below is a summary list of the integrals of all the main trigonometric functions, offering an immediate overall view of the essential results.

-

\text{1. } \quad \int \sin x\,dx = -\cos x + c

-

\text{2. } \quad \int \cos x\,dx = \sin x + c

-

\text{3. } \quad \int \tan x\,dx = -\ln|\cos x| + c

-

\text{4. } \quad \int \cot x\,dx = \ln|\sin x| + c

-

\text{5. } \quad \int \sec x\,dx = \ln|\sec x + \tan x| + c

-

\text{6. } \quad \int \csc x\,dx = \ln|\csc x - \cot x| + c

-

\text{7. } \quad \int \sinh x\,dx = \cosh x + c

-

\text{8. } \quad \int \cosh x\,dx = \sinh x + c

-

\text{9. } \quad \int \tanh x\,dx = \ln|\cosh x| + c

-

\text{10. } \quad \int \coth x\,dx = \ln|\sinh x| + c

-

\text{11. } \quad \int \operatorname{sech} x\,dx = 2\,\arctan\\!\left(\tanh\frac{x}{2}\right) + c

-

\text{12. } \quad \int \operatorname{csch} x\,dx = \ln\left|\tanh\frac{x}{2}\right| + c
Remember that $c$ denotes the constant of integration, which is included to represent the entire family of antiderivatives associated with an indefinite integral. Each value of $c$ corresponds to a different primitive, all of which share the same derivative.

Integrals of trigonometric powers with $n$ even

There are, however, some important cases in which the antiderivative is not immediately accessible and requires a simple strategy to be handled effectively. Situations of this kind occur frequently in exercises and problem-solving. A classic example arises when sine or cosine appears raised to an integer power, namely:

\int \sin^{n} x\,dx
\int \cos^{n} x\,dx

In these situations, the integral can be greatly simplified by applying appropriate substitutions. When the exponent $n$ is even, one typically rewrites the squared trigonometric terms using the double-angle identities. In particular, we have:

\sin^{2} x = \frac{1 - \cos 2x}{2}
\cos^{2} x = \frac{1 + \cos 2x}{2}

These expressions reduce the power of the function and allow the integral to be computed more easily, and follow directly from following relationships. Starting from the Pythagorean identity:

\sin^{2}x + \cos^{2}x = 1

and combining it with the double–angle formula:

\cos 2x = \cos^{2}x - \sin^{2}x

we can express $\cos 2x$ entirely in terms of either $\cos^{2}x$ or $\sin^{2}x$.


Indeed, replacing $\sin^{2}x$ with $1 - \cos^{2}x$ we obtain:

\cos 2x = \cos^{2}x - (1 - \cos^{2}x) = 2\cos^{2}x - 1

Solving this expression for $\cos^{2}x$ yields:

\cos^{2}x = \frac{1 + \cos 2x}{2}

A similar argument holds for $\sin^{2}x$. If we substitute $\cos^{2}x = 1 - \sin^{2}x$ into the double–angle formula, we get:

\cos 2x = (1 - \sin^{2}x) - \sin^{2}x = 1 - 2\sin^{2}x

Solving for $\sin^{2}x$ gives:

\sin^{2}x = \frac{1 - \cos 2x}{2}

Example 1

As an illustration of the method, let us consider the following integral:

\int 2\cos^{4}x\,dx

To handle the fourth power of the cosine, we start by recalling the power-reducing identity:

\cos^{2}x = \frac{1+\cos 2x}{2}

Applying this identity allows us to rewrite the expression in a more manageable form:

\begin{aligned} \cos^{4}x & = \left(\frac{1+\cos 2x}{2}\right)^{2} \\[4pt] &= \frac{1}{4}\left(1 + 2\cos 2x + \cos^{2} 2x\right) \end{aligned}

At this point, one power of cosine still remains. We therefore reduce it using the identity:

\cos^{2} 2x = \frac{1+\cos 4x}{2}

Substituting this expression back into the formula and multiplying by 2 (as required by the original integral), we obtain the simplified form:

2\cos^{4}x = \frac{3}{4} + \cos 2x + \frac{1}{4}\cos 4x

Finally, by integrating each term separately, we obtain the solution:

\frac{3}{4}x + \frac{1}{2}\sin 2x + \frac{1}{16}\sin 4x + c

Integrals of trigonometric powers with $n$ odd

When the exponent $n$ is odd, the method becomes straightforward. In this case we can separate one factor of the trigonometric function whose power is odd and rewrite the remaining even power using the Pythagorean identity. For sine, this gives:

\begin{aligned} \int \sin^{n} x\,dx &= \int \sin x\,(\sin^{2}x)^{k},dx \\[4pt] &= \int \sin x\,(1 - \cos^{2}x)^{k}\,dx \end{aligned}

The following substitution:

u = \cos x
du = -\sin x\,dx

transforms the integral into a polynomial in $u$, which can then be integrated without difficulty. The procedure for an odd power of cosine is entirely analogous: one extracts a single $\cos x$ and rewrites the remaining even power using

\cos^{2}x = 1 - \sin^{2}x

leading to the substitution $u = \sin x$. In both cases, isolating one factor reduces the integral to a much simpler form.

Example 2

Consider the following integral:

\int \cos^{5}x \, dx

The exponent is odd, so the strategy is to isolate one factor of cosine and rewrite the remaining even power using the Pythagorean identity. We write:

\int \cos^{5}x , dx = \int \cos^{4}x \cdot \cos x \, dx

The factor $\cos^{4}x$ is an even power, so we can express it in terms of $\sin^{2}x$:

\cos^{4}x = (\cos^{2}x)^{2} = (1 - \sin^{2}x)^{2}

The integral becomes:

\int (1 - \sin^{2}x)^{2} \cdot \cos x \, dx

At this point the factor $\cos x \, dx$ is exactly the differential of $\sin x$, so we set:

u = \sin x \qquad du = \cos x \, dx

and the integral transforms into a polynomial in $u$:

\int (1 - u^{2})^{2} \, du

Expanding the square we obtain:

\int (1 - 2u^{2} + u^{4}) \, du

Each term integrates immediately:

u - \frac{2}{3}u^{3} + \frac{1}{5}u^{5} + c

Substituting back $u = \sin x$ we have::

\sin x - \frac{2}{3}\sin^{3}x + \frac{1}{5}\sin^{5}x + c
The substitution worked cleanly because the isolated factor $\cos x$ was precisely the derivative of $u = \sin x$. Recognising this pattern is what makes the odd-exponent case straightforward once the logic is in place.

Reciprocals of sine and cosine

Other frequently encountered cases involve the integrals of the reciprocals of sine and cosine. Although these expressions may seem less straightforward at first glance, both can be derived with a single algebraic trick. For the secant, the key idea is to multiply the integrand by a fraction equal to 1:

\begin{aligned} \int \sec x\,dx &= \int \sec x \cdot \frac{\sec x + \tan x}{\sec x + \tan x}\,dx \\[6pt] &= \int \frac{\sec^{2}x + \sec x\tan x}{\sec x + \tan x}\,dx \end{aligned}

The numerator is now exactly the derivative of the denominator, since:

\frac{d}{dx}(\sec x + \tan x) = \sec x\tan x + \sec^{2}x

This means the integral has the form $\int \frac{f’(x)}{f(x)}\,dx$, which integrates directly to $\ln|f(x)|$. We obtain:

\int \frac{1}{\cos x}\,dx = \int \sec x,dx = \ln|\sec x + \tan x| + c

The same structure applies to the cosecant. Multiplying by $\frac{\csc x - \cot x}{\csc x - \cot x}$ gives a numerator that is the derivative of the denominator, since:

\frac{d}{dx}(\csc x - \cot x) = -\csc x\cot x + \csc^{2}x

and the integral of $\csc x$ produces:

\int \frac{1}{\sin x}\,dx = \int \csc x\,dx = \ln|\csc x - \cot x| + c

In both cases the result is logarithmic, and the sign inside the absolute value is easy to mix up. It is worth memorising the two forms together: $\sec x + \tan x$ for the cosine reciprocal, $\csc x - \cot x$ for the sine reciprocal.

Selected references