Tutorials › Calculus I › Integrating Sums Of Basic Trigonometric Functions

Antiderivatives and Basic Integrals · Tutorial 1076 of 1495

Integrating Sums Of Basic Trigonometric Functions

Use linearity to find antiderivatives of finite sums of basic trigonometric terms, then check the result by differentiating.

Beginner 9 min read

What You'll Learn

  • Apply linearity to integrate a finite sum term by term.
  • Use the basic antiderivative formulas for sine, cosine, tangent, and related functions.
  • Identify an interval where every term in a trigonometric sum is defined.
  • Keep track of coefficients and signs in a sum of antiderivatives.
  • Verify a proposed antiderivative by differentiating it.
  • Express the arbitrary constant for the whole sum correctly.

Why Integrate a Sum One Term at a Time?

Many trigonometric expressions are sums of familiar terms. For instance, an integrand might contain sine, cosine, and secant-squared terms all at once. If each term has a known antiderivative, the sum does not require a new formula: integrate each term separately, keeping its coefficient and sign.

This method is an instance of linearity. It is useful because it turns one expression into several simpler tasks. The main care needed is to use the right basic formula for each term, and to work on an interval where all the terms are defined.

Linearity for Finite Sums

Definition: Let \(I\) be an interval, and suppose \(f_1,\dots,f_n\) have antiderivatives \(F_1,\dots,F_n\) on \(I\). If \(a_1,\dots,a_n\) are constants, then an antiderivative on \(I\) of \(a_1f_1(x)+\cdots+a_nf_n(x)\) is \(a_1F_1(x)+\cdots+a_nF_n(x)\).

In symbols, the rule is:

$$ \int \left(a_1f_1(x)+\cdots+a_nf_n(x)\right)\,dx = a_1\int f_1(x)\,dx+\cdots+a_n\int f_n(x)\,dx. $$

This notation describes families of antiderivatives: the final result has one arbitrary constant, conventionally written \(+C\). The interval matters. For trigonometric functions with poles, choose an interval on which every term in the integrand is defined. In particular, do not treat a formula as giving an antiderivative across a point where the integrand is undefined.

Basic Trigonometric Antiderivatives

The formulas below are used term by term. Each formula applies on any interval where the functions involved are defined. The absolute values in the logarithms are part of the formulas; they allow the logarithm to be used when its argument is negative, as long as that argument is nonzero.

TermAn antiderivative
\(\sin x\)\(-\cos x\)
\(\cos x\)\(\sin x\)
\(\tan x\)\(\ln|\sec x|\)
\(\cot x\)\(\ln|\sin x|\)
\(\sec^2 x\)\(\tan x\)
\(\csc^2 x\)\(-\cot x\)
\(\sec x\tan x\)\(\sec x\)
\(\csc x\cot x\)\(-\csc x\)
\(\sec x\)\(\ln|\sec x+\tan x|\)
\(\csc x\)\(\ln|\csc x-\cot x|\)

These are the standard basic antiderivatives. They can be checked by differentiation: for example, \(\frac{d}{dx}(-\cos x)=\sin x\), while \(\frac{d}{dx}(\tan x)=\sec^2 x\). The earlier material on checking trigonometric antiderivatives by differentiation gives the same central habit: verify a proposed result by differentiating it.

Why the Term-by-Term Rule Works

