Choosing an integration method begins with reading the integrand. The same product can become straightforward after a substitution, awkward under integration by parts, or simpler after an algebraic rewrite. A useful method exposes a derivative pattern that is already present, or replaces the problem with an easier one.

Worked examples show how the integrand’s structure guides the choice of method. They also distinguish finding an antiderivative from approximating a definite integral, which are related tasks with different outputs.

On this page

Choosing an integration method

Before introducing a new variable, simplify what is already there. Expand a short polynomial product, split a sum using linearity, or divide polynomials when the numerator has at least the denominator's degree. For instance, (x2+1)/x=x+1/x(x^2+1)/x=x+1/x for x≠0x\ne0. That algebra is enough to reduce its integral to two familiar terms.

A composition together with its inner derivative suggests substitution. A product in which one factor becomes simpler when differentiated may suit integration by parts. A quotient of polynomials may suit partial fractions. Powers of sine and cosine sometimes need an identity before either method becomes useful.

Choose a technique that makes the transformed integral easier to evaluate. For ∫xex2dx\int x e^{x^2}\,\mathrm{d}x, substitution handles the inner square. For ∫xexdx\int x e^x\,\mathrm{d}x, integration by parts removes the factor xx from the remaining integral. Similar-looking products can require different reasoning.

An integrand such as e−x2e^{-x^2} has no elementary antiderivative. That does not prevent its definite integral from existing or being approximated accurately. Here, numerical integration or a convergent series is a useful alternative to forcing an elementary formula.

Substitution reverses the chain rule

The chain rule explains the method. If F′=fF'=f, then differentiating F(g(x))F(g(x)) gives f(g(x))g′(x)f(g(x))g'(x). Therefore, on an interval where these expressions are defined,

∫f(g(x))g′(x)dx=F(g(x))+C.\int f(g(x))g'(x)\,\mathrm{d}x=F(g(x))+C.

In substitution notation, set u=g(x)u=g(x) and write du=g′(x)dx\mathrm{d}u=g'(x)\,\mathrm{d}x. This records the change in variable and its derivative factor. The OpenStax substitution chapter develops this connection for both indefinite and definite integrals.

Work through an indefinite integral

For ∫2xcos⁡(x2)dx\int 2x\cos(x^2)\,\mathrm{d}x, choose u=x2u=x^2. Then du=2xdx\mathrm{d}u=2x\,\mathrm{d}x, which accounts for the entire factor outside the cosine:

∫2xcos⁡(x2)dx=∫cos⁡udu.\int 2x\cos(x^2)\,\mathrm{d}x=\int\cos u\,\mathrm{d}u.
∫cos⁡udu=sin⁡u+C=sin⁡(x2)+C.\int\cos u\,\mathrm{d}u=\sin u+C=\sin(x^2)+C.

Differentiate the answer: ddxsin⁡(x2)=2xcos⁡(x2)\frac{\mathrm{d}}{\mathrm{d}x}\sin(x^2)=2x\cos(x^2). This checks both the outer function and the inner derivative. A leftover xx in an integral written entirely in uu would signal that the substitution was not finished.

Change the bounds as well as the variable

The example ∫012xex2dx\int_0^1 2xe^{x^2}\,\mathrm{d}x becomes ∫01eudu=e−1\int_0^1 e^u\,\mathrm{d}u=e-1. Its endpoints happen to keep the same numerical values. That coincidence does not mean bounds should normally be copied unchanged.

With different bounds, the change is visible. When x=1x=1, u=1u=1; when x=2x=2, u=4u=4. Hence

∫122xex2dx=∫14eudu=e4−e.\int_1^2 2xe^{x^2}\,\mathrm{d}x=\int_1^4 e^u\,\mathrm{d}u=e^4-e.

Either change the bounds and remain in uu, or substitute back to xx before using the original bounds. Do not combine an antiderivative in one variable with endpoints from the other.

Trigonometric integrals and substitutions

