Independent study guide

How to Choose an Integration Method

Compare substitution, integration by parts, partial fractions and trigonometric substitution, with sign-aware radical choices, worked examples and progressive checks.

Nablio · 35 minPublished

Return to Sheridan MATH15382D course guide. Tutoring coverage for this course must be confirmed before booking and payment.

Stuck on a step? Text us Email us Request a lesson

1. Read the structure before choosing a formula

Knowing integration formulas does not always tell you how to begin. A useful first question is: what change would make this integrand easier to integrate? You might rewrite its algebra, rename a composite expression, or trade one integral for a simpler one.

This lesson develops that judgment through substitution, integration by parts, partial fractions, and trigonometric substitution. You should know basic antiderivatives and the chain and product rules. By the end, aim to explain your first move, recognize when it is unhelpful, and check your result.

In the notation below, xx is the variable of integration, dxdx identifies that variable, and the integrand is the expression being integrated. An antiderivative is a function whose derivative equals the integrand. The symbol CC is an arbitrary real constant: adding a constant does not change a derivative. The number e≈2.718e\approx2.718 is the base of the natural exponential, and ln⁡\ln is its inverse logarithm.

Compare these almost identical integrals:

∫xex2 dxand∫xe2x dx\int x e^{x^2}\,dx \qquad\text{and}\qquad \int x e^{2x}\,dx

Both contain a product. In the first, the derivative of the exponent is 2x2x, so the outside xx supplies the needed derivative, up to a constant. In the second, the exponent’s derivative is just 22; the outside xx remains. That small change makes substitution natural for the first and integration by parts useful for the second.

A flexible map for choosing a first move
Figure 1. Use these questions as overlapping clues. After any rewrite, inspect the new integral again. Look for a move that leads toward a manageable integral.

Route through the lesson: simplify first → substitution → by parts → partial fractions → combine and check → trigonometric substitution → practice. Read the worked examples in order, then cover the solutions while you practise.

2. Simplify before reaching for a technique

An integral that looks like a quotient may need only division or cancellation. For example,

∫x2+1x dx=∫(x+1x)dx=x22+ln⁡∣x∣+C,x≠0.\begin{aligned}&\int\frac{x^2+1}{x}\,dx\\&=\int\left(x+\frac1x\right)dx\\&=\frac{x^2}{2}+\ln|x|+C,\qquad x\ne0.\end{aligned}

The logarithm appears because the power rule excludes exponent −1-1. There is no need to introduce another method. Similarly, expanding a short polynomial product can be easier than applying integration by parts. Keep a compact power such as (x2+4)8(x^2+4)^8 intact when its inside derivative is nearby.

If this algebra is the obstacle, revisit Before calculus algebra skills. Here, we will focus on what the algebra reveals about integration.

3. Substitution reverses the chain rule

Let ff be a function and let FF be one of its antiderivatives, so F′(u)=f(u)F^{\prime}(u)=f(u); a prime denotes differentiation. Let g(x)g(x) be a differentiable inner function and use uu as a name for its output. The chain rule says

ddxF(g(x))=f(g(x))g′(x).\frac{d}{dx}F(g(x))=f(g(x))g'(x).

Reading this backward explains substitution: when an integrand contains f(g(x))f(g(x)) together with g′(x)g'(x), setting u=g(x)u=g(x) packages those pieces into f(u) duf(u)\,du. The differential du=g′(x) dxdu=g'(x)\,dx records the change of variable; it is not an optional decoration.

Worked example with a constant mismatch

For ∫6x(x2+4)2 dx\int 6x(x^2+4)^2\,dx, choose u=x2+4u=x^2+4. Then du=2x dxdu=2x\,dx, so 6x dx=3 du6x\,dx=3\,du:

∫6x(x2+4)2 dx=3∫u2 du=u3+C=(x2+4)3+C.\begin{aligned}&\int 6x(x^2+4)^2\,dx\\&=3\int u^2\,du\\&=u^3+C\\&=(x^2+4)^3+C.\end{aligned}

The factor 33 compensates for the mismatch. Differentiating the result gives 3(x2+4)2(2x)3(x^2+4)^2(2x), exactly the original integrand.

Test the whole substitution

For ∫xex2 dx\int xe^{x^2}\,dx, u=x2u=x^2 gives 12∫eu du\frac12\int e^u\,du, hence 12ex2+C\frac12e^{x^2}+C. But removing the outside xx changes the problem: with ∫ex2 dx\int e^{x^2}\,dx, the same substitution does not leave ∫eu du\int e^u\,du. You cannot discard the factor needed to replace dxdx.

Checkpoint: after substituting, have you rewritten every variable and the differential consistently, and is the new integral easier? A visible inside derivative is a strong clue, not a requirement for every useful substitution. Sometimes you must also express a leftover xx in terms of uu.

4. See why the differential and bounds matter

Consider a definite integral with u=x2+1u=x^2+1 and du=2x dxdu=2x\,dx. When x=0x=0, u=1u=1; when x=1x=1, u=2u=2:

∫012xx2+1 dx=∫121u du=ln⁡2.\int_0^1\frac{2x}{x^2+1}\,dx=\int_1^2\frac1u\,du=\ln2.

