← Back to modules

Integrals

Understand accumulation and compute integrals.

Integration is the reverse of differentiation. Where derivatives break things apart to measure rates, integrals put things together to measure totals.

The integral abf(x)dx\int_a^b f(x)\,dx gives the net area between the curve y=f(x)y=f(x) and the xx-axis from x=ax=a to x=bx=b. But integrals are far more than area: they compute distance, work, probability, volume, and any accumulated quantity.

Mastering integration requires two skills: knowing the antiderivative formulas and knowing the techniques to transform difficult integrals into ones you can solve.

The big idea: Riemann sums

Divide the interval [a,b][a,b] into nn thin strips of width Δx=(ba)/n\Delta x = (b-a)/n. In each strip, build a rectangle with height f(xi)f(x_i).

The total area of all rectangles is approximately i=1nf(xi)Δx\sum_{i=1}^{n} f(x_i)\Delta x. This is a Riemann sum.

As nn \to \infty (strips get infinitely thin), the Riemann sum converges to the definite integral: abf(x)dx=limni=1nf(xi)Δx\int_a^b f(x)\,dx = \lim_{n\to\infty} \sum_{i=1}^{n} f(x_i)\Delta x.

This is why integrals represent accumulation: you are adding up infinitely many infinitesimally small contributions.

Helpful?

The Fundamental Theorem of Calculus (FTC)

FTC Part 1: if F(x)=axf(t)dtF(x) = \int_a^x f(t)\,dt, then F(x)=f(x)F'(x) = f(x). Differentiation and integration are inverse operations.

