In short

There are five integrals — each involving x^2 and a^2 in the denominator or under a square root — that appear over and over in calculus, physics, and engineering. Each has a clean closed-form answer involving inverse trigonometric functions or logarithms. Memorizing the results is useful; understanding the derivations is essential.

You have seen substitution turn a difficult integral into a simple one. But some integrals come up so frequently — in differential equations, in physics, in probability — that it is worth working them out once, recording the results, and then using the results directly every time they appear.

This article derives five such integrals. All five have the same structure: a denominator or a square root built from x^2 and a constant a^2. The constant a is positive throughout.

The five integrals at a glance

Here they are, stated together so you can see the family:

Integral Result
\displaystyle\int \frac{dx}{x^2 + a^2} \dfrac{1}{a}\tan^{-1}\!\left(\dfrac{x}{a}\right) + C
\displaystyle\int \frac{dx}{x^2 - a^2} \dfrac{1}{2a}\ln\left\lvert\dfrac{x-a}{x+a}\right\rvert + C
\displaystyle\int \frac{dx}{\sqrt{a^2 - x^2}} \sin^{-1}\!\left(\dfrac{x}{a}\right) + C
\displaystyle\int \frac{dx}{\sqrt{x^2 + a^2}} \ln\left\lvert x + \sqrt{x^2 + a^2}\right\rvert + C
\displaystyle\int \frac{dx}{\sqrt{x^2 - a^2}} \ln\left\lvert x + \sqrt{x^2 - a^2}\right\rvert + C

Now the derivations.

Integral 1: \int \frac{dx}{x^2 + a^2}

Factor a^2 out of the denominator:

\int \frac{dx}{x^2 + a^2} = \int \frac{dx}{a^2\!\left(\frac{x^2}{a^2} + 1\right)} = \frac{1}{a^2}\int \frac{dx}{\left(\frac{x}{a}\right)^2 + 1}

Set t = \frac{x}{a}, so dt = \frac{dx}{a}, i.e. dx = a\,dt.

= \frac{1}{a^2} \cdot a \int \frac{dt}{t^2 + 1} = \frac{1}{a}\int \frac{dt}{1 + t^2} = \frac{1}{a}\tan^{-1} t + C

Substituting back t = x/a:

Result 1

\int \frac{dx}{x^2 + a^2} = \frac{1}{a}\tan^{-1}\!\left(\frac{x}{a}\right) + C

The geometric reason this involves \tan^{-1}: the integrand \frac{1}{x^2 + a^2} is the equation of a bell-shaped curve centred at x = 0, and the area under such a curve from 0 to x is an arc-tangent function. For a = 1, the integrand is \frac{1}{1 + x^2}, which is exactly the derivative of \tan^{-1} x — the defining relationship of the inverse tangent.

The integrand $\frac{1}{x^2 + a^2}$ for $a = 2$ (solid) and $a = 1$ (dashed). A larger $a$ gives a flatter, wider curve. The area under each curve from $-\infty$ to $\infty$ is $\pi/a$ — finite, despite the curve extending forever in both directions.

Integral 2: \int \frac{dx}{x^2 - a^2}

The denominator factors: x^2 - a^2 = (x - a)(x + a). Use partial fractions:

\frac{1}{x^2 - a^2} = \frac{1}{(x-a)(x+a)} = \frac{A}{x-a} + \frac{B}{x+a}

Multiplying both sides by (x-a)(x+a): 1 = A(x+a) + B(x-a). Setting x = a gives 1 = 2aA, so A = \frac{1}{2a}. Setting x = -a gives 1 = -2aB, so B = -\frac{1}{2a}.

Therefore:

\int \frac{dx}{x^2 - a^2} = \frac{1}{2a}\int\left(\frac{1}{x-a} - \frac{1}{x+a}\right)dx = \frac{1}{2a}\big[\ln|x-a| - \ln|x+a|\big] + C

Result 2

\int \frac{dx}{x^2 - a^2} = \frac{1}{2a}\ln\left|\frac{x-a}{x+a}\right| + C

Notice this is a logarithm, not an inverse trig function. The difference between x^2 + a^2 (no real roots, answer is \tan^{-1}) and x^2 - a^2 (two real roots at \pm a, answer is \ln) is fundamental. The factorization into partial fractions is only possible because x^2 - a^2 splits over the reals.

The integral is undefined at x = \pm a — the integrand has vertical asymptotes there, which is exactly where the denominator is zero.

Integral 3: \int \frac{dx}{\sqrt{a^2 - x^2}}

This is the one that arises from the arc length of a circle, the definition of inverse sine, and a hundred problems in physics.

Set x = a\sin\theta, so dx = a\cos\theta\,d\theta. Then \sqrt{a^2 - x^2} = \sqrt{a^2 - a^2\sin^2\theta} = a\cos\theta.

\int \frac{a\cos\theta\,d\theta}{a\cos\theta} = \int d\theta = \theta + C = \sin^{-1}\!\left(\frac{x}{a}\right) + C

Result 3