The graphs below have different shapes and horizontal ranges, but equal shaded areas. Substitution changes both the function description and the horizontal measure.

Equal areas before and after the substitution u equals x squared plus one
Figure 2. Both shaded areas equal ln⁡2\ln 2. The orange regions show corresponding subintervals: xx from 0.50.5 to 0.80.8 maps to uu from 1.251.25 to 1.641.64. Their areas are equal too.

The symbol Δx\Delta x denotes a small change in xx; Δu\Delta u is the corresponding change in uu. For a sufficiently narrow strip, Δu≈2x Δx\Delta u\approx2x\,\Delta x; in the limit, du=2x dxdu=2x\,dx. The original height 2x/(x2+1)2x/(x^2+1) and the new height 1/u1/u describe the same accumulated quantity when paired with the appropriate width. Merely changing the function’s name would miss that compensation.

There are two consistent ways to finish a definite integral:

  • Change to uu throughout, including the bounds, as above
  • Find an antiderivative, substitute back to xx, and then use the original xx bounds

Do not combine a uu antiderivative with unchanged xx bounds. Do not append +C+C to the final numerical value: the constant cancels when you subtract endpoint values.

Quick comparison: ∫2x/(x2+1) dx\int 2x/(x^2+1)\,dx suggests a logarithm. The similar-looking ∫1/(x2+1) dx\int 1/(x^2+1)\,dx is the standard arctangent integral. The numerator changes which derivative pattern is present.

5. Integration by parts reverses the product rule

For this method, uu and vv denote differentiable functions of xx; they are new choices, unrelated to the substitution variable in the previous section. Their differentials are du=u′(x) dxdu=u^{\prime}(x)\,dx and dv=v′(x) dxdv=v^{\prime}(x)\,dx. The product rule gives d(uv)=u dv+v dud(uv)=u\,dv+v\,du. Integrate and rearrange:

∫u dv=uv−∫v du.\int u\,dv=uv-\int v\,du.

This exchanges one integral for another. Choose uu so that differentiating it helps, and choose dvdv so you can actually find vv. Then inspect the remaining integral before committing to a long calculation.

Worked example that reduces the difficulty

Return to ∫xe2x dx\int xe^{2x}\,dx. Differentiating xx removes it; integrating e2xe^{2x} is straightforward:

u=x,du=dx,dv=e2x dx,v=12e2x.\begin{aligned}u&=x,\\du&=dx,\\dv&=e^{2x}\,dx,\\v&=\frac12e^{2x}.\end{aligned}

∫xe2x dx=xe2x2−12∫e2x dx=xe2x2−e2x4+C.\begin{aligned}&\int xe^{2x}\,dx\\&=\frac{xe^{2x}}2-\frac12\int e^{2x}\,dx\\&=\frac{xe^{2x}}2-\frac{e^{2x}}4+C.\end{aligned}

Why is this progress? The remaining integral has lost its polynomial factor. Differentiating the answer produces two extra e2x/2e^{2x}/2 terms with opposite signs; they cancel, leaving xe2xxe^{2x}.

Reversing the choices is legal but unhelpful: taking u=e2xu=e^{2x} and dv=x dxdv=x\,dx produces a remaining integral containing x2e2xx^2e^{2x}. We increased the polynomial degree instead of reducing it. A valid formula application is not automatically a useful strategy.

A product can be hidden

For ∫ln⁡x dx\int\ln x\,dx, write the integrand as ln⁡x⋅1\ln x\cdot1, with x>0x>0. Choose u=ln⁡xu=\ln x and dv=dxdv=dx:

∫ln⁡x dx=xln⁡x−∫x1x dx=xln⁡x−x+C.\begin{aligned}&\int\ln x\,dx\\&=x\ln x-\int x\frac1x\,dx\\&=x\ln x-x+C.\end{aligned}

The gain comes from cancellation in v duv\,du, even though 1/x1/x may not look simpler on its own. This is why a rule such as “differentiate the logarithm first” is a useful suggestion, not a proof that a choice will work.

Common misconception: integrating a product does not mean multiplying its two antiderivatives. For example, ∫x⋅x dx=x3/3+C\int x\cdot x\,dx=x^3/3+C, whereas (x2/2)(x2/2)=x4/4(x^2/2)(x^2/2)=x^4/4 differentiates to x3x^3, not x2x^2.

When integration by parts brings the original integral back

One application does not always finish the job. With a polynomial times an exponential, repeated differentiation can remove the polynomial. With an exponential times a sine or cosine, differentiating the trigonometric factor twice returns to the same function with a changed sign. That can give an equation for the integral, even though no factor disappears.

Use this section after the one-pass example above. We’ll apply the method twice, then solve the equation that results. Trigonometric arguments are in radians.

Worked example: keep the same integral throughout the calculation

Find an antiderivative of exsin⁡xe^x\sin x. To keep the constants unambiguous, first define two particular functions with the same fixed lower bound:

I(x)=∫0xetsin⁡t dt,J(x)=∫0xetcos⁡t dt.\begin{aligned}I(x)&=\int_0^x e^t\sin t\,dt,\\J(x)&=\int_0^x e^t\cos t\,dt.\end{aligned}

The letter tt is the integration variable; xx is the upper bound. Both functions have value zero at x=0x=0, so neither contains an arbitrary constant. The integrands are continuous for all real inputs.

