When faced with something like $\int \frac{1}{\sqrt{1+x^2}} \dx$, my first instinct has usually been to panic, and then to try trig (or hyperbolic) substitutions more or less at random. But is there a better way?

There are six such integrals altogether:

• $\int \frac{1}{\sqrt{1-x^2}} \dx = \arcsin(x) + C$
• $\int \frac{-1}{\sqrt{1-x^2}} \dx = \arccos(x) + C$
• $\int \frac{1}{\sqrt{1+x^2}} \dx = \arsinh(x) + C$
• $\int \frac{1}{\sqrt{x^2-1}} \dx = \arcosh(x) + C$
• $\int \frac{1}{1+x^2} \dx = \arctan(x) + C$
• $\int \frac{1}{1-x^2} \dx = \artanh(x) + C$

It sort of looks like there’s a pattern… but then there isn’t. How do we go about spotting what’s going on?

### Sketch the integrand

I’m going to leave the $\arctan$ and $\artanh$ integrals for later and focus on the ones that have a square root on the denominator.

The square roots are extremely useful: they tell you where things are defined.

For example: when the integrand is $\frac{\pm 1}{\sqrt{1-x^2}}$, this is only defined when $1-x^2 \ge 0$, so $-1 \le x \le 1$. What functions do we know that have a range like that? That’s right, the sines and cosines - so these two must correspond to the arcsine and arccosine functions. Which way round? Think about the gradients: $\arccos(-1) = \pi$ and $\arccos(1) = 0$, so arccosine has a negative gradient; it must correspond to the negative integrand. You can make a similar argument for arcsine.

How about the others? When the integrand is $\frac{1}{\sqrt{1 + x^2}}$, that’s clearly defined for all values of $x$ - arsinh fits the bill there.

We can also use Osborn’s Law, which says that ’if you have a trigonometric identity involving squares, replacing $\sin^2(x)$ with $-\sinh^2(x)$ and $\cos^2(x)$ with $\cosh^2(x)$ will give you a corresponding hyperbolic identity. In this case, this means ’flipping the signs on the $x$ in the arcsine integral - it works!

Meanwhile, $\frac{1}{\sqrt{x^2-1}}$ is only defined for $|x|\ge1$ - and $\cosh(x)$ is the function that fits the bill there.

### The tangents

Lastly, we can note that $\tanh(x)$ gives an output between $-1$ and $1$, which suggests that its derivative must be $\frac{1}{1-x^2}$ - rather than $\frac{1}{1+x^2}$, which is defined everywhere.

Again applying Osborn’s Law, we can see that that has to be arctangent.

There are other, less exciting ways to tackle these, obviously. But as a quick-and-dirty check of what’s going on, I find asking “what could the domain be?” saves a bit of substitution and makes one look like a ninja.