These names describe two different operations. A trigonometric integral already contains trigonometric functions. Trigonometric substitution introduces them to simplify an algebraic expression, usually a radical.

Integrating trigonometric powers

In ∫sin3⁡xcos⁡xdx\int\sin^3x\cos x\,\mathrm{d}x, the derivative of sin⁡x\sin x is present. With u=sin⁡xu=\sin x and du=cos⁡xdx\mathrm{d}u=\cos x\,\mathrm{d}x,

∫sin3⁡xcos⁡xdx=∫u3du=sin4⁡x4+C.\int\sin^3x\cos x\,\mathrm{d}x=\int u^3\,\mathrm{d}u=\frac{\sin^4x}{4}+C.

When that derivative factor is missing, an identity may help. Since sin2⁡x=(1−cos⁡(2x))/2\sin^2x=(1-\cos(2x))/2,

∫sin2⁡xdx=x2−sin⁡(2x)4+C.\int\sin^2x\,\mathrm{d}x=\frac{x}{2}-\frac{\sin(2x)}{4}+C.

The factor 1/41/4 matters: integrating cos⁡(2x)\cos(2x) contributes an additional factor 1/21/2. Angles are in radians in these derivative and integral formulas.

Replacing a radical with a trigonometric expression

Consider the reciprocal radical integral ∫1/9−x2dx\int 1/\sqrt{9-x^2}\,\mathrm{d}x. It is not the same problem as integrating 9−x2\sqrt{9-x^2}. Choose x=3sin⁡θx=3\sin\theta with −π/2<θ<π/2-\pi/2<\theta<\pi/2. This interval corresponds to −3<x<3-3<x<3 and makes cos⁡θ\cos\theta positive.

dx=3cos⁡θdθ,9−x2=3cos2⁡θ=3cos⁡θ.\mathrm{d}x=3\cos\theta\,\mathrm{d}\theta,\qquad \sqrt{9-x^2}=3\sqrt{\cos^2\theta}=3\cos\theta.

In general, cos2⁡θ=|cos⁡θ|\sqrt{\cos^2\theta}=\lvert\cos\theta\rvert. The chosen interval justifies removing the absolute value. The substitution therefore gives

∫dx9−x2=∫1dθ=arcsin⁡(x/3)+C.\int\frac{\mathrm{d}x}{\sqrt{9-x^2}}=\int 1\,\mathrm{d}\theta=\arcsin(x/3)+C.

The result holds on (−3,3)(-3,3). An integral reaching x=3x=3 needs a one-sided improper-integral treatment because the integrand is unbounded there. The trigonometric-substitution reference explains the corresponding substitutions for other quadratic radicals.

When approximation is the right technique

A numerical rule samples a function over a specified interval. Let h=(b−a)/nh=(b-a)/n and xi=a+ihx_i=a+ih. The composite trapezoidal rule joins neighbouring sample values by straight segments. For equal spacing, it gives

Tn=h2[f(x0)+2∑i=1n−1f(xi)+f(xn)].T_n=\frac{h}{2}\left[f(x_0)+2\sum_{i=1}^{n-1}f(x_i)+f(x_n)\right].

Composite Simpson's rule instead uses quadratic interpolation over pairs of subintervals. It requires an even positive number nn of equally spaced subintervals. For four subintervals,

S4=h3[f(x0)+4f(x1)+2f(x2)+4f(x3)+f(x4)].S_4=\frac{h}{3}\left[f(x_0)+4f(x_1)+2f(x_2)+4f(x_3)+f(x_4)\right].

Reproduce the Gaussian example

For I=∫01e−x2dxI=\int_0^1e^{-x^2}\,\mathrm{d}x, take n=4n=4 and h=1/4h=1/4. Use the unrounded function values in the calculation; the table shows six-decimal approximations for reading.

Four-subinterval input data for the Gaussian integral
Input xix_ie−xi2e^{-x_i^2}, approximatelyTrapezoidal weightSimpson weight
001.0000001.0000001111
1/41/40.9394130.9394132244
1/21/20.7788010.7788012222
3/43/40.5697830.5697832244
110.3678790.3678791111