First pass: choose u=sin⁡tu=\sin t, dv=et dtdv=e^t\,dt, so du=cos⁡t dtdu=\cos t\,dt and v=etv=e^t. Use the definite form ∫abu dv=[uv]ab−∫abv du\int_a^b u\,dv=[uv]_a^b-\int_a^b v\,du:

I(x)=[etsin⁡t]0x−J(x)=exsin⁡x−J(x).\begin{aligned}I(x)&=[e^t\sin t]_0^x-J(x)\\&=e^x\sin x-J(x).\end{aligned}

Second pass: in J(x)J(x), differentiate the trigonometric factor again. With u=cos⁡tu=\cos t, dv=et dtdv=e^t\,dt, we have du=−sin⁡t dtdu=-\sin t\,dt. The minus sign in the formula and the minus sign in dudu give a plus:

J(x)=[etcos⁡t]0x+I(x)=excos⁡x−1+I(x).\begin{aligned}J(x)&=[e^t\cos t]_0^x+I(x)\\&=e^x\cos x-1+I(x).\end{aligned}

Substitute and solve: the returned I(x)I(x) is exactly the function defined at the start. Stop integrating and collect its terms.

I(x)=exsin⁡x−{excos⁡x−1+I(x)},2I(x)=ex(sin⁡x−cos⁡x)+1,I(x)=ex(sin⁡x−cos⁡x)+12.\begin{aligned}I(x)&=e^x\sin x\\&\quad-\{e^x\cos x-1+I(x)\},\\2I(x)&=e^x(\sin x-\cos x)+1,\\I(x)&=\frac{e^x(\sin x-\cos x)+1}{2}.\end{aligned}

Check the fixed-base condition: the last expression gives I(0)=0I(0)=0. Since I′(x)=exsin⁡xI'(x)=e^x\sin x, the full family of antiderivatives is

∫exsin⁡x dx=ex2(sin⁡x−cos⁡x)+C.\begin{gathered}\int e^x\sin x\,dx\\=\boxed{\frac{e^x}{2}(\sin x-\cos x)+C}.\end{gathered}

The fixed number 1/21/2 is absorbed into the single arbitrary real constant CC. Do not attach a new unrelated CC to each occurrence of II or JJ while solving the equation. Alternatively, indefinite-integral calculations may be done up to an additive constant, with one constant restored at the end.

Independent derivative check: the product rule gives

F(x)=ex2(sin⁡x−cos⁡x),F′(x)=ex2(sin⁡x−cos⁡x)+ex2(cos⁡x+sin⁡x)=exsin⁡x.\begin{aligned}F(x)&=\frac{e^x}{2}(\sin x-\cos x),\\F^{\prime}(x)&=\frac{e^x}{2}(\sin x-\cos x)\\&\quad+\frac{e^x}{2}(\cos x+\sin x)\\&=e^x\sin x.\end{aligned}

A return can also be unhelpful

After the first pass, choosing u=etu=e^t, dv=cos⁡t dtdv=\cos t\,dt in JJ would give J=exsin⁡x−IJ=e^x\sin x-I. Substitution then says only I=II=I: the second pass undid the first. That identity supplies no value. Keep differentiating the trigonometric factor instead. A useful return produces an equation such as 2I=known expression2I=\text{known expression}, with a nonzero coefficient of II.

Exam routine: name the target integral; write both choices of uu and dvdv; keep the signs and constant factors outside the next integral; replace a returned integral by its name; solve the equation; differentiate the result. For definite integrals, keep the same bounds in every integral and evaluate both ends of every boundary term.

Three progressive questions: repeat, recognize, then transfer

Use the hints whenever you need them. The worked example shows a returning integral; the first question shows a different reason to repeat the method.

1. Reduce a polynomial twice

Find ∫x2ex dx\int x^2e^x\,dx. Explain why repeating integration by parts helps here, and check your answer by differentiation.

Hint

Differentiate the polynomial each time: x2x^2 becomes 2x2x, then a constant. Integrating exe^x leaves its form unchanged.

Explained answer

First choose u=x2u=x^2, dv=ex dxdv=e^x\,dx. Then apply parts to the remaining ∫xex dx\int xe^x\,dx, choosing u=xu=x, dv=ex dxdv=e^x\,dx. Keeping the intermediate equalities up to an additive constant gives

∫x2ex dx=x2ex−2∫xex dx=x2ex−2(xex−ex)+C=ex(x2−2x+2)+C.\begin{aligned}&\int x^2e^x\,dx\\&=x^2e^x-2\int xe^x\,dx\\&=x^2e^x-2(xe^x-e^x)+C\\&=e^x(x^2-2x+2)+C.\end{aligned}

The polynomial degree decreases, so no equation for a returning integral is needed. The derivative is ex(x2−2x+2)+ex(2x−2)=x2exe^x(x^2-2x+2)+e^x(2x-2)=x^2e^x. This checks every coefficient.

2. Carry a new exponential factor through the cycle

Find ∫e2xcos⁡x dx\int e^{2x}\cos x\,dx. Do not copy the factor 1/21/2 from the worked answer. Show the equation produced by two applications of parts and verify the resulting primitive.

Hint

