Exercises

This page is a graded set of exercises on indefinite integrals. It is meant to be worked rather than read: each problem is followed by a complete solution showing the approach, the individual steps, and the final answer, so that the reasoning can be compared against your own.

The exercises are ordered by difficulty and arranged in four groups: Basic Exercises (Exercises 1–4) use nothing but the power rule and linearity; Intermediate Exercises (Exercises 5–8) ask you to recognize a structure and rewrite the integrand before integrating, the last of them by a partial fraction decomposition; Comprehensive Exercises (Exercises 9–12) combine these tools and close with a verification problem; and the Challenge Exercises (the last three, Exercises 13–15) require a genuine technique, an inverse trigonometric formula in one case, a trigonometric identity in a second, and a completed square in the third. Every answer should be checked by differentiating it, and the solutions say so explicitly wherever the check is instructive.

Definition

Because this is a problem set, it is worth stating the tools in one place before using them. An antiderivative of a function ff on an interval II is a function FF with F′(x)=f(x)F'(x) = f(x) on II, and the indefinite integral is the family of all of them:

∫f(x) dx=F(x)+C,\int f(x)\,dx = F(x) + C,

where CC is an arbitrary constant. The constant is not decoration: differentiation cannot distinguish two functions that differ by a constant, so the indefinite integral has to carry it, and every answer below ends with +C+ C.

Three ingredients do all the work in this set.

  1. Linearity. ∫[af(x)+bg(x)] dx=a∫f(x) dx+b∫g(x) dx\int \bigl[a f(x) + b g(x)\bigr]\,dx = a\int f(x)\,dx + b\int g(x)\,dx.
  2. The basic formulas. ∫xn dx=xn+1n+1+C\int x^n\,dx = \frac{x^{n+1}}{n+1} + C for n≠−1n \neq -1; ∫1x dx=ln⁡∣x∣+C\int \frac{1}{x}\,dx = \ln\lvert x\rvert + C; ∫ex dx=ex+C\int e^x\,dx = e^x + C; ∫sin⁡x dx=−cos⁡x+C\int \sin x\,dx = -\cos x + C; ∫cos⁡x dx=sin⁡x+C\int \cos x\,dx = \sin x + C; and ∫11+x2 dx=arctan⁡x+C\int \frac{1}{1+x^2}\,dx = \arctan x + C.
  3. Substitution. When the integrand contains a function together with its derivative, set that function equal to uu, convert the whole differential, and back-substitute the original variable at the end.

Exercises

Basic Exercises

The first four problems use nothing but the power rule and the linearity of integration.

Exercise 1

Compute the indefinite integral ∫(3x2−2x+1) dx\int (3x^2 - 2x + 1)\,dx.

indefinite integralpower rulelinearity

Approach: Split the integrand into terms and apply the power rule to each term separately, then collect the results and restore the constant of integration.

Steps:

  1. By linearity, ∫(3x2−2x+1) dx=3∫x2 dx−2∫x dx+∫1 dx\int (3x^2 - 2x + 1)\,dx = 3\int x^2\,dx - 2\int x\,dx + \int 1\,dx.
  2. Integrate each term with the power rule: 3⋅x33=x33 \cdot \frac{x^3}{3} = x^3, −2⋅x22=−x2-2 \cdot \frac{x^2}{2} = -x^2, and ∫1 dx=x\int 1\,dx = x.
  3. Collect the terms and add the constant: x3−x2+x+Cx^3 - x^2 + x + C.
  4. Check by differentiating: ddx(x3−x2+x+C)=3x2−2x+1\frac{d}{dx}(x^3 - x^2 + x + C) = 3x^2 - 2x + 1.

Answer: x3−x2+x+Cx^3 - x^2 + x + C.

Exercise 2

Compute the indefinite integral ∫1x2 dx\int \frac{1}{x^2}\,dx.

indefinite integralpower rulenegative exponent

Approach: Rewrite the integrand as a negative power and apply the power rule, remembering that the exponent −2-2 is not the excluded value −1-1.