Apply the weights and multiply by h/2h/2 or h/3h/3. The results are T4≈0.7429840978T_4\approx0.7429840978 and S4≈0.7468553798S_4\approx0.7468553798. A higher-precision reference calculation gives I≈0.7468241328I\approx0.7468241328.

Method comparison using unrounded calculations
MethodEstimate, rounded to six decimalsAbsolute error, approximately
Trapezoidal, n=4n=40.7429840.7429840.00384003500.0038400350
Simpson, n=4n=40.7468550.7468550.00003124700.0000312470

Simpson's result is closer for this function and this grid. This numerical comparison is an observed error, not a universal guarantee that one rule always wins.

A bound is different from a measured error

When ff has a continuous second derivative and |f′′(x)|≤M2\lvert f''(x)\rvert\le M_2 throughout [a,b][a,b], the trapezoidal error satisfies

|I−Tn|≤M2(b−a)312n2.\lvert I-T_n\rvert\le\frac{M_2(b-a)^3}{12n^2}.

For Simpson's rule, a continuous fourth derivative bounded by M4M_4 gives

|I−Sn|≤M4(b−a)5180n4.\lvert I-S_n\rvert\le\frac{M_4(b-a)^5}{180n^4}.

These hypotheses and bounds, detailed in OpenStax's numerical-integration chapter, allow a tolerance to be justified before the exact answer is known. Merely increasing the sample count without examining a singularity does not justify applying these smooth-function bounds.

A practical decision sequence

First identify whether the task asks for an antiderivative, a definite value or convergence of an improper integral. Then inspect the domain and simplify the integrand. Test a proposed method against the structure you want to remove.

Choose a method for a mathematical reason
StructureUseful starting pointCompletion check
Inner expression with its derivativeSubstitutionEvery variable and bound is accounted for.
Polynomial times exponential or trigonometric functionIntegration by partsThe remaining polynomial degree falls.
Quotient of polynomialsDivision, then partial fractions where usefulDecomposition recombines to the original rational function.
Trigonometric powersIdentity followed by substitutionThe derivative factor and angle scale are correct.
Quadratic radicalTrigonometric substitutionThe substitution interval justifies root signs.
Definite integral without a convenient elementary antiderivativeNumerical rule or convergent seriesThe approximation has a stated method and defensible error control.

Finally, differentiate an indefinite answer or check the scale, sign and bounds of a definite one. If a substitution or parts choice produces a harder integral, return to the original expression rather than continuing only because a method has been started.

Related topics

Develop the product-rule method in Integration by Parts and the algebraic method in Partial Fractions and Rational Functions. Before evaluating an integral with an infinite bound or an unbounded integrand, use the limiting definitions in Improper Integrals. For approximation methods and error control, continue to Numerical Integration.

Practice questions

  1. What substitution is suggested by ∫2xcos⁡(x2)dx\int2x\cos(x^2)\,\mathrm{d}x?

  2. Evaluate ∫012xex2dx\int_0^1 2xe^{x^2}\,\mathrm{d}x.

  3. Why can numerical integration be useful for ∫01e−x2dx\int_0^1e^{-x^2}\,\mathrm{d}x, and what should accompany its answer?

Check your answers
  1. Choose u=x2u=x^2, so du=2xdx\mathrm{d}u=2x\,\mathrm{d}x. Integrating cos⁡u\cos u and substituting back gives sin⁡(x2)+C\sin(x^2)+C.

  2. The substitution u=x2u=x^2 maps the endpoints 0,10,1 to 0,10,1. Thus the value is ∫01eudu=e−1\int_0^1 e^u\,\mathrm{d}u=e-1.

  3. The integrand e−x2e^{-x^2} has no elementary antiderivative, but the definite integral exists. Report the numerical method, its sample spacing or count, and an error bound or a clearly labelled comparison with a more accurate calculation.

Sources and further reading