Use P(x)=∫0xe2tcos⁡t dtP(x)=\int_0^x e^{2t}\cos t\,dt and Q(x)=∫0xe2tsin⁡t dtQ(x)=\int_0^x e^{2t}\sin t\,dt. Differentiate cosine or sine and integrate the exponential. Each integration of e2te^{2t} introduces a factor 1/21/2.

Explained answer

With the fixed-base functions in the hint, the two passes give

P=e2xcos⁡x−12+12Q,Q=e2xsin⁡x2−12P.\begin{aligned}P&=\frac{e^{2x}\cos x-1}{2}+\frac12Q,\\Q&=\frac{e^{2x}\sin x}{2}-\frac12P.\end{aligned}

The lower boundary contributes −1/2-1/2 in the first line and zero in the second. Substitute the second equation into the first:

P=e2xcos⁡x−12+e2xsin⁡x4−14P,54P=e2x(2cos⁡x+sin⁡x)−24,P(x)=e2x(2cos⁡x+sin⁡x)−25.\begin{aligned}P&=\frac{e^{2x}\cos x-1}{2}\\&\quad+\frac{e^{2x}\sin x}{4}-\frac14P,\\\frac54P&=\frac{e^{2x}(2\cos x+\sin x)-2}{4},\\P(x)&=\frac{e^{2x}(2\cos x+\sin x)-2}{5}.\end{aligned}

This satisfies P(0)=0P(0)=0. The requested family is therefore

∫e2xcos⁡x dx=e2x5(2cos⁡x+sin⁡x)+C.\begin{gathered}\int e^{2x}\cos x\,dx\\=\frac{e^{2x}}5(2\cos x+\sin x)+C.\end{gathered}

Check by differentiation:

F′(x)=e2x5{2(2cos⁡x+sin⁡x)−2sin⁡x+cos⁡x}=e2xcos⁡x.\begin{aligned}F'(x)&=\frac{e^{2x}}5\{2(2\cos x+\sin x)\\&\qquad\qquad-2\sin x+\cos x\}\\&=e^{2x}\cos x.\end{aligned}

The denominator 5 comes from solving the equation. It is not an integration-by-parts formula to memorize.

3. Keep the endpoints through a definite calculation

Evaluate K=∫0π/2e−xsin⁡x dxK=\int_0^{\pi/2}e^{-x}\sin x\,dx using two applications of integration by parts directly with these bounds. Give an exact answer and a sign check.

Hint

Let L=∫0π/2e−xcos⁡x dxL=\int_0^{\pi/2}e^{-x}\cos x\,dx. An antiderivative of e−xe^{-x} is −e−x-e^{-x}. In the second boundary term, the value at zero is not zero.

Explained answer

Differentiate the trigonometric factor in each pass and keep the interval [0,π/2][0,\pi/2] unchanged:

K=[−e−xsin⁡x]0π/2+L=−e−π/2+L,L=[−e−xcos⁡x]0π/2−K=1−K.\begin{aligned}K&=[-e^{-x}\sin x]_0^{\pi/2}+L\\&=-e^{-\pi/2}+L,\\L&=[-e^{-x}\cos x]_0^{\pi/2}-K\\&=1-K.\end{aligned}

The second boundary term is 0−(−1)=10-(-1)=1. Substitution gives 2K=1−e−π/22K=1-e^{-\pi/2}, hence

K=1−e−π/22≈0.3961.\boxed{K=\frac{1-e^{-\pi/2}}2\approx0.3961.}

For an independent check, G(x)=−e−x(sin⁡x+cos⁡x)/2G(x)=-e^{-x}(\sin x+\cos x)/2 has derivative e−xsin⁡xe^{-x}\sin x. Then G(π/2)−G(0)G(\pi/2)-G(0) reproduces the exact value. Also, the integrand is positive inside the interval and smaller than sin⁡x\sin x, so 0<K<∫0π/2sin⁡x dx=10\lt K\lt\int_0^{\pi/2}\sin x\,dx=1. No arbitrary constant belongs in the final numerical answer.

If a coefficient or sign changed unexpectedly, mark the first line where it changed and redo that pass before retrying the full question. For broader method selection, return to the mixed practice below.

6. Partial-fraction decomposition reverses combining fractions

Partial fractions is an algebraic rewrite of a rational function, a ratio of polynomials. It reveals simpler terms whose antiderivatives you already know. Before decomposing, divide if the numerator’s degree is at least the denominator’s, and check whether cancellation or a direct substitution already finishes the job.

Worked example with two linear factors

The denominator of the following proper fraction has two distinct linear factors, so try one constant numerator above each. Call the unknown real coefficients AA and BB:

3x+5(x+1)(x+2)=Ax+1+Bx+2.\begin{aligned}&\frac{3x+5}{(x+1)(x+2)}\\&=\frac{A}{x+1}+\frac{B}{x+2}.\end{aligned}

Combining the right side gives the numerator A(x+2)+B(x+1)A(x+2)+B(x+1). For the two expressions to agree wherever defined, their polynomial numerators must agree:

3x+5=(A+B)x+(2A+B).\begin{aligned}3x+5&=(A+B)x\\&\quad+(2A+B).\end{aligned}