\int \frac{dx}{\sqrt{a^2 - x^2}} = \sin^{-1}\!\left(\frac{x}{a}\right) + C

This integral only makes sense for |x| < a — outside that range, a^2 - x^2 is negative and the square root is not real. The domain matches the domain of \sin^{-1}(x/a), which is [-a, a].

For $a = 2$: the black curve is the integrand $\frac{1}{\sqrt{4-x^2}}$, which shoots to infinity as $x$ approaches $\pm 2$. The red curve is its antiderivative $\sin^{-1}(x/2)$, a smooth arc from $-\pi/2$ to $\pi/2$. Despite the integrand blowing up, the antiderivative stays finite — the area under the curve from $-2$ to $2$ is exactly $\pi$.

Integral 4: \int \frac{dx}{\sqrt{x^2 + a^2}}

Set x = a\tan\theta, so dx = a\sec^2\theta\,d\theta and \sqrt{x^2 + a^2} = a\sec\theta.

\int \frac{a\sec^2\theta\,d\theta}{a\sec\theta} = \int \sec\theta\,d\theta = \ln|\sec\theta + \tan\theta| + C

Now convert back to x. Since \tan\theta = x/a, the right triangle has opposite x, adjacent a, hypotenuse \sqrt{x^2 + a^2}. So \sec\theta = \frac{\sqrt{x^2+a^2}}{a}.

= \ln\left|\frac{\sqrt{x^2+a^2}}{a} + \frac{x}{a}\right| + C = \ln\left|\frac{x + \sqrt{x^2+a^2}}{a}\right| + C

Since \ln(1/a) is a constant, it absorbs into C:

Result 4

\int \frac{dx}{\sqrt{x^2 + a^2}} = \ln\left|x + \sqrt{x^2 + a^2}\right| + C

This result is sometimes written as \sinh^{-1}(x/a) + C using the inverse hyperbolic sine, because \sinh^{-1} t = \ln(t + \sqrt{t^2 + 1}). The two forms are the same function in different notation.

Integral 5: \int \frac{dx}{\sqrt{x^2 - a^2}}

Set x = a\sec\theta, so dx = a\sec\theta\tan\theta\,d\theta and \sqrt{x^2 - a^2} = a\tan\theta.

\int \frac{a\sec\theta\tan\theta\,d\theta}{a\tan\theta} = \int \sec\theta\,d\theta = \ln|\sec\theta + \tan\theta| + C

Since \sec\theta = x/a and \tan\theta = \sqrt{x^2 - a^2}/a:

= \ln\left|\frac{x}{a} + \frac{\sqrt{x^2-a^2}}{a}\right| + C = \ln\left|x + \sqrt{x^2-a^2}\right| + C

Result 5

\int \frac{dx}{\sqrt{x^2 - a^2}} = \ln\left|x + \sqrt{x^2 - a^2}\right| + C

This is valid for |x| > a, where the expression under the square root is positive. In hyperbolic notation, it is \cosh^{-1}(x/a) + C.

Notice how Results 4 and 5 have nearly identical forms — both are logarithms of x + \sqrt{\cdot}. The only difference is the sign inside the square root: x^2 + a^2 versus x^2 - a^2.

Worked examples

Example 1: Applying Result 1 with a twist

Find \displaystyle\int \frac{dx}{4x^2 + 9}.

Step 1. Rewrite the denominator in the form x^2 + a^2 (with a coefficient).

4x^2 + 9 = 4\!\left(x^2 + \frac{9}{4}\right)

So a^2 = 9/4, meaning a = 3/2.

Why: Result 1 applies to \int \frac{dx}{x^2 + a^2}, so you need to factor out the coefficient of x^2 to put the denominator in that exact form.

Step 2. Factor out the 4.

\int \frac{dx}{4x^2 + 9} = \frac{1}{4}\int \frac{dx}{x^2 + (3/2)^2}

Why: the constant factor \frac{1}{4} comes out of the integral, leaving the standard form inside.

Step 3. Apply Result 1 with a = 3/2.

= \frac{1}{4} \cdot \frac{1}{3/2}\tan^{-1}\!\left(\frac{x}{3/2}\right) + C = \frac{1}{4} \cdot \frac{2}{3}\tan^{-1}\!\left(\frac{2x}{3}\right) + C

Why: the \frac{1}{a} factor from Result 1 gives \frac{2}{3}, and x/a = x/(3/2) = 2x/3.

Step 4. Simplify.

= \frac{1}{6}\tan^{-1}\!\left(\frac{2x}{3}\right) + C

Result: \displaystyle\frac{1}{6}\tan^{-1}\!\left(\frac{2x}{3}\right) + C.

The dashed curve is $\frac{1}{4x^2+9}$ — a bell shape peaking at $1/9$ when $x = 0$. The solid red curve is the antiderivative $\frac{1}{6}\tan^{-1}(2x/3)$, which rises from $-\pi/12$ (far left) toward $\pi/12$ (far right). The antiderivative is steepest where the integrand is tallest — at $x = 0$.