FTC Part 2: abf(x)dx=F(b)F(a)\int_a^b f(x)\,dx = F(b) - F(a) where FF is any antiderivative of ff (meaning F=fF'=f).

Part 2 is the computational powerhouse: instead of computing limits of Riemann sums, just find an antiderivative and evaluate at the bounds.

The connection to derivatives: if position is s(t)s(t) and velocity is v(t)=s(t)v(t) = s'(t), then total displacement is abv(t)dt=s(b)s(a)\int_a^b v(t)\,dt = s(b) - s(a). Integration recovers position from velocity.

Helpful?

Net area vs. total area

The definite integral abf(x)dx\int_a^b f(x)\,dx computes net (signed) area: regions where f(x)>0f(x) > 0 (above the xx-axis) contribute positively, and regions where f(x)<0f(x) < 0 (below the xx-axis) contribute negatively. Positive and negative areas can cancel.

If you want total area (always positive, no cancellation), integrate the absolute value: abf(x)dx\int_a^b |f(x)|\,dx.

In practice, find where f(x)=0f(x) = 0 (the zeros), split the integral at those zeros, and negate the integral on sub-intervals where f<0f < 0. This turns every piece positive before adding.

Example: 02πsinxdx=0\int_0^{2\pi} \sin x\,dx = 0 because the positive area on [0,π][0,\pi] exactly cancels the negative area on [π,2π][\pi,2\pi]. But the total area is 0πsinxdx+π2πsinxdx=2+2=4\int_0^\pi \sin x\,dx + \int_\pi^{2\pi} |\sin x|\,dx = 2 + 2 = 4.

Physical analogy: if velocity is positive (forward) for a while and then negative (backward), the integral of velocity gives displacement (net distance from start), which could be small or zero. The integral of v|v| gives total distance traveled.

Helpful?

Antiderivatives and the constant of integration

An antiderivative of f(x)f(x) is any function F(x)F(x) such that F(x)=f(x)F'(x) = f(x). The indefinite integral f(x)dx\int f(x)\,dx represents the entire family of antiderivatives.

Since the derivative of a constant is 00, any two antiderivatives of the same function differ by a constant: if F(x)=f(x)F'(x) = f(x) and G(x)=f(x)G'(x) = f(x), then F(x)G(x)=CF(x) - G(x) = C for some constant. That's why every indefinite integral includes +C+C.

The +C+C is not a formality — it's essential. In applications, the value of CC is determined by an initial condition. For instance, if an object has velocity v(t)=3t2v(t) = 3t^2 and position s(0)=5s(0) = 5, then s(t)=t3+Cs(t) = t^3 + C and s(0)=C=5s(0) = C = 5, so s(t)=t3+5s(t) = t^3 + 5. Without +C+C, you'd get s(t)=t3s(t) = t^3 and miss that the object started at position 5.

On definite integrals, the +C+C cancels: F(b)+C(F(a)+C)=F(b)F(a)F(b) + C - (F(a) + C) = F(b) - F(a). So you only need +C+C for indefinite integrals.

Helpful?

Common integrals (your core toolbox)

These are the integral formulas you must know by heart. Every other technique (substitution, by-parts, etc.) ultimately reduces an integral to one of these:

Power rule: xndx=xn+1n+1+C\int x^n\,dx = \frac{x^{n+1}}{n+1} + C for n1n \neq -1. Works for any real nn — including negative and fractional exponents like x3dx\int x^{-3}\,dx or xdx=x1/2dx\int \sqrt{x}\,dx = \int x^{1/2}\,dx.

The missing case: 1xdx=lnx+C\int \frac{1}{x}\,dx = \ln|x| + C. The power rule gives x00\frac{x^0}{0}, which is undefined, so lnx\ln|x| fills this gap. The absolute value is needed because ln\ln requires a positive input.

Exponentials: exdx=ex+C\int e^x\,dx = e^x + C and axdx=axlna+C\int a^x\,dx = \frac{a^x}{\ln a} + C for a>0,a1a > 0, a \neq 1.

Trigonometric: sinxdx=cosx+C\int \sin x\,dx = -\cos x + C, cosxdx=sinx+C\int \cos x\,dx = \sin x + C, sec2xdx=tanx+C\int \sec^2 x\,dx = \tan x + C, csc2xdx=cotx+C\int \csc^2 x\,dx = -\cot x + C, secxtanxdx=secx+C\int \sec x \tan x\,dx = \sec x + C, cscxcotxdx=cscx+C\int \csc x \cot x\,dx = -\csc x + C.

Inverse trig: 11x2dx=arcsinx+C\int \frac{1}{\sqrt{1-x^2}}\,dx = \arcsin x + C and 11+x2dx=arctanx+C\int \frac{1}{1+x^2}\,dx = \arctan x + C. These arise constantly after trig substitutions and partial fractions.

Verification: you can always check an antiderivative by differentiating it. If ddxF(x)=f(x)\frac{d}{dx} F(x) = f(x), then f(x)dx=F(x)+C\int f(x)\,dx = F(x) + C.

Helpful?

Substitution (reverse chain rule)

If the integrand looks like f(g(x))g(x)f(g(x)) \cdot g'(x), substitute u=g(x)u = g(x) so du=g(x)dxdu = g'(x)\,dx.

The integral becomes f(u)du\int f(u)\,du, which is usually simpler.

Example: 2xcos(x2)dx\int 2x \cos(x^2)\,dx. Let u=x2u = x^2, du=2xdxdu = 2x\,dx. Integral becomes cosudu=sinu+C=sin(x2)+C\int \cos u\,du = \sin u + C = \sin(x^2) + C.

For definite integrals, either convert the bounds to uu-values, or back-substitute and use the original bounds.

Tip: look for an "inner function" whose derivative (or a constant multiple of it) appears as a factor in the integrand.

Helpful?

Integration by parts (reverse product rule)

Formula: udv=uvvdu\int u\,dv = uv - \int v\,du. This comes from the product rule run backwards.

Choose uu and dvdv using the LIATE heuristic: Logarithms, Inverse trig, Algebraic (xnx^n), Trig, Exponentials. Pick uu from higher in this list.

Example: xexdx\int x e^x\,dx. Let u=xu = x (algebraic), dv=exdxdv = e^x\,dx. Then du=dxdu = dx, v=exv = e^x.

Result: xexexdx=xexex+C=ex(x1)+Cx e^x - \int e^x\,dx = x e^x - e^x + C = e^x(x-1) + C.

Sometimes you need to apply by-parts twice (e.g., x2exdx\int x^2 e^x\,dx) or use the tabular method for repeated applications.

A special case: exsinxdx\int e^x \sin x\,dx requires by-parts twice, then solving for the integral algebraically.

Helpful?

Trigonometric integrals

Integrals of the form sinmxcosnxdx\int \sin^m x \cos^n x\,dx come up constantly and have a systematic strategy based on whether mm and nn are odd or even.

Case 1 — one power is odd: peel off one factor of the odd-powered function, convert the remaining even power using sin2x+cos2x=1\sin^2 x + \cos^2 x = 1, and substitute with uu = the other function. Example: cos3xdx\int \cos^3 x\,dx. Peel: cos2xcosxdx=(1sin2x)cosxdx\int \cos^2 x \cdot \cos x\,dx = \int(1-\sin^2 x)\cos x\,dx. Let u=sinxu = \sin x: (1u2)du=uu3/3+C=sinxsin3x3+C\int(1-u^2)\,du = u - u^3/3 + C = \sin x - \frac{\sin^3 x}{3} + C.

Case 2 — both powers are even: use half-angle identities to reduce. sin2x=1cos(2x)2\sin^2 x = \frac{1-\cos(2x)}{2} and cos2x=1+cos(2x)2\cos^2 x = \frac{1+\cos(2x)}{2}. Repeat as needed. These can be tedious but are completely mechanical.

Other trig integrals: tannxdx\int \tan^n x\,dx and secnxdx\int \sec^n x\,dx have their own patterns. For tan\tan, peel off tan2x=sec2x1\tan^2 x = \sec^2 x - 1 and reduce. For sec\sec, use integration by parts or reduction formulas.

Key results worth knowing: tanxdx=lncosx+C=lnsecx+C\int \tan x\,dx = -\ln|\cos x| + C = \ln|\sec x| + C and secxdx=lnsecx+tanx+C\int \sec x\,dx = \ln|\sec x + \tan x| + C (this last one is famously non-obvious).

Helpful?

Trigonometric substitution

When the integrand involves a2x2\sqrt{a^2 - x^2}, a2+x2\sqrt{a^2 + x^2}, or x2a2\sqrt{x^2 - a^2}, no algebraic trick will eliminate the square root. Trig substitution works by exploiting Pythagorean identities to remove the radical.

a2x2\sqrt{a^2 - x^2}: let x=asinθx = a\sin\theta, dx=acosθdθdx = a\cos\theta\,d\theta. Then a2x2=acosθ\sqrt{a^2-x^2} = a\cos\theta. (Think: 1sin2θ=cos2θ1 - \sin^2\theta = \cos^2\theta.)

a2+x2\sqrt{a^2 + x^2}: let x=atanθx = a\tan\theta, dx=asec2θdθdx = a\sec^2\theta\,d\theta. Then a2+x2=asecθ\sqrt{a^2+x^2} = a\sec\theta. (Think: 1+tan2θ=sec2θ1 + \tan^2\theta = \sec^2\theta.)

x2a2\sqrt{x^2 - a^2}: let x=asecθx = a\sec\theta, dx=asecθtanθdθdx = a\sec\theta\tan\theta\,d\theta. Then x2a2=atanθ\sqrt{x^2-a^2} = a\tan\theta. (Think: sec2θ1=tan2θ\sec^2\theta - 1 = \tan^2\theta.)

After substituting, the radical vanishes, leaving a trig integral. Evaluate it, then convert back to xx using a reference triangle: draw a right triangle where the side lengths are chosen so sinθ\sin\theta, cosθ\cos\theta, or tanθ\tan\theta equals x/ax/a (or the appropriate ratio).

Recognition tip: the expression doesn't have to be a clean a2x2\sqrt{a^2-x^2}. Complete the square first if needed. For instance, 6xx2=9(x3)2\sqrt{6x-x^2} = \sqrt{9-(x-3)^2} after completing the square, and now the a2u2a^2 - u^2 pattern is visible with u=x3u = x-3, a=3a = 3.

Helpful?

Partial fractions

To integrate a rational function P(x)Q(x)\frac{P(x)}{Q(x)} where degP<degQ\deg P < \deg Q, decompose it into simpler fractions.

Factor the denominator, then write: 1(x1)(x+2)=Ax1+Bx+2\frac{1}{(x-1)(x+2)} = \frac{A}{x-1} + \frac{B}{x+2}.

Solve for AA and BB by clearing denominators and comparing coefficients or plugging in strategic xx values.

Repeated factors: 1(x1)2\frac{1}{(x-1)^2} requires terms Ax1+B(x1)2\frac{A}{x-1} + \frac{B}{(x-1)^2}.

Irreducible quadratics: for (x2+1)(x^2+1) in the denominator, the numerator is Ax+BAx+B, not just AA.

If degPdegQ\deg P \geq \deg Q, perform polynomial long division first, then decompose the remainder.

Helpful?

Improper integrals

An improper integral has an infinite limit of integration or an integrand that blows up within the interval. In either case, you can't just plug in bounds — you need a limit.

Type 1 — infinite bound: replace \infty with a variable and take a limit. 11x2dx=limb1b1x2dx=limb[1/x]1b=limb(1/b+1)=1\int_1^{\infty} \frac{1}{x^2}\,dx = \lim_{b\to\infty} \int_1^b \frac{1}{x^2}\,dx = \lim_{b\to\infty} [-1/x]_1^b = \lim_{b\to\infty}(-1/b+1) = 1. Converges.

Type 2 — infinite discontinuity: the integrand blows up at a point in [a,b][a,b]. Approach the bad point with a limit. 011xdx=lima0+a1x1/2dx=lima0+[2x]a1=20=2\int_0^1 \frac{1}{\sqrt{x}}\,dx = \lim_{a\to 0^+} \int_a^1 x^{-1/2}\,dx = \lim_{a\to 0^+} [2\sqrt{x}]_a^1 = 2 - 0 = 2. Converges.

If the limit is finite, the improper integral converges. If the limit is ±\pm\infty or does not exist, it diverges.

Key result: 11xpdx\int_1^{\infty} \frac{1}{x^p}\,dx converges if p>1p > 1 and diverges if p1p \leq 1. This is the continuous analog of the p-series test (1/np\sum 1/n^p) and serves as a benchmark for comparison.

Comparison test for improper integrals: if 0f(x)g(x)0 \leq f(x) \leq g(x) and g\int g converges, then f\int f converges. If f\int f diverges, then g\int g diverges. Same logic as for series.

Helpful?

Which technique should I use? (Decision tree)

When facing an unfamiliar integral, work through this decision tree in order:

1. Simplify first: can algebra, trig identities, or long division reduce it? Expanding a product or splitting a fraction may reveal a standard form. Never skip this step.

2. Check the table: is it already a standard form you know? sec2xdx\int \sec^2 x\,dx, exdx\int e^x\,dx, 1/(1+x2)dx\int 1/(1+x^2)\,dx, etc. If so, write down the answer immediately.

3. Substitution (uu-sub): is there a function composition f(g(x))f(g(x)) with g(x)g'(x) (or a constant multiple of it) present in the integrand? If yes, let u=g(x)u = g(x).

4. Trig integrals: powers of sin\sin and cos\cos (or tan\tan/sec\sec)? Use the odd/even strategies and trig identities.

5. Trig substitution: see a2x2\sqrt{a^2 - x^2}, a2+x2\sqrt{a^2 + x^2}, or x2a2\sqrt{x^2 - a^2}? Match the pattern to the right substitution.

6. Integration by parts: product of two different types (e.g., xexx \cdot e^x, x2sinxx^2 \cdot \sin x, lnxxn\ln x \cdot x^n)? Use LIATE to choose uu.

7. Partial fractions: rational function P(x)/Q(x)P(x)/Q(x) where QQ can be factored? Decompose and integrate each piece.

8. If none of these work: try a creative rewrite (multiply by 11 in a clever form, add and subtract a term, complete the square) and re-enter the decision tree. Practice is the only way to develop speed and intuition.

Helpful?

Area between curves and volumes (preview)

Integration extends naturally from 'area under one curve' to 'area between two curves' and 'volume of a solid.' The strategy is always the same: slice, approximate each slice, and integrate.

Area between curves: the area between y=f(x)y = f(x) (top) and y=g(x)y = g(x) (bottom) from x=ax = a to x=bx = b is ab[f(x)g(x)]dx\int_a^b [f(x) - g(x)]\,dx. First determine which function is on top in each sub-interval. If the curves cross, split the integral at the crossing points.

Volume by disks/washers: revolve a region around the xx-axis. Each cross-section is a disk (or washer if there's a hole). V=πab[f(x)]2dxV = \pi\int_a^b [f(x)]^2\,dx for a solid disk of radius f(x)f(x). For a washer: V=πab([R(x)]2[r(x)]2)dxV = \pi\int_a^b ([R(x)]^2 - [r(x)]^2)\,dx where RR is the outer radius and rr the inner.

Volume by cylindrical shells: revolve around the yy-axis. Instead of slicing perpendicular to the axis, wrap thin cylindrical shells around it. V=2πabxf(x)dxV = 2\pi\int_a^b x \cdot f(x)\,dx.

These topics are expanded in the Applications of Integration module. The key insight here: integration is not just about area — it's a universal tool for accumulating any quantity that can be sliced into thin pieces.

Helpful?

Worked Practice Problems (5 examples)

Study these solved examples to understand the techniques. Then head to Practice to try problems on your own.

Practice on your own →
1

Problem 1

Compute x3dx\int x^3\,dx

Step-by-Step Solution

1

Power rule: xndx=xn+1n+1+C\int x^n\,dx = \frac{x^{n+1}}{n+1} + C.

2

x44+C\frac{x^4}{4} + C.

Final Answer: x44+C\frac{x^4}{4} + C

2

Problem 2

Compute 4xdx\int 4x\,dx

Step-by-Step Solution

1

4x22+C=2x2+C4 \cdot \frac{x^2}{2} + C = 2x^2 + C.

Final Answer: 2x2+C2x^2 + C

3

Problem 3

Compute exdx\int e^x\,dx

Step-by-Step Solution

1

The integral of exe^x is itself.

2

ex+Ce^x + C.

Final Answer: ex+Ce^x + C

4

Problem 4

Compute cos(x)dx\int \cos(x)\,dx

Step-by-Step Solution

1

The integral of cos(x)\cos(x) is sin(x)\sin(x).

Final Answer: sin(x)+C\sin(x) + C

5

Problem 5

Compute 1xdx\int \frac{1}{x}\,dx

Step-by-Step Solution

1

This is a fundamental integral.

2

lnx+C\ln|x| + C.

Final Answer: lnx+C\ln|x| + C

Frequently asked questions about integrals

What is an integral in calculus?
An integral computes the accumulated area under a curve. Definite integrals give a numerical value, while indefinite integrals give a family of antiderivative functions.
What is u-substitution?
U-substitution is an integration technique where you replace part of the integrand with a new variable u to simplify the expression into a standard form you can integrate.
What is the difference between definite and indefinite integrals?
A definite integral has upper and lower bounds and evaluates to a number (the net area). An indefinite integral has no bounds and gives a general antiderivative plus a constant C.