Thus A+B=3A+B=3 and 2A+B=52A+B=5, giving A=2A=2 and B=1B=1. Now integrate the equivalent sum:

∫3x+5(x+1)(x+2) dx=2ln⁡∣x+1∣+ln⁡∣x+2∣+C.\begin{aligned}&\int\frac{3x+5}{(x+1)(x+2)}\,dx\\&=2\ln|x+1|\\&\quad+\ln|x+2|+C.\end{aligned}

Recombining the derivative verifies the result. The expressions inside the absolute-value bars may be negative while the original rational function remains defined. The bars make each logarithm’s argument positive, as required for a real logarithm.

A denominator alone does not choose the method

For ∫(2x+3)/(x2+3x+2) dx\int(2x+3)/(x^2+3x+2)\,dx, the numerator is exactly the denominator’s derivative. Substitution immediately gives ln⁡∣x2+3x+2∣+C\ln|x^2+3x+2|+C. Partial fractions also works, giving ln⁡∣x+1∣+ln⁡∣x+2∣+C\ln|x+1|+\ln|x+2|+C. These expressions agree wherever the denominator is nonzero.

The worked example’s numerator, 3x+53x+5, is not a constant multiple of 2x+32x+3. Direct substitution therefore does not remove all the work. You can split off a derivative-matching part, but a remainder still needs attention.

Know the next cases

In the next forms, AA, BB, and DD are unknown real coefficients to determine by matching numerators; DD avoids confusing a coefficient with the integration constant CC. Repeated factors need all their powers: a denominator x(x+1)2x(x+1)^2 requires the form

Ax+Bx+1+D(x+1)2.\frac{A}{x}+\frac{B}{x+1}+\frac{D}{(x+1)^2}.

An irreducible quadratic cannot be factored into real linear factors. Such a quadratic, for example x2+1x^2+1 needs a possible linear numerator (Ax+B)/(x2+1)(Ax+B)/(x^2+1). It can lead to both logarithms and arctangents. Stopping because a denominator does not split into real linear factors misses these cases.

For example, splitting the numerator exposes both familiar patterns:

∫2x+3x2+1 dx=ln⁡(x2+1)+3arctan⁡x+C.\begin{aligned}&\int\frac{2x+3}{x^2+1}\,dx\\&=\ln(x^2+1)\\&\quad+3\arctan x+C.\end{aligned}

7. Combine methods and check the domain

Methods often work in sequence. In ∫x3ex2 dx\int x^3e^{x^2}\,dx, write x3 dx=x2(x dx)x^3\,dx=x^2(x\,dx). Substitution gives u=x2u=x^2, then by parts handles ueuue^u:

∫x3ex2 dx=12∫ueu du=12(u−1)eu+C=12(x2−1)ex2+C.\begin{aligned}&\int x^3e^{x^2}\,dx\\&=\frac12\int ue^u\,du\\&=\frac12(u-1)e^u+C\\&=\frac12(x^2-1)e^{x^2}+C.\end{aligned}

The useful question after substitution is again: what structure does the new integral have?

An antiderivative belongs on an interval

For the partial-fractions example, the integrand is undefined at −2-2 and −1-1. Its antiderivative formula works on each of the three intervals separated by those points. The constants on different intervals need not be equal.

An antiderivative plotted on three separate intervals with independently shifted constants
Figure 3. The solid curve uses C=0C=0. The dashed curve adds 2 on the left interval, subtracts 1 in the middle, and adds 1 on the right. Both have the required derivative wherever defined. No curve connects across the excluded points.

Do not use endpoint subtraction across a singularity without checking the relevant improper integrals. For example, ∫−111/x dx\int_{-1}^{1}1/x\,dx diverges as an ordinary improper integral; substituting endpoints into ln⁡∣x∣\ln|x| and reporting zero is invalid.

A practical stopping and checking routine

Differentiate your candidate answer and simplify toward the original integrand. Check signs, constant factors, and the interval where both expressions are valid. A numerical spot-check may catch a mistake, but it cannot prove an identity or convergence.

If a trial leaves a harder integral, reconsider it. Trigonometric identities, trigonometric substitution, repeated by parts, or other tools may be appropriate. Some continuous functions, including ex2e^{x^2}, have antiderivatives that cannot be expressed using elementary functions: finite combinations of the usual algebraic, exponential, logarithmic, trigonometric, and inverse-trigonometric functions. Their definite integrals over finite intervals can still be approximated numerically. Failure of one method is not proof that no elementary antiderivative exists.

When a quadratic radical remains, compare the sine, tangent and secant substitutions below. Match the identity, choose an angle interval and check its sign before calculating.

8. Trigonometric substitution: match the radical and its sign

A trigonometric substitution can turn a quadratic radical into a familiar trigonometric expression. First check whether an ordinary substitution already helps: an accompanying factor x dxx\,dx may make u=x2+a2u=x^2+a^2 sufficient. Otherwise, compare the three forms below. Let a>0a>0 be a fixed constant, and measure the new angle θ\theta in radians. Here sec⁡θ=1/cos⁡θ\sec\theta=1/\cos\theta.

Three radicals, three identities

A constant square minus a variable square: for a2−x2\sqrt{a^2-x^2}, choose sine because 1−sin⁡2θ=cos⁡2θ1-\sin^2\theta=\cos^2\theta.