Steps:

  1. Rewrite: 1x2=x−2\frac{1}{x^2} = x^{-2}, so the exponent is n=−2n = -2.
  2. Apply the rule: ∫x−2 dx=x−1−1+C=−1x+C\int x^{-2}\,dx = \frac{x^{-1}}{-1} + C = -\frac{1}{x} + C.
  3. Check by differentiating: ddx(−1x)=1x2=x−2\frac{d}{dx}\left(-\frac{1}{x}\right) = \frac{1}{x^2} = x^{-2}.

Answer: −1x+C-\frac{1}{x} + C.

Exercise 3

Compute the indefinite integral ∫e3x dx\int e^{3x}\,dx.

indefinite integralexponential integralsubstitution

Approach: Substitute u=3xu = 3x so that the integrand becomes eue^u and the chain-rule factor 13\frac{1}{3} appears, then integrate the exponential.

Steps:

  1. Substitute u=3xu = 3x, so du=3 dxdu = 3\,dx and dx=13dudx = \frac{1}{3}du.
  2. Integrate: ∫e3x dx=13∫eu du=13eu+C\int e^{3x}\,dx = \frac{1}{3}\int e^u\,du = \frac{1}{3}e^u + C.
  3. Back-substitute: 13eu+C=13e3x+C\frac{1}{3}e^u + C = \frac{1}{3}e^{3x} + C.
  4. Check by differentiating: ddx(13e3x)=13⋅3e3x=e3x\frac{d}{dx}\left(\frac{1}{3}e^{3x}\right) = \frac{1}{3}\cdot 3e^{3x} = e^{3x}.

Answer: 13e3x+C\frac{1}{3}e^{3x} + C.

Exercise 4

Compute the indefinite integral ∫sin⁡x dx\int \sin x\,dx.

indefinite integraltrigonometric integral

Approach: Use the basic formula ∫sin⁡x dx=−cos⁡x+C\int \sin x\,dx = -\cos x + C, which follows from the derivative ddx(−cos⁡x)=sin⁡x\frac{d}{dx}(-\cos x) = \sin x. The minus sign comes from the direction of differentiation.

Steps:

  1. Recall that (cos⁡x)′=−sin⁡x(\cos x)' = -\sin x, so −cos⁡x-\cos x is an antiderivative of sin⁡x\sin x.
  2. Add the constant of integration, since the indefinite integral denotes a whole family: −cos⁡x+C-\cos x + C.
  3. Check by differentiating: ddx(−cos⁡x+C)=sin⁡x\frac{d}{dx}(-\cos x + C) = \sin x.

Answer: −cos⁡x+C-\cos x + C.

Intermediate Exercises

The next four still use the same toolkit, but the integrand has to be rewritten before it can be integrated: a substitution, a trigonometric identity, an inverse trigonometric formula, and a partial fraction decomposition.

Exercise 5

Compute the indefinite integral ∫xex2 dx\int x e^{x^2}\,dx.

indefinite integralsubstitutionexponential integral

Approach: The numerator xx is half the derivative of x2x^2, so substitute u=x2u = x^2 and the integral becomes an exponential one.

Steps:

  1. Substitute u=x2u = x^2, so du=2x dxdu = 2x\,dx and therefore x dx=12dux\,dx = \frac{1}{2}du.
  2. Integrate: ∫xex2 dx=12∫eu du=12eu+C\int x e^{x^2}\,dx = \frac{1}{2}\int e^u\,du = \frac{1}{2}e^u + C.
  3. Back-substitute: 12eu+C=12ex2+C\frac{1}{2}e^u + C = \frac{1}{2}e^{x^2} + C.
  4. Check by differentiating: ddx(12ex2)=12⋅2x ex2=xex2\frac{d}{dx}\left(\frac{1}{2}e^{x^2}\right) = \frac{1}{2}\cdot 2x\,e^{x^2} = x e^{x^2}.

Answer: 12ex2+C\frac{1}{2}e^{x^2} + C.

Exercise 6

Compute the indefinite integral ∫sin⁡2x dx\int \sin^2 x\,dx.

indefinite integraltrigonometric identity

Approach: The power-reduction identity sin⁡2x=1−cos⁡2x2\sin^2 x = \frac{1 - \cos 2x}{2} rewrites the square in terms of terms that can be integrated directly.