Differentiation check: \frac{d}{dx}\!\left[\frac{1}{6}\tan^{-1}\!\left(\frac{2x}{3}\right)\right] = \frac{1}{6} \cdot \frac{1}{1 + (2x/3)^2} \cdot \frac{2}{3} = \frac{1}{6} \cdot \frac{2}{3} \cdot \frac{1}{1 + 4x^2/9} = \frac{1}{9} \cdot \frac{9}{9 + 4x^2} = \frac{1}{4x^2 + 9}. Confirmed.

Example 2: Applying Result 5 to a geometric problem

Find \displaystyle\int \frac{dx}{\sqrt{x^2 - 16}}.

Step 1. Recognize the form. The integrand is \frac{1}{\sqrt{x^2 - a^2}} with a^2 = 16, so a = 4.

Why: this matches Result 5 directly, with no coefficient adjustment needed.

Step 2. Apply Result 5.

\int \frac{dx}{\sqrt{x^2 - 16}} = \ln\left|x + \sqrt{x^2 - 16}\right| + C

Why: Result 5 gives the answer in one line once you have identified a.

Step 3. Note the domain: the answer is valid for |x| > 4, since x^2 - 16 must be positive for the square root to be real.

Step 4. Verify by differentiating. Let F(x) = \ln\left|x + \sqrt{x^2-16}\right|. Then

F'(x) = \frac{1 + \frac{2x}{2\sqrt{x^2-16}}}{x + \sqrt{x^2-16}} = \frac{1 + \frac{x}{\sqrt{x^2-16}}}{x + \sqrt{x^2-16}} = \frac{\frac{\sqrt{x^2-16} + x}{\sqrt{x^2-16}}}{x + \sqrt{x^2-16}} = \frac{1}{\sqrt{x^2-16}}

Why: the numerator after combining fractions is \sqrt{x^2-16} + x, which cancels with the denominator x + \sqrt{x^2-16}, leaving \frac{1}{\sqrt{x^2-16}}.

Result: \displaystyle\ln\left|x + \sqrt{x^2 - 16}\right| + C, valid for |x| > 4.

For $x > 4$: the dashed curve is $\frac{1}{\sqrt{x^2-16}}$, which shoots to infinity as $x$ approaches $4$ from the right. The solid red curve is the antiderivative (shifted so that $F(4) = 0$ for visual clarity). The antiderivative climbs steeply near $x = 4$ — where the integrand is large — and then grows slowly as the integrand flattens out.

Common confusions

Going deeper

If you came here for the five formulas and their derivations, you have them. What follows is for readers who want the geometric connections and the unifying viewpoint.

The right-triangle interpretation

All three trig substitutions produce the same picture: a right triangle where the sides are x, a, and \sqrt{x^2 \pm a^2} or \sqrt{a^2 - x^2}. After integrating in \theta, you convert back to x by reading off the sides of this triangle.

For Result 3 (x = a\sin\theta): opposite = x, hypotenuse = a, adjacent = \sqrt{a^2 - x^2}.

For Result 4 (x = a\tan\theta): opposite = x, adjacent = a, hypotenuse = \sqrt{x^2 + a^2}.

For Result 5 (x = a\sec\theta): hypotenuse = x, adjacent = a, opposite = \sqrt{x^2 - a^2}.

Drawing the triangle is the fastest way to convert back. If, after integrating, you have \cos\theta in the answer and you used x = a\tan\theta, the triangle immediately tells you \cos\theta = a/\sqrt{x^2 + a^2}.

Hyperbolic substitutions as an alternative

Instead of x = a\sec\theta for \sqrt{x^2 - a^2}, you can use x = a\cosh t. Then \sqrt{x^2 - a^2} = a\sinh t and dx = a\sinh t\,dt. The integral \int \frac{dx}{\sqrt{x^2 - a^2}} becomes \int dt = t + C = \cosh^{-1}(x/a) + C, which equals \ln|x + \sqrt{x^2 - a^2}| + C by the logarithmic definition of \cosh^{-1}.

Hyperbolic substitutions avoid the \sec\theta integral entirely, which some find cleaner. They are less commonly taught in Indian textbooks but are standard in university-level mathematics.

The unified viewpoint: all five integrals come from one idea

Strip away the specifics and the five integrals all follow the same script:

  1. Write the integrand in terms of a squared expression.
  2. Choose a substitution (algebraic, trigonometric, or hyperbolic) that collapses the squared expression using an identity.
  3. Integrate the simplified form.
  4. Convert back.

The identities doing the heavy lifting are \sin^2\theta + \cos^2\theta = 1, 1 + \tan^2\theta = \sec^2\theta, and \sec^2\theta - 1 = \tan^2\theta (or their hyperbolic cousins). Partial fractions plays the role of the identity for Result 2, where x^2 - a^2 factors into linear terms.

Understanding this pattern means you are not memorizing five disconnected formulas — you are learning one technique applied five ways.

Where this leads next

These five integrals are the building blocks for the next layer of standard forms.