x=asin⁡θ,dx=acos⁡θ dθ,−π2≤θ≤π2,a2−x2=a∣cos⁡θ∣=acos⁡θ.\begin{gathered}x=a\sin\theta,\\dx=a\cos\theta\,d\theta,\\-\frac\pi2\le\theta\le\frac\pi2,\\\sqrt{a^2-x^2}=a|\cos\theta|\\=a\cos\theta.\end{gathered}

This interval covers −a≤x≤a-a\le x\le a and gives cos⁡θ≥0\cos\theta\ge0. If the radical is in a denominator, exclude x=±ax=\pm a and use the open angle interval. For a complete sine example and the return to xx, see Question 6(b): sine substitution for a difference of squares.

A sum of squares: for a2+x2\sqrt{a^2+x^2}, choose tangent because 1+tan⁡2θ=sec⁡2θ1+\tan^2\theta=\sec^2\theta.

x=atan⁡θ,dx=asec⁡2θ dθ,−π2<θ<π2,a2+x2=a∣sec⁡θ∣=asec⁡θ.\begin{gathered}x=a\tan\theta,\\dx=a\sec^2\theta\,d\theta,\\-\frac\pi2<\theta<\frac\pi2,\\\sqrt{a^2+x^2}=a|\sec\theta|\\=a\sec\theta.\end{gathered}

This interval covers all real xx and gives sec⁡θ>0\sec\theta>0, even when x<0x<0. See Solution 6: tangent substitution with transformed bounds for a complete definite-integral example. These linked examples are original practice presented in a Concordia MATH 205 context; they are useful topic practice for other courses, rather than official assessments.

A variable square minus a constant square: for x2−a2\sqrt{x^2-a^2}, choose secant because sec⁡2θ−1=tan⁡2θ\sec^2\theta-1=\tan^2\theta. Start with the branch x>ax>a:

x=asec⁡θ,dx=asec⁡θtan⁡θ dθ,0<θ<π2,x2−a2=a∣tan⁡θ∣=atan⁡θ.\begin{gathered}x=a\sec\theta,\\dx=a\sec\theta\tan\theta\,d\theta,\\0<\theta<\frac\pi2,\\\sqrt{x^2-a^2}=a|\tan\theta|\\=a\tan\theta.\end{gathered}

Here both sec⁡θ\sec\theta and tan⁡θ\tan\theta are positive. The radical is also real on x≤−ax\le-a, but that branch needs a separate angle and sign choice. The general rule is z2=∣z∣\sqrt{z^2}=|z| for real zz; a chosen angle interval is what lets you remove the absolute value. At x=±ax=\pm a, check the original integrand before including an endpoint.

Worked example: secant on the positive branch

Find the following antiderivative for x>a>0x>a>0:

I=∫x2−a2x dx.I=\int\frac{\sqrt{x^2-a^2}}{x}\,dx.

Using x=asec⁡θx=a\sec\theta on 0<θ<π/20<\theta<\pi/2, replace the radical, denominator and differential together:

I=∫atan⁡θasec⁡θ⋅asec⁡θtan⁡θ dθ=a∫tan⁡2θ dθ=a∫(sec⁡2θ−1) dθ=atan⁡θ−aθ+C.\begin{aligned}I&=\int\frac{a\tan\theta}{a\sec\theta}\\&\qquad\cdot a\sec\theta\tan\theta\,d\theta\\&=a\int\tan^2\theta\,d\theta\\&=a\int(\sec^2\theta-1)\,d\theta\\&=a\tan\theta-a\theta+C.\end{aligned}

Return entirely to xx. From the substitution, cos⁡θ=a/x\cos\theta=a/x and tan⁡θ=x2−a2/a\tan\theta=\sqrt{x^2-a^2}/a. The inverse cosine arccos⁡\arccos has values in [0,π][0,\pi]; here it gives an angle in (0,π/2)(0,\pi/2). Thus

I=x2−a2−aarccos⁡(a/x)+C,x>a.\begin{aligned}I&=\sqrt{x^2-a^2}\\&\quad-a\arccos(a/x)+C,\\&\qquad x>a.\end{aligned}

Differentiate to check: write r=x2−a2>0r=\sqrt{x^2-a^2}>0. On this positive branch, 1−a2/x2=r/x\sqrt{1-a^2/x^2}=r/x, so the derivative is

xr−a2xr=x2−a2xr=rx.\begin{aligned}\frac{x}{r}-\frac{a^2}{xr}&=\frac{x^2-a^2}{xr}\\&=\frac r x.\end{aligned}

This is the original integrand. The branch condition matters in both the substitution and the derivative check.

Diagnose the negative-branch sign

For x<−ax<-a, one valid choice is still x=asec⁡θx=a\sec\theta, now with π/2<θ<π\pi/2<\theta<\pi. On this interval sec⁡θ<0\sec\theta<0 and tan⁡θ<0\tan\theta<0, so

x2−a2=a∣tan⁡θ∣=−atan⁡θ.\begin{aligned}\sqrt{x^2-a^2}&=a|\tan\theta|\\&=-a\tan\theta.\end{aligned}

For example, θ=2π/3\theta=2\pi/3 gives x=−2ax=-2a and tan⁡θ=−3\tan\theta=-\sqrt3. The square root equals a3>0a\sqrt3>0, whereas atan⁡θa\tan\theta is negative. Reusing the positive-branch simplification would reverse the sign. Work on each connected interval separately; a constant of integration on one branch does not determine the constant on the other.

Three progressive checks

Use the checks to practise; open an answer whenever it helps. Write the substitution, angle interval and differential before cancelling any factors.

1. Recognize and set up

For 25+x2\sqrt{25+x^2} with any real xx, choose a substitution. Give dxdx, an angle interval and the simplified radical with its sign justified.

Check the setup

Take x=5tan⁡θx=5\tan\theta with −π/2<θ<π/2-\pi/2<\theta<\pi/2. Then dx=5sec⁡2θ dθdx=5\sec^2\theta\,d\theta and 25+x2=5sec⁡θ\sqrt{25+x^2}=5\sec\theta, since sec⁡θ>0\sec\theta>0 on that interval. The identity is 1+tan⁡2θ=sec⁡2θ1+\tan^2\theta=\sec^2\theta.

2. Transfer to a new integral

For x>3x>3, evaluate the integral below. Explain why the square-root sign and your inverse-trigonometric answer fit this interval.

∫dxxx2−9.\int\frac{dx}{x\sqrt{x^2-9}}.

Check the calculation

Choose x=3sec⁡θx=3\sec\theta, with 0<θ<π/20<\theta<\pi/2. Then dx=3sec⁡θtan⁡θ dθdx=3\sec\theta\tan\theta\,d\theta and x2−9=3tan⁡θ>0\sqrt{x^2-9}=3\tan\theta>0. After cancellation,

∫dxxx2−9=13∫dθ=13arccos⁡(3/x)+C.\begin{aligned}&\int\frac{dx}{x\sqrt{x^2-9}}\\&=\frac13\int d\theta\\&=\frac13\arccos(3/x)+C.\end{aligned}

Because x>3x>3, the angle arccos⁡(3/x)\arccos(3/x) lies in (0,π/2)(0,\pi/2). Differentiating gives 1/(xx2−9)1/(x\sqrt{x^2-9}), using 1−9/x2=x2−9/x\sqrt{1-9/x^2}=\sqrt{x^2-9}/x.

3. Diagnose an unfamiliar branch

For x<−2x<-2, a student sets x=2sec⁡θx=2\sec\theta, with π/2<θ<π\pi/2<\theta<\pi, then writes x2−4=2tan⁡θ\sqrt{x^2-4}=2\tan\theta. Correct the sign and determine whether the transformed differential expression below is +12dθ+\tfrac12d\theta or −12dθ-\tfrac12d\theta:

dxxx2−4.\frac{dx}{x\sqrt{x^2-4}}.

Check the diagnosis

Here tan⁡θ<0\tan\theta<0, so x2−4=−2tan⁡θ>0\sqrt{x^2-4}=-2\tan\theta>0. With dx=2sec⁡θtan⁡θ dθdx=2\sec\theta\tan\theta\,d\theta,

dxxx2−4=2sec⁡θtan⁡θ−4sec⁡θtan⁡θ dθ=−12 dθ.\begin{aligned}&\frac{dx}{x\sqrt{x^2-4}}\\&=\frac{2\sec\theta\tan\theta}{-4\sec\theta\tan\theta}\,d\theta\\&=-\frac12\,d\theta.\end{aligned}

Also, dx/dθ>0dx/d\theta>0 while the original integrand is negative on x<−2x<-2, agreeing with the minus sign. The wrong root would produce the opposite sign.

If a sign or substitution feels uncertain, a tutor can compare the three identities with you, choose an angle interval and help you check each factor before you try another example. You can start from the basics. Tutoring sessions are currently offered in English.

9. Practice choosing before calculating

For every problem, write a one-sentence reason for your first move. Differentiate indefinite-integral answers to check them; for definite integrals, check the transformed bounds and endpoint arithmetic. Include +C+C only for indefinite integrals, and note any restrictions.

Level 1 with a suggested first move

1. Match a derivative. Choose u=x2+3u=x^2+3. What constant compensates for the difference between dudu and the numerator?

∫4xx2+3 dx\int\frac{4x}{x^2+3}\,dx

2. Reduce a factor. Try u=xu=x. Find vv carefully before using by parts.

∫xcos⁡(2x) dx\int x\cos(2x)\,dx

Level 2 with less guidance

3. Compare the clues. Explain why these two quotients suggest different standard antiderivatives.

(a)∫xx2+4 dx(b)∫1x2+4 dx\begin{aligned}\text{(a)}&\quad\int\frac{x}{x^2+4}\,dx\\\text{(b)}&\quad\int\frac1{x^2+4}\,dx\end{aligned}

4. Avoid unnecessary work. Simplify before choosing a named technique.

∫x2+3x+2x+1 dx\int\frac{x^2+3x+2}{x+1}\,dx

5. Decompose and justify. Find the two coefficients and state the allowed intervals.

∫2x+7(x+2)(x+3) dx\int\frac{2x+7}{(x+2)(x+3)}\,dx

Level 3 independent decisions

6. Choose and justify a route. Explain why each step helps.

∫x3cos⁡(x2) dx\int x^3\cos(x^2)\,dx

7. Keep the bounds consistent. Evaluate and explain your first move.

∫012x(x2+1)2 dx\int_0^1\frac{2x}{(x^2+1)^2}\,dx

8. Diagnose a false answer. Someone claims ∫ex2 dx=ex2/(2x)+C\int e^{x^2}\,dx=e^{x^2}/(2x)+C for x≠0x\ne0. Differentiate their candidate. Explain why “divide by the inside derivative” fails here.

10. Solutions with reasons

Solution 1

1. Since du=2x dxdu=2x\,dx, the numerator supplies 2 du2\,du:

2∫duu=2ln⁡(x2+3)+C.2\int\frac{du}{u}=2\ln(x^2+3)+C.

No absolute-value bars are needed because x2+3>0x^2+3>0 for every real xx.

Solution 2

2. Choose u=xu=x, du=dxdu=dx, dv=cos⁡(2x) dxdv=\cos(2x)\,dx, and v=sin⁡(2x)/2v=\sin(2x)/2:

∫xcos⁡(2x) dx=xsin⁡(2x)2+cos⁡(2x)4+C.\begin{aligned}&\int x\cos(2x)\,dx\\&=\frac{x\sin(2x)}2\\&\quad+\frac{\cos(2x)}4+C.\end{aligned}

The plus sign comes from subtracting the integral of a sine, whose antiderivative introduces another minus sign. Valid for all real xx.

Solution 3

3. In (a), u=x2+4u=x^2+4 gives du=2x dxdu=2x\,dx, so the answer is 12ln⁡(x2+4)+C\frac12\ln(x^2+4)+C. In (b), use the standard arctangent pattern, or set t=x/2t=x/2:

∫dxx2+4=12∫dtt2+1=12arctan⁡(x/2)+C.\begin{aligned}&\int\frac{dx}{x^2+4}\\&=\frac12\int\frac{dt}{t^2+1}\\&=\frac12\arctan(x/2)+C.\end{aligned}

Both are defined for every real xx. Their common denominator does not make their numerators interchangeable.

Solution 4

4. Factoring gives (x+1)(x+2)/(x+1)=x+2(x+1)(x+2)/(x+1)=x+2, but only for x≠−1x\ne-1. Thus the answer is x2/2+2x+Cx^2/2+2x+C on either interval avoiding −1-1. Cancellation simplifies the formula; it does not restore the missing point in the original domain.

Solution 5

5. Write A/(x+2)+B/(x+3)A/(x+2)+B/(x+3). Matching numerators yields A+B=2A+B=2 and 3A+2B=73A+2B=7, so A=3A=3, B=−1B=-1:

3ln⁡∣x+2∣−ln⁡∣x+3∣+C.3\ln|x+2|-\ln|x+3|+C.

Use it on (−∞,−3)(-\infty,-3), (−3,−2)(-3,-2), or (−2,∞)(-2,\infty), with an independent constant on each interval if needed.

Solution 6

6. Let u=x2u=x^2, so x3 dx=12u dux^3\,dx=\frac12u\,du. Then by parts gives

12∫ucos⁡u du=12(usin⁡u+cos⁡u)+C=12x2sin⁡(x2)+12cos⁡(x2)+C.\begin{aligned}&\frac12\int u\cos u\,du\\&=\frac12(u\sin u+\cos u)+C\\&=\frac12x^2\sin(x^2)\\&\quad+\frac12\cos(x^2)+C.\end{aligned}

Differentiating makes the extra xsin⁡(x2)x\sin(x^2) terms cancel. Valid for every real xx.

Solution 7

7. With u=x2+1u=x^2+1, the bounds become 11 and 22. An antiderivative is −1/u-1/u:

∫12u−2 du=−12−(−1)=12.\begin{aligned}&\int_1^2u^{-2}\,du\\&=-\frac12-(-1)\\&=\frac12.\end{aligned}

Solution 8

8. The derivative is

ddx(ex22x)=ex2−ex22x2,x≠0.\begin{aligned}&\frac{d}{dx}\left(\frac{e^{x^2}}{2x}\right)\\&=e^{x^2}-\frac{e^{x^2}}{2x^2},\\&x\ne0.\end{aligned}

The extra term proves the claim false. Dividing by a variable-dependent derivative creates a factor whose own derivative must be included. A constant inside derivative, as in e2xe^{2x}, behaves differently.

Take the reasoning to your next integral

Before you calculate, ask what your proposed move accomplishes. Substitution should reorganize a composition; by parts should produce a manageable remaining integral; partial fractions should expose simpler rational terms. Simplification may make any of them unnecessary.

Afterward, explain why the method helped and verify the answer by differentiation. This habit builds more transferable skill than remembering that one example used one particular formula.

Further reading

The explanations and figures in this lesson are original. For standard results, additional examples, and further practice, see OpenStax Calculus Volume 2 by Gilbert Strang and Edwin Herman:

Work through your own examples

Bring a few integrals you are unsure how to start. Taking integral calculus at CEGEP? See CEGEP calculus tutoring to find your college’s course page, then share your outline when asking for help.

Useful for

Work on the step you’re missing.

Tell us the subject and your preferred time. Nablio confirms the details by text or email.

Request a lesson