Steps:

  1. Apply the identity: sin⁡2x=1−cos⁡2x2\sin^2 x = \frac{1 - \cos 2x}{2}.
  2. Integrate term by term: ∫sin⁡2x dx=12∫(1−cos⁡2x) dx=12x−12⋅12sin⁡2x+C=x2−14sin⁡2x+C\int \sin^2 x\,dx = \frac{1}{2}\int (1 - \cos 2x)\,dx = \frac{1}{2}x - \frac{1}{2}\cdot\frac{1}{2}\sin 2x + C = \frac{x}{2} - \frac{1}{4}\sin 2x + C.
  3. Check by differentiating: ddx(x2−14sin⁡2x)=12−12cos⁡2x=1−cos⁡2x2=sin⁡2x\frac{d}{dx}\left(\frac{x}{2} - \frac{1}{4}\sin 2x\right) = \frac{1}{2} - \frac{1}{2}\cos 2x = \frac{1 - \cos 2x}{2} = \sin^2 x.

Answer: x2−14sin⁡2x+C\frac{x}{2} - \frac{1}{4}\sin 2x + C.

Exercise 7

Compute the indefinite integral ∫1x2+1 dx\int \frac{1}{x^2 + 1}\,dx.

indefinite integralinverse trigonometric integral

Approach: The denominator 1+x21 + x^2 is the signature of the inverse tangent: ddxarctan⁡x=11+x2\frac{d}{dx}\arctan x = \frac{1}{1+x^2}.

Steps:

  1. Recognize the pattern: the integrand is the derivative of arctan⁡x\arctan x.
  2. Integrate: ∫1x2+1 dx=arctan⁡x+C\int \frac{1}{x^2+1}\,dx = \arctan x + C, with the constant restored because the indefinite integral is a family.
  3. Check by differentiating: ddx(arctan⁡x+C)=11+x2\frac{d}{dx}(\arctan x + C) = \frac{1}{1+x^2}.

Answer: arctan⁡x+C\arctan x + C.

Exercise 8

Compute the indefinite integral ∫1x2−1 dx\int \frac{1}{x^2 - 1}\,dx.

indefinite integralpartial fractionsrational function

Approach: The denominator factors as x2−1=(x−1)(x+1)x^2 - 1 = (x-1)(x+1), so decompose the integrand into partial fractions and integrate each simple term.

Steps:

  1. Decompose: 1x2−1=1(x−1)(x+1)=12(1x−1−1x+1)\frac{1}{x^2-1} = \frac{1}{(x-1)(x+1)} = \frac{1}{2}\left(\frac{1}{x-1} - \frac{1}{x+1}\right).
  2. Integrate term by term: ∫1x2−1 dx=12(ln⁡∣x−1∣−ln⁡∣x+1∣)+C\int \frac{1}{x^2-1}\,dx = \frac{1}{2}\left(\ln\lvert x-1\rvert - \ln\lvert x+1\rvert\right) + C.
  3. Combine the logarithms: 12ln⁡∣x−1x+1∣+C\frac{1}{2}\ln\left|\frac{x-1}{x+1}\right| + C.
  4. Check by differentiating: ddx[12ln⁡∣x−1x+1∣]=12(1x−1−1x+1)=1x2−1\frac{d}{dx}\left[\frac{1}{2}\ln\left|\frac{x-1}{x+1}\right|\right] = \frac{1}{2}\left(\frac{1}{x-1} - \frac{1}{x+1}\right) = \frac{1}{x^2-1}.

Answer: 12ln⁡∣x−1x+1∣+C\frac{1}{2}\ln\left|\frac{x-1}{x+1}\right| + C, valid on any interval that does not contain x=±1x = \pm 1.

Comprehensive Exercises

These four mix the tools above and require you to choose the right one; the last one reverses the direction and asks you to verify a claim instead of producing a result.

Exercise 9

Compute the indefinite integral ∫(x3+2x2+x+1) dx\int (x^3 + 2x^2 + x + 1)\,dx.

indefinite integralpower rulelinearity

Approach: This is the power rule applied to four separate terms: split the integrand by linearity, integrate each piece, and collect the results.

Steps:

  1. By linearity, ∫(x3+2x2+x+1) dx=∫x3 dx+2∫x2 dx+∫x dx+∫1 dx\int (x^3 + 2x^2 + x + 1)\,dx = \int x^3\,dx + 2\int x^2\,dx + \int x\,dx + \int 1\,dx.
  2. Integrate each term with the power rule: ∫x3 dx=x44\int x^3\,dx = \frac{x^4}{4}, 2∫x2 dx=2⋅x33=2x332\int x^2\,dx = 2\cdot\frac{x^3}{3} = \frac{2x^3}{3}, ∫x dx=x22\int x\,dx = \frac{x^2}{2}, and ∫1 dx=x\int 1\,dx = x.
  3. Collect the terms and add the constant: x44+2x33+x22+x+C\frac{x^4}{4} + \frac{2x^3}{3} + \frac{x^2}{2} + x + C.
  4. Check by differentiating term by term: ddx(x44)=x3\frac{d}{dx}\left(\frac{x^4}{4}\right) = x^3, ddx(2x33)=2x2\frac{d}{dx}\left(\frac{2x^3}{3}\right) = 2x^2, ddx(x22)=x\frac{d}{dx}\left(\frac{x^2}{2}\right) = x, and ddx(x)=1\frac{d}{dx}(x) = 1, so the derivative is x3+2x2+x+1x^3 + 2x^2 + x + 1, exactly the integrand.

Answer: x44+2x33+x22+x+C\frac{x^4}{4} + \frac{2x^3}{3} + \frac{x^2}{2} + x + C.

Exercise 10

Compute the indefinite integral ∫cos⁡2x dx\int \cos^2 x\,dx.

indefinite integraltrigonometric identity

Approach: Use the power-reduction identity cos⁡2x=1+cos⁡2x2\cos^2 x = \frac{1 + \cos 2x}{2}, which turns the square into a constant plus a cosine that integrates directly.

Steps:

  1. Apply the identity: cos⁡2x=1+cos⁡2x2\cos^2 x = \frac{1 + \cos 2x}{2}.
  2. Integrate term by term: ∫cos⁡2x dx=12∫(1+cos⁡2x) dx=12(x+12sin⁡2x)+C=x2+14sin⁡2x+C\int \cos^2 x\,dx = \frac{1}{2}\int (1 + \cos 2x)\,dx = \frac{1}{2}\left(x + \frac{1}{2}\sin 2x\right) + C = \frac{x}{2} + \frac{1}{4}\sin 2x + C.
  3. Check by differentiating: ddx(x2+14sin⁡2x)=12+12cos⁡2x=1+cos⁡2x2=cos⁡2x\frac{d}{dx}\left(\frac{x}{2} + \frac{1}{4}\sin 2x\right) = \frac{1}{2} + \frac{1}{2}\cos 2x = \frac{1 + \cos 2x}{2} = \cos^2 x.

Answer: x2+14sin⁡2x+C\frac{x}{2} + \frac{1}{4}\sin 2x + C.

Exercise 11

Compute the indefinite integral ∫xx2+1 dx\int \frac{x}{x^2 + 1}\,dx.

indefinite integralsubstitutionlogarithm

Approach: The numerator xx is half the derivative of x2+1x^2 + 1, so substitute u=x2+1u = x^2 + 1 and the integral becomes a plain logarithmic one.

Steps:

  1. Substitute u=x2+1u = x^2 + 1, so du=2x dxdu = 2x\,dx and therefore x dx=12dux\,dx = \frac{1}{2}du.
  2. Integrate: ∫xx2+1 dx=12∫1u du=12ln⁡∣u∣+C\int \frac{x}{x^2 + 1}\,dx = \frac{1}{2}\int \frac{1}{u}\,du = \frac{1}{2}\ln\lvert u\rvert + C.
  3. Back-substitute: 12ln⁡∣x2+1∣+C=12ln⁡(x2+1)+C\frac{1}{2}\ln\lvert x^2 + 1\rvert + C = \frac{1}{2}\ln(x^2 + 1) + C, where the absolute value may be dropped because x2+1≥1>0x^2 + 1 \geq 1 > 0 for every real xx.
  4. Check by differentiating: ddx(12ln⁡(x2+1))=12⋅2xx2+1=xx2+1\frac{d}{dx}\left(\frac{1}{2}\ln(x^2 + 1)\right) = \frac{1}{2}\cdot\frac{2x}{x^2 + 1} = \frac{x}{x^2 + 1}.

Answer: 12ln⁡(x2+1)+C\frac{1}{2}\ln(x^2 + 1) + C.

Exercise 12

Check whether the claimed antiderivative ∫(ex+sin⁡x) dx=ex−cos⁡x+C\int (e^x + \sin x)\,dx = e^x - \cos x + C is correct.

indefinite integralverificationderivative

Approach: Instead of integrating, differentiate the proposed antiderivative and compare the result with the given integrand.

Steps:

  1. Differentiate the right-hand side: ddx(ex−cos⁡x+C)=ex+sin⁡x\frac{d}{dx}\left(e^x - \cos x + C\right) = e^x + \sin x.
  2. Compare the two expressions:
    • Integrand: ex+sin⁡xe^x + \sin x
    • Derivative of the claim: ex+sin⁡xe^x + \sin x
  3. The derivative reproduces the integrand exactly, so the claim is correct; the only freedom left is the arbitrary constant CC, which the indefinite integral must carry.

Answer: The claimed antiderivative is correct: ∫(ex+sin⁡x) dx=ex−cos⁡x+C\int (e^x + \sin x)\,dx = e^x - \cos x + C.

Challenge Exercises

The last three go beyond the standard table and ask for a genuine technique: an inverse trigonometric formula, a trigonometric identity combined with a substitution, and a completed square followed by a substitution.

Exercise 13

Compute the indefinite integral ∫11−x2 dx\int \frac{1}{\sqrt{1-x^2}}\,dx.

indefinite integralinverse trigonometric integral

Approach: The integrand is the derivative of the inverse sine: ddxarcsin⁡x=11−x2\frac{d}{dx}\arcsin x = \frac{1}{\sqrt{1-x^2}}, so the antiderivative is arcsin⁡x\arcsin x.

Steps:

  1. Recognize the pattern: for ∣x∣<1\lvert x\rvert < 1, ddxarcsin⁡x=11−x2\frac{d}{dx}\arcsin x = \frac{1}{\sqrt{1-x^2}}.
  2. Integrate: ∫11−x2 dx=arcsin⁡x+C\int \frac{1}{\sqrt{1-x^2}}\,dx = \arcsin x + C, with the constant restored because the indefinite integral is a family.
  3. Check by differentiating with the chain rule: ddxarcsin⁡x=11−(sin⁡(arcsin⁡x))2⋅(sin⁡(arcsin⁡x))′=11−x2\frac{d}{dx}\arcsin x = \frac{1}{\sqrt{1 - (\sin(\arcsin x))^2}}\cdot(\sin(\arcsin x))' = \frac{1}{\sqrt{1-x^2}}.
  4. Note the domain: the integrand is real only for ∣x∣<1\lvert x\rvert < 1, so the antiderivative is valid on that interval.

Answer: arcsin⁡x+C\arcsin x + C, valid for ∣x∣<1\lvert x\rvert < 1.

Exercise 14

Compute the indefinite integral ∫tan⁡x dx\int \tan x\,dx.

indefinite integraltrigonometric identitysubstitution

Approach: Rewrite tan⁡x\tan x as sin⁡xcos⁡x\frac{\sin x}{\cos x} and then substitute u=cos⁡xu = \cos x, so that the numerator dxdx factor cancels and a logarithmic integral remains.

Steps:

  1. Rewrite: tan⁡x=sin⁡xcos⁡x\tan x = \frac{\sin x}{\cos x}.
  2. Substitute u=cos⁡xu = \cos x, so du=−sin⁡x dxdu = -\sin x\,dx and therefore sin⁡x dx=−du\sin x\,dx = -du.
  3. Integrate: ∫tan⁡x dx=∫sin⁡xcos⁡x dx=∫1u⋅(−du)=−∫1u du=−ln⁡∣u∣+C\int \tan x\,dx = \int \frac{\sin x}{\cos x}\,dx = \int \frac{1}{u}\cdot(-du) = -\int \frac{1}{u}\,du = -\ln\lvert u\rvert + C.
  4. Back-substitute: −ln⁡∣cos⁡x∣+C-\ln\lvert \cos x\rvert + C.
  5. Check by differentiating: ddx(−ln⁡∣cos⁡x∣)=−1cos⁡x⋅(−sin⁡x)=sin⁡xcos⁡x=tan⁡x\frac{d}{dx}\left(-\ln\lvert \cos x\rvert\right) = -\frac{1}{\cos x}\cdot(-\sin x) = \frac{\sin x}{\cos x} = \tan x.

Answer: −ln⁡∣cos⁡x∣+C-\ln\lvert \cos x\rvert + C, valid on any interval that does not contain a zero of cos⁡x\cos x.

Exercise 15

Compute the indefinite integral ∫1x2+2x+1 dx\int \frac{1}{x^2 + 2x + 1}\,dx.

indefinite integralcompleting the squaresubstitution

Approach: Complete the square in the denominator to get (x+1)2(x + 1)^2, then substitute u=x+1u = x + 1 so that the integral becomes a power integral.

Steps:

  1. Complete the square: x2+2x+1=(x+1)2x^2 + 2x + 1 = (x + 1)^2, so ∫1x2+2x+1 dx=∫(x+1)−2 dx\int \frac{1}{x^2 + 2x + 1}\,dx = \int (x + 1)^{-2}\,dx.
  2. Substitute u=x+1u = x + 1, so du=dxdu = dx.
  3. Integrate with the power rule: ∫u−2 du=u−1−1+C=−1u+C\int u^{-2}\,du = \frac{u^{-1}}{-1} + C = -\frac{1}{u} + C.
  4. Back-substitute: −1x+1+C-\frac{1}{x + 1} + C.
  5. Check by differentiating: ddx(−1x+1)=1(x+1)2=1x2+2x+1\frac{d}{dx}\left(-\frac{1}{x + 1}\right) = \frac{1}{(x + 1)^2} = \frac{1}{x^2 + 2x + 1}.

Answer: −1x+1+C-\frac{1}{x + 1} + C, valid on any interval that does not contain x=−1x = -1.


Summary

The fifteen problems above cover the whole basic toolkit for indefinite integration, and the progression is worth noticing. Exercises 1 and 2 are pure recognition: name the family the integrand belongs to and apply the matching formula. Exercise 3 shows the chain rule appearing for the first time, and once you have seen it, the integrand in Exercise 5 is transparent, because there too a function is sitting next to its own derivative. Exercise 6 adds the idea that a squared trigonometric function is really a linear combination in disguise, and Exercises 7 and 8 move to integrands that no single basic formula matches and have to be rewritten before they can be integrated. The comprehensive group then puts several of those ideas in the same problem: Exercise 9 asks for a polynomial with mixed powers, Exercise 10 for a squared trigonometric function in its simplest form, Exercise 11 for a rational function whose derivative sits in the numerator, and Exercise 12 asks you to verify a claimed antiderivative rather than produce one. The last three are the ones that need a genuine technique — an inverse trigonometric formula in Exercise 13, a trigonometric identity in Exercise 14, and a completed square in Exercise 15.

Two habits run through every solution. The constant CC is always restored, because an indefinite integral is a family and not a single function. And the answer is always verified by differentiating it, because that check reproduces the integrand exactly and catches sign errors, missing constants and forgotten factors in one step.

Symbols Used in This Article

SymbolTypePronunciation/ExplanationMeaning in This Article
∫\intmathematical symbolintegralThe indefinite integral operator
CCmathematical symbolconstant of integrationThe arbitrary constant in every answer
xxmathematical symbolxThe integration variable
nnmathematical symbolnThe exponent of a power function
uumathematical symboluThe auxiliary variable of a substitution
dudumathematical symbold uThe differential of the auxiliary variable
dxdxmathematical symboldifferential of xThe differential of the integration variable
eemathematical symbolEuler’s numberThe base of the natural logarithm
ln⁡∣x∣\ln\lvert x\rvertmathematical symbolnatural logarithm of the absolute value of xThe antiderivative of 1x\frac{1}{x}
sin⁡x,cos⁡x\sin x, \cos xmathematical symbolsine and cosine of xThe basic trigonometric functions
arctan⁡x\arctan xmathematical symbolarc tangent of xThe inverse tangent function

Found an issue with this content?

Tell us what could be improved.