The rule follows directly from the derivative rules for sums and constant multiples. Suppose \(F_j'(x)=f_j(x)\) on an interval \(I\), for each \(j\) from \(1\) to \(n\). Define \(F(x)=a_1F_1(x)+\cdots+a_nF_n(x)\). Differentiating gives:

$$ \begin{aligned} F'(x) &=a_1F_1'(x)+\cdots+a_nF_n'(x)\\ &=a_1f_1(x)+\cdots+a_nf_n(x). \end{aligned} $$

Thus \(F\) has exactly the required derivative, which proves it is an antiderivative of the sum. This argument explains why the method works rather than merely offering a procedure: the derivative of the proposed sum reproduces the original sum term by term.

On an interval, any two antiderivatives of the same function differ by a constant. Indeed, if \(F'=G'\), then \((F-G)'=0\). By the Mean Value Theorem, a function with derivative zero throughout an interval has the same value at any two points of that interval. Therefore \(F-G\) is constant there. This is why the general antiderivative is written with a single \(+C\).

A Reliable Procedure

1
Check the domain.
Choose an interval on which every trigonometric term in the sum is defined.
2
Separate the terms.
Keep each coefficient and sign attached to its term.
3
Use the matching formula.
Replace each term by one of its basic antiderivatives, preserving its coefficient.
4
Add one constant and check.
Write \(+C\) for the whole sum, then differentiate to recover the integrand.

Worked Examples

Worked Example: A Sum of Sine, Cosine, and Squared Trigonometric Functions

Find an antiderivative of \(4\sin x-3\cos x+2\sec^2 x+5\csc^2 x\) on \(0<x<\frac{\pi}{2}\). This interval avoids the poles of the terms.

Integrate each term, keeping its coefficient:

$$ \begin{aligned} \int 4\sin x\,dx&=-4\cos x,\\ \int -3\cos x\,dx&=-3\sin x,\\ \int 2\sec^2 x\,dx&=2\tan x,\\ \int 5\csc^2 x\,dx&=-5\cot x. \end{aligned} $$

Therefore an antiderivative is:

$$ F(x)=-4\cos x-3\sin x+2\tan x-5\cot x+C. $$

Check by differentiating each term:

$$ F'(x)=4\sin x-3\cos x+2\sec^2 x+5\csc^2 x. $$

This is the original integrand, so the antiderivative checks.

Worked Example: Terms with Cotangent, Secant-Tangent, and Cosecant-Cotangent

Find an antiderivative of \(-5\cot x+2\sec x\tan x-3\csc x\cot x\) on \(0<x<\frac{\pi}{2}\).

Use \(\int\cot x\,dx=\ln|\sin x|\), \(\int\sec x\tan x\,dx=\sec x\), and \(\int\csc x\cot x\,dx=-\csc x\). Including the coefficients gives:

$$ \begin{aligned} \int -5\cot x\,dx&=-5\ln|\sin x|,\\ \int 2\sec x\tan x\,dx&=2\sec x,\\ \int -3\csc x\cot x\,dx&=3\csc x. \end{aligned} $$

Hence a general antiderivative is:

$$ F(x)=-5\ln|\sin x|+2\sec x+3\csc x+C. $$

Differentiate to check both the signs and the coefficients:

$$ \begin{aligned} F'(x) &=-5\cot x+2\sec x\tan x-3\csc x\cot x. \end{aligned} $$

The derivative matches the integrand. In particular, the positive \(3\csc x\) term differentiates to a negative \(3\csc x\cot x\) term.

Worked Example: A Sum Involving Secant and Cosecant

Find an antiderivative of \(3\sec x-2\csc x+4\tan x\) on \(0<x<\frac{\pi}{2}\). All three terms are defined on this interval, and the logarithm arguments in the formulas are nonzero.

Apply the corresponding formulas:

$$ \begin{aligned} \int 3\sec x\,dx&=3\ln|\sec x+\tan x|,\\ \int -2\csc x\,dx&=-2\ln|\csc x-\cot x|,\\ \int 4\tan x\,dx&=4\ln|\sec x|. \end{aligned} $$

Thus one antiderivative is:

$$ F(x)=3\ln|\sec x+\tan x|-2\ln|\csc x-\cot x|+4\ln|\sec x|+C. $$

For the check, the derivatives of the three logarithmic terms, including their coefficients, are \(3\sec x\), \(-2\csc x\), and \(4\tan x\), respectively. Therefore:

$$ F'(x)=3\sec x-2\csc x+4\tan x, $$

as required.

Common Pitfall: Losing a Sign

A frequent error is to forget that \(\int\csc^2 x\,dx=-\cot x+C\). For example, the calculation

$$ \int 5\csc^2 x\,dx=5\cot x+C $$

is wrong: differentiating \(5\cot x\) gives \(-5\csc^2 x\), not \(5\csc^2 x\). The correction is:

$$ \int 5\csc^2 x\,dx=-5\cot x+C, \qquad \frac{d}{dx}(-5\cot x)=5\csc^2 x. $$

Another bookkeeping error is to attach a coefficient to the wrong term when rewriting a sum. Keeping the original terms in order until each has been integrated makes this less likely. Differentiating the completed expression is the final safeguard.

Why This Method Matters

Term-by-term integration is one of the basic ways to manage a longer expression without changing the underlying problem. Once each term is recognized, the integral is assembled using linearity. The method does not say that every trigonometric expression can be integrated by simply splitting it into a sum: it applies when the integrand is a finite sum of terms whose antiderivatives are known, with constant coefficients. Products and more complicated compositions may require other methods.

Also, the constants from individual terms combine into one constant. For example, \((- \cos x+C_1)+( \sin x+C_2)\) can be written as \(-\cos x+\sin x+C\), where \(C=C_1+C_2\). There is no need to keep a separate arbitrary constant for each term.

Key takeaway: On an interval where all terms are defined, integrate a finite sum of basic trigonometric functions term by term, retain every coefficient and sign, add one arbitrary constant, and differentiate the result to check it.

Check Your Understanding

For each question, keep track of the sign and coefficient, and use differentiation to check your answers.

  1. Find an antiderivative of \(2\sin x+7\cos x\) on an interval where both terms are defined.
  2. Find an antiderivative of \(3\sec^2 x-4\csc^2 x\), and verify it by differentiation.
  3. Find an antiderivative of \(\tan x-2\cot x\) on an interval where both terms are defined.
  4. Why is it valid to integrate a finite sum term by term?
  5. What is wrong with using \(5\cot x\) as an antiderivative of \(5\csc^2 x\)?

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon