Integrating a Sum One Term at a Time
Many functions are written as sums of familiar pieces. A polynomial term might appear beside an exponential term and one or more trigonometric terms. The useful idea is that these pieces do not need to be handled by one complicated rule: on a common interval where the functions are defined, find an antiderivative for each term and add the results.
This approach depends on the linearity of differentiation. The derivative of a sum is the sum of the derivatives, and a constant factor can be moved outside a derivative. Antidifferentiation reverses those facts: integrate each summand separately, keep its coefficient, and then include an arbitrary constant.
For trigonometric formulas below, angles are measured in radians. Each formula is used on an interval where the functions involved are defined. In particular, expressions such as \(\tan x\) or \(\sec x\) are not defined where \(\cos x=0\), so an antiderivative using those functions must be considered on an interval that avoids those points.
The Term-by-Term Rule
Suppose \(f_1,\ldots,f_n\) have antiderivatives \(F_1,\ldots,F_n\) on the same interval \(I\), and \(a_1,\ldots,a_n\) are constants. Then a general antiderivative of their weighted sum is obtained by adding the weighted antiderivatives:
The same arbitrary constant \(C\) is written once for the whole sum. This rule applies to a finite sum of functions with known antiderivatives on a common interval. It does not say that products can be integrated by integrating each factor separately.
The main task is therefore to recognize each term and select its matching formula. The following list gathers the forms used in this tutorial.
| Term | Antiderivative | Condition or note |
|---|---|---|
| \(x^n\) | \(\dfrac{x^{n+1}}{n+1}\) | \(n\neq -1\); for polynomial terms, \(n\) is a nonnegative integer |
| \(e^x\) | \(e^x\) | Since \(\dfrac{d}{dx}e^x=e^x\) |
| \(a^x\) | \(\dfrac{a^x}{\ln a}\) | \(a>0\), \(a\neq 1\) |
| \(\sin x\) | \(-\cos x\) | |
| \(\cos x\) | \(\sin x\) | |
| \(\sec^2 x\) | \(\tan x\) | Where \(\cos x\neq 0\) |
| \(\csc^2 x\) | \(-\cot x\) | Where \(\sin x\neq 0\) |
| \(\sec x\tan x\) | \(\sec x\) | Where \(\cos x\neq 0\) |
| \(\csc x\cot x\) | \(-\csc x\) | Where \(\sin x\neq 0\) |
For example, if the term is \(7\sin x\), its coefficient remains attached to the antiderivative: \(\int 7\sin x\,dx=-7\cos x+C\). If the term is \(-4x^3\), the power rule gives \(-4\cdot \frac{x^4}{4}=-x^4\). The constant multiple is handled separately from the matching rule for the function itself.
Why the Rule Works
The justification is a direct use of the derivative rules. If \(F_i'=f_i\) for each \(i\), then the derivative of the proposed sum is
Thus the proposed expression has exactly the required derivative, which is the definition of an antiderivative. This argument also explains why \(C\) is included: differentiating any constant gives zero, so adding a constant does not change the derivative.
Worked Examples
Worked Example: A Polynomial, an Exponential, Sine, and Cosine
Find the general antiderivative of \(3x^2+2e^x-4\sin x+5\cos x\).
Integrate each term separately. First, the power rule gives \(\int 3x^2\,dx=3\cdot \frac{x^3}{3}=x^3\). Next, \(\int 2e^x\,dx=2e^x\). For the sine term, \(\int -4\sin x\,dx=-4(-\cos x)=4\cos x\). Finally, \(\int 5\cos x\,dx=5\sin x\). Combining these results gives
Check by differentiation, term by term:
This is exactly the given function, so the antiderivative is verified.
Worked Example: A General Exponential and a Trigonometric Power Form
Find the general antiderivative of \(4x^3-6\cdot 2^x+3\sec^2 x\), on an interval where \(\sec x\) is defined.
The polynomial term integrates as \(\int 4x^3\,dx=4\cdot \frac{x^4}{4}=x^4\). For the exponential term, use \(\int a^x\,dx=\frac{a^x}{\ln a}\), valid for \(a>0\) and \(a\neq 1\). Here \(a=2\), so \(\int -6\cdot 2^x\,dx=-6\frac{2^x}{\ln 2}\). The matching antiderivative for \(\sec^2 x\) is \(\tan x\), so \(\int 3\sec^2 x\,dx=3\tan x\). Therefore,
Differentiate each term to check: \(\frac{d}{dx}(x^4)=4x^3\); \(\frac{d}{dx}\left(-\frac{6\cdot 2^x}{\ln 2}\right)=-\frac{6\cdot 2^x\ln 2}{\ln 2}=-6\cdot 2^x\); and \(\frac{d}{dx}(3\tan x)=3\sec^2 x\). Hence
which matches the integrand.
Worked Example: Keeping Track of Negative Trigonometric Signs
Find the general antiderivative of \(2x-3\csc^2 x+4\csc x\cot x\), on an interval where the trigonometric terms are defined.
For the polynomial term, \(\int 2x\,dx=2\cdot \frac{x^2}{2}=x^2\). Since \(\frac{d}{dx}(\cot x)=-\csc^2 x\), the antiderivative of \(-3\csc^2 x\) is \(3\cot x\). Since \(\frac{d}{dx}(\csc x)=-\csc x\cot x\), the antiderivative of \(4\csc x\cot x\) is \(-4\csc x\). Thus
Now differentiate: \(\frac{d}{dx}(x^2)=2x\); \(\frac{d}{dx}(3\cot x)=-3\csc^2 x\); and \(\frac{d}{dx}(-4\csc x)=4\csc x\cot x\). Therefore
exactly the original function.
A Common Pitfall: Losing a Sign
Term-by-term work is straightforward, but it does not remove the need to match signs carefully. For instance, an incorrect calculation for \(\int -5\sin x\,dx\) is \(-5\cos x+C\). This treats the antiderivative of \(\sin x\) as \(\cos x\), but \(\frac{d}{dx}(\cos x)=-\sin x\), not \(\sin x\).
The correct matching rule is \(\int \sin x\,dx=-\cos x+C\). Therefore,
Check the correction: \(\frac{d}{dx}(5\cos x)=-5\sin x\), as required. Differentiating a proposed answer is an efficient way to catch this kind of sign error before combining all the terms.
A Reliable Workflow
For a finite sum of polynomial, exponential, and trigonometric terms, use the following process:
Separate the expression into its summands, keeping each coefficient and sign attached.
Use the power rule for polynomial terms, the appropriate exponential formula for exponential terms, and the matching trigonometric formula for each trigonometric term.
Write one arbitrary constant for the antiderivative family on the interval under consideration.
Differentiate every term in the proposed answer and compare the result with the original sum.
This method matters because mixed expressions are common in models and calculations: a single function can combine different kinds of change. Recognizing the pieces lets you use established rules without confusing them. The verification step is especially valuable because it tests the entire answer, including coefficients, signs, and the exponential factor.
Check Your Understanding
For each question, apply a matching rule to every term and use differentiation to verify your result.
- Find the general antiderivative of \(6x^2+e^x-2\cos x\).
- Find the general antiderivative of \(5x^4+3\cdot 4^x\). State why the exponential formula applies.
- Find the general antiderivative of \(-2\sin x+7\sec^2 x\), on an interval where the terms are defined.
- What is the error in claiming that \(\int 3\cos x\,dx=3\cos x+C\)? Give the corrected result and check it.
- State the derivative fact that justifies adding the separate antiderivatives of